Home |All Classes |Grouped Classes |Index |Search

Class CL_ProgramObject

OpenGL Program Object. More...

Derived from:

None

Derived by:

None

Group:

Display (Display)

#include <ClanLib/display.h>

Class Members:

Construction:

CL_ProgramObject

Construct OpenGL program object.

load

load_and_link


Attributes:

is_null

Returns true if the Program object is a dummy.

get_handle

Returns the OpenGL program object handle.

get_shaders

Returns the shaders attached to the program object.

get_info_log

Returns the current info log for the program object.

get_attribute_count

Returns the count of active attributes.

get_attributes

Returns the active attributes.

get_attribute_location

Returns the location of a named active attribute.

get_uniform_count

Returns the count of active uniform variables.

get_uniforms

Returns the active uniforms.

get_uniform_location

Returns the location of a named uniform variable.


Operations:

attach

Add shader to program object.

detach

Remove shader from program object.

bind_attribute_location

Bind attribute to specific location.

link

Link program.

validate

Validate program.

set_uniform

Set uniform variable(s).

set_uniform_matrix

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:

For more information about program objects, see the OpenGL 2.0 specification at . Documentation about the OpenGL Shader Language (GLSL) is also available from www.opengl.org.