All Classes |Grouped Classes |Index

Class CL_ProgramObject

OpenGL Program Object. More...

Derived from:

None

Derived by:

CL_ProgramObject_SWRender

Group:

Display (Display)

#include <ClanLib/display.h>

Class Members:

Construction:

CL_ProgramObject

Construct a null instance.

load

Load.

load_and_link

Load and link.


Attributes:

is_null

Returns true if this object is invalid.

throw_if_null

Throw an exception if this object is invalid.

get_provider

Retrieves the provider.

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:

operator==

Equality operator.

attach

Add shader to program object.

detach

Remove shader from program object.

bind_attribute_location

Bind attribute to specific location.

bind_frag_data_location

Bind shader out variable a specific color buffer location.

link

Link program.

validate

Validate program.

set_uniform1i

Set uniform variable(s).

set_uniform2i

Set uniform2i.

set_uniform3i

Set uniform2i.

set_uniform4i

Set uniform4i.

set_uniformiv

Set uniformiv.

set_uniform2s

Set uniform2s.

set_uniform3s

Set uniform3s.

set_uniform4s

Set uniform4s.

set_uniform2b

Set uniform2b.

set_uniform3b

Set uniform3b.

set_uniform4b

Set uniform4b.

set_uniform1f

Set uniform1f.

set_uniform2f

Set uniform2f.

set_uniform3f

Set uniform2f.

set_uniform4f

Set uniform4f.

set_uniformfv

Set uniformfv.

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.