|
Ream v0.1.0-1
C++ graphics library for Linux
|
A linked OpenGL ES program (vertex + fragment shader) for a given feature set. More...
#include <RGLProgram.h>
Inheritance diagram for RGLProgram:Classes | |
| struct | Locations |
| Cached locations of the program's vertex attributes and uniforms. More... | |
Public Member Functions | |
| ~RGLProgram () noexcept | |
| Deletes the underlying GL program object. | |
| const Locations & | loc () const noexcept |
| Returns the attribute/uniform locations resolved at link time. | |
| GLuint | id () const noexcept |
| Returns the GL program object name. | |
| CZBitset< RGLShader::Features > | features () const noexcept |
| Returns the feature flags this program was built for. | |
| RGLDevice * | device () const noexcept |
| Returns the device this program belongs to. | |
| void | bind () noexcept |
Makes this program the current one (glUseProgram). | |
Public Member Functions inherited from RObject | |
| RObject ()=default | |
| Constructs a default RObject. | |
Static Public Member Functions | |
| static std::shared_ptr< RGLProgram > | GetOrMake (RGLDevice *device, CZBitset< RGLShader::Features > features) noexcept |
| Returns the cached program for the given device and feature set, building it if needed. | |
A linked OpenGL ES program (vertex + fragment shader) for a given feature set.
Each program is built from an RGLShader pair selected by a set of RGLShader::Features flags. Programs are cached per feature set in the RGLDevice's per-thread context data, so a given feature combination is only linked once per device/context.
| struct CZ::RGLProgram::Locations |
Cached locations of the program's vertex attributes and uniforms.
Locations that do not apply to the program's feature set are left unset.
|
noexcept |
Deletes the underlying GL program object.
|
staticnoexcept |
Returns the cached program for the given device and feature set, building it if needed.
| device | The target device (uses its per-thread context data). |
| features | The RGLShader feature flags describing the desired program. |
nullptr if compilation/linking failed.
|
inlinenoexcept |
Returns the attribute/uniform locations resolved at link time.
|
inlinenoexcept |
Returns the GL program object name.
|
inlinenoexcept |
Returns the feature flags this program was built for.
|
inlinenoexcept |
Returns the device this program belongs to.
|
noexcept |
Makes this program the current one (glUseProgram).