Home | All Classes | Grouped Classes | Index | Search
OpenGL Program Object More...
Derived from:
none
Derived by:
none
Group: GL (Display 3D)
#include <ClanLib/gl.h>
Construction:
Construct OpenGL program object.  | 
Attributes:
Returns the OpenGL program object handle.  | |
Returns true if the link succeeded.  | |
Returns true if validation succeeded.  | |
Returns the shaders attached to the program object.  | |
Returns the current info log for the program object.  | |
Returns the count of active attributes.  | |
Returns the active attributes.  | |
Returns the location of a named active attribute.  | |
Returns the count of active uniform variables.  | |
Returns true if the uniform variable is present in the program.  | |
Returns a list of the active uniforms.  | |
Returns the location of a named uniform variable.  | 
Operations:
Add shader to program object.  | |
Remove shader from program object.  | |
Bind attribute to specific location.  | |
Link program.  | |
Validate program.  | |
Start using the shader.  | |
Stop using the shader.  | |
Set uniform variable(s).  | |
Set uniform matrices.  | 
Detailed description:
The shader objects that are to be used by programmable stages of OpenGL are collected together to form a program object. CL_ProgramObject is ClanLib's C++ interface to OpenGL program objects.
To construct a program object programatically, the procedure is as follows:
CL_ShaderObject vertex_shader(cl_shadertype_vertex, vertex_glsl_sourcecode); CL_ShaderObject fragment_shader(cl_shadertype_fragment, fragment_glsl_sourcecode); CL_ProgramObject program; program.attach(vertex_shader); program.attach(fragment_shader); program.link();
For more information about program objects, see the OpenGL 2.0 specification at www.opengl.org. Documentation about the OpenGL Shader Language (GLSL) is also available from www.opengl.org.