An OGLplus object encapsulating OpenGL shading language program functionality. More...
#include </home/chochlik/devel/oglplus/include/oglplus/program.hpp>
Public Types | |
typedef Unspecified | InterfaceContext |
Helper class for efficient iteration of Program interface items. More... | |
typedef Range< ProgramResource > | ActiveResourceRange |
The type of the range for traversing program resource information. | |
typedef Range< ActiveVariableInfo > | ActiveAttribRange |
The type of the range for traversing active vertex attributes. | |
typedef Range< ActiveVariableInfo > | ActiveUniformRange |
The type of the range for traversing active uniforms. | |
typedef Range < ActiveUniformBlockInfo > | ActiveUniformRange |
The type of the range for traversing active uniform blocks. | |
typedef Range< ActiveVariableInfo > | ActiveSubroutineUniformRange |
The type of the range for traversing active subroutine uniforms. | |
typedef Range< ActiveVariableInfo > | TransformFeedbackVaryingRange |
The type of the range for traversing transform feedback varyings. | |
typedef Range< Managed< Shader > > | ShaderRange |
The type of the range for traversing program's shaders. | |
Public Member Functions | |
ProgramOps & | AttachShader (const ShaderOps &shader) |
Attaches the shader to this program. More... | |
ProgramOps & | AttachShaders (const Group< Shader > &shaders) |
Attaches a group of shaders to this program. | |
ProgramOps & | DetachShader (const ShaderOps &shader) |
Detaches the shader from this program. More... | |
bool | IsLinked (void) const |
Returns true if the program is already linked, false otherwise. More... | |
String | GetInfoLog (void) const |
Returns the linker output if the program is linked. More... | |
ProgramOps & | Link (void) |
Links this shading language program. More... | |
bool | IsValid (void) const |
Returns true if the program is validated, false otherwise. More... | |
ProgramOps & | Validate (void) |
Validates this shading language program. More... | |
const ProgramOps & | Use (void) const |
Uses this shading language program. More... | |
void | TransformFeedbackVaryings (GLsizei count, const GLchar **varyings, TransformFeedbackMode mode) |
Sets the variables that will be captured during transform feedback. More... | |
void | TransformFeedbackVaryings (const std::vector< String > &varyings, TransformFeedbackMode mode) const |
Sets the variables that will be captured during transform feedback. More... | |
TransformFeedbackVaryingRange | TransformFeedbackVaryings (void) const |
Returns a range allowing to do the traversal of feedback varyings. More... | |
void | TransformFeedbackVarying (const GLchar *varying) |
Sets the variable that will be captured during transform feedback. More... | |
InterfaceContext | ActiveResourceContext (ProgramInterface intf) const |
Returns the context for traversal of Program's active resources. More... | |
ActiveResourceRange | ActiveResources (ProgramInterface intf) const |
Returns a range allowing to do the traversal of interface's resources. More... | |
InterfaceContext | ActiveAttribContext (void) const |
Returns the context for traversal of Program's active vertex attributes. More... | |
ActiveAttribRange | ActiveAttribs (void) const |
Returns a range allowing to do the traversal of active attributes. More... | |
InterfaceContext | ActiveUniformContext (void) const |
Returns the context for traversal of Program's active uniforms. More... | |
ActiveUniformRange | ActiveUniforms (void) const |
Returns a range allowing to do the traversal of active uniforms. More... | |
InterfaceContext | ActiveSubroutineContext (ShaderType stage) const |
Returns the context for traversal of Program's active subroutines. More... | |
ActiveSubroutineRange | ActiveSubroutines (ShaderType stage) const |
Returns a range allowing to do the traversal of subroutines. More... | |
InterfaceContext | ActiveSubroutineUniformContext (ShaderType stage) const |
Returns the context for traversal of Program's active subr. uniforms. More... | |
ActiveSubroutineUniformRange | ActiveSubroutineUniforms (ShaderType stage) const |
Returns a range allowing to do the traversal of subroutine uniforms. More... | |
InterfaceContext | TransformFeedbackVaryingContext (void) const |
Returns the context for traversal of Program's active TFB varyings. More... | |
ShaderRange | AttachedShaders (void) const |
Returns a range allowing to traverse shaders attached to this program. | |
ActiveUniformBlockRange | ActiveUniformBlocks (void) const |
Returns a range allowing to do the traversal of active attributes. More... | |
ProgramOps & | MakeSeparable (bool para=true) |
Makes this program separable. More... | |
ProgramOps & | MakeRetrievable (bool para=true) |
Makes this program retrievable in binary form. More... | |
void | GetBinary (std::vector< GLubyte > &binary, GLenum &format) const |
Returns this programs binary representation. More... | |
void | Binary (const std::vector< GLubyte > &binary, GLenum format) |
Allows to specify to program code in binary form. More... | |
TransformFeedbackMode | TransformFeedbackBufferMode (void) const |
Returns the transform feedback buffer mode. More... | |
GLint | GeometryVerticesOut (void) const |
Returns the number of vertices that the geometry shader will output. More... | |
GLint | GeometryShaderInvocations (void) const |
Returns the number of invocations of geometry shader per primitive. More... | |
PrimitiveType | GeometryInputType (void) const |
Returns the geometry shader input primitive type. More... | |
PrimitiveType | GeometryOutputType (void) const |
Returns the geometry shader output primitive type. More... | |
FaceOrientation | TessGenVertexOrder (void) const |
Returns the vertex order in tesselation evaluation shader. More... | |
TessGenPrimitiveType | TessGenMode (void) const |
Returns the tesselation generator output primitive type. More... | |
TessGenPrimitiveSpacing | TessGenSpacing (void) const |
Returns the tesselation generator primitive spacing mode. More... | |
bool | TessGenPointMode (void) const |
Returns true if point mode is enabled in tesslation eval. shader. More... | |
void | BindLocation (const VertexAttribOps &vertex_attrib, const GLchar *identifier) const |
Binds the location of a SL variable to the vertex_attrib. More... | |
Static Public Member Functions | |
static void | UseNone (void) |
Deactivates the currently active/used program (if any) More... | |
An OGLplus object encapsulating OpenGL shading language program functionality.
|
inherited |
Helper class for efficient iteration of Program interface items.
Instances of this class are created by a program for its specific interfaces (uniform, vertex attributes, subroutines, etc.) or stages (vertex, geometry, fragment, etc.). Instances of an interface context can be used (mostly internally) for efficient iteration of individual items of a particular interface (uniforms, subroutines, etc.). Contexts for various programs and various interfaces are not interchangeable. The InterfaceContext type should be treated as opaque and only used with appropriate functions.
|
inherited |
Returns the context for traversal of Program's active vertex attributes.
|
inherited |
|
inherited |
Returns the context for traversal of Program's active resources.
|
inherited |
Returns a range allowing to do the traversal of interface's resources.
This instance of Program must be kept alive during the whole lifetime of the returned range, i.e. the returned range must not be used after the Program goes out of scope and is destroyed.
Error |
|
inherited |
Returns the context for traversal of Program's active subroutines.
|
inherited |
Returns a range allowing to do the traversal of subroutines.
This instance of Program must be kept alive during the whole lifetime of the returned range, i.e. the returned range must not be used after the Program goes out of scope and is destroyed.
Error | Requires OpenGL 4.0 or the GL_ARB_shader_subroutine extension. |
|
inherited |
Returns the context for traversal of Program's active subr. uniforms.
|
inherited |
Returns a range allowing to do the traversal of subroutine uniforms.
This instance of Program must be kept alive during the whole lifetime of the returned range, i.e. the returned range must not be used after the Program goes out of scope and is destroyed.
Error | Requires OpenGL 4.0 or the GL_ARB_shader_subroutine extension. |
|
inherited |
|
inherited |
Returns the context for traversal of Program's active uniforms.
|
inherited |
|
inherited |
Attaches the shader to this program.
|
inherited |
Allows to specify to program code in binary form.
Requires OpenGL 4.1 or the GL_ARB_get_program_binary extension.
|
inherited |
Binds the location of a SL variable to the vertex_attrib.
This function binds the location of the vertex attribute vertex_attrib
to the shader variable identified by identifier
.
References OGLPLUS_CHECK.
|
inherited |
Detaches the shader from this program.
|
inherited |
Returns the geometry shader input primitive type.
Requires OpenGL 3.2.
GL_GEOMETRY_INPUT_TYPE
|
inherited |
Returns the geometry shader output primitive type.
Requires OpenGL 3.2.
GL_GEOMETRY_OUTPUT_TYPE
|
inherited |
Returns the number of invocations of geometry shader per primitive.
Requires OpenGL 4.1 or the GL_ARB_gpu_shader5 extension.
GL_GEOMETRY_SHADER_INVOCATIONS
|
inherited |
Returns the number of vertices that the geometry shader will output.
GL_GEOMETRY_VERTICES_OUT
|
inherited |
Returns this programs binary representation.
Requires OpenGL 4.1 or the GL_ARB_get_program_binary extension.
GL_PROGRAM_BINARY_LENGTH
|
inherited |
Returns the linker output if the program is linked.
|
inherited |
Returns true if the program is already linked, false otherwise.
GL_LINK_STATUS
Referenced by oglplus::ProgramOps::Use().
|
inherited |
Returns true if the program is validated, false otherwise.
GL_VALIDATE_STATUS
|
inherited |
Links this shading language program.
|
inherited |
Makes this program retrievable in binary form.
Requires OpenGL 4.1 or the GL_ARB_get_program_binary extension.
|
inherited |
Makes this program separable.
Requires OpenGL 4.1 or the GL_ARB_separate_shader_objects extension.
|
inherited |
Returns the tesselation generator output primitive type.
Requires OpenGL 4.0 or the GL_ARB_tessellation_shader extension.
GL_TESS_GEN_MODE
|
inherited |
Returns true if point mode is enabled in tesslation eval. shader.
Requires OpenGL 4.0 or the GL_ARB_tessellation_shader extension.
GL_TESS_GEN_POINT_MODE
|
inherited |
Returns the tesselation generator primitive spacing mode.
Requires OpenGL 4.0 or the GL_ARB_tessellation_shader extension.
GL_TESS_GEN_SPACING
|
inherited |
Returns the vertex order in tesselation evaluation shader.
Requires OpenGL 4.0 or the GL_ARB_tessellation_shader extension.
GL_TESS_GEN_VERTEX_ORDER
|
inherited |
Returns the transform feedback buffer mode.
GL_TRANSFORM_FEEDBACK_BUFFER_MODE
|
inherited |
Sets the variable that will be captured during transform feedback.
Error |
References oglplus::SeparateAttribs, and oglplus::ProgramOps::TransformFeedbackVaryings().
|
inherited |
Returns the context for traversal of Program's active TFB varyings.
|
inherited |
Sets the variables that will be captured during transform feedback.
Error |
|
inherited |
Sets the variables that will be captured during transform feedback.
Error |
|
inherited |
Returns a range allowing to do the traversal of feedback varyings.
This instance of Program must be kept alive during the whole lifetime of the returned range, i.e. the returned range must not be used after the Program goes out of scope and is destroyed.
Error |
Referenced by oglplus::ProgramOps::TransformFeedbackVarying().
|
inherited |
Uses this shading language program.
References oglplus::ProgramOps::IsLinked(), and OGLPLUS_VERIFY.
|
staticinherited |
Deactivates the currently active/used program (if any)
References OGLPLUS_VERIFY.
|
inherited |
Validates this shading language program.
Error | ValidationError |