Program Object provider. More...
#include <program_object_provider.h>
Public Member Functions | |
Construction | |
virtual | ~CL_ProgramObjectProvider () |
virtual void | destroy ()=0 |
Destroy. | |
Attributes | |
virtual unsigned int | get_handle () const =0 |
Returns the OpenGL program object handle. | |
virtual bool | get_link_status () const =0 |
Returns true if the link succeeded. | |
virtual bool | get_validate_status () const =0 |
Returns true if validation succeeded. | |
virtual CL_String | get_info_log () const =0 |
Returns the current info log for the program object. | |
virtual int | get_attribute_count () const =0 |
Returns the count of active attributes. | |
virtual std::vector < CL_ShaderObject > | get_shaders () const =0 |
Returns the shaders used in this program. | |
virtual std::vector < CL_ProgramAttribute > | get_attributes () const =0 |
Returns the active attributes. | |
virtual int | get_attribute_location (const CL_StringRef &name) const =0 |
Returns the location of a named active attribute. | |
virtual int | get_uniform_count () const =0 |
Returns the count of active uniform variables. | |
virtual std::vector < CL_ProgramUniform > | get_uniforms () const =0 |
Returns the active uniforms. | |
virtual int | get_uniform_location (const CL_StringRef &name) const =0 |
Returns the location of a named uniform variable. | |
Operations | |
virtual void | attach (const CL_ShaderObject &obj)=0 |
Add shader to program object. | |
virtual void | detach (const CL_ShaderObject &obj)=0 |
Remove shader from program object. | |
virtual void | bind_attribute_location (int index, const CL_StringRef &name)=0 |
Bind attribute to specific location. | |
virtual void | bind_frag_data_location (int color_number, const CL_StringRef &name)=0 |
Bind shader out variable a specific color buffer location. | |
virtual void | link ()=0 |
Link program. | |
virtual void | validate ()=0 |
Validate program. | |
virtual void | set_uniform1i (const CL_StringRef &name, int)=0 |
Set uniform variable(s). | |
virtual void | set_uniform2i (const CL_StringRef &name, int, int)=0 |
Set uniform2i. | |
virtual void | set_uniform3i (const CL_StringRef &name, int, int, int)=0 |
virtual void | set_uniform4i (const CL_StringRef &name, int, int, int, int)=0 |
Set uniform4i. | |
virtual void | set_uniformiv (const CL_StringRef &name, int size, int count, int *data)=0 |
Set uniformiv. | |
virtual void | set_uniform1f (const CL_StringRef &name, float)=0 |
virtual void | set_uniform2f (const CL_StringRef &name, float, float)=0 |
Set uniform2f. | |
virtual void | set_uniform3f (const CL_StringRef &name, float, float, float)=0 |
virtual void | set_uniform4f (const CL_StringRef &name, float, float, float, float)=0 |
Set uniform4f. | |
virtual void | set_uniformfv (const CL_StringRef &name, int size, int count, float *data)=0 |
Set uniformfv. | |
virtual void | set_uniform_matrix (const CL_StringRef &name, int size, int count, bool transpose, float *data)=0 |
Set uniform matrices. |
Program Object provider.
virtual CL_ProgramObjectProvider::~CL_ProgramObjectProvider | ( | ) | [inline, virtual] |
virtual void CL_ProgramObjectProvider::attach | ( | const CL_ShaderObject & | obj | ) | [pure virtual] |
Add shader to program object.
virtual void CL_ProgramObjectProvider::bind_attribute_location | ( | int | index, | |
const CL_StringRef & | name | |||
) | [pure virtual] |
Bind attribute to specific location.
This function must be called before linking.
virtual void CL_ProgramObjectProvider::bind_frag_data_location | ( | int | color_number, | |
const CL_StringRef & | name | |||
) | [pure virtual] |
Bind shader out variable a specific color buffer location.
This function must be called before linking.
virtual void CL_ProgramObjectProvider::destroy | ( | ) | [pure virtual] |
Destroy.
virtual void CL_ProgramObjectProvider::detach | ( | const CL_ShaderObject & | obj | ) | [pure virtual] |
Remove shader from program object.
virtual int CL_ProgramObjectProvider::get_attribute_count | ( | ) | const [pure virtual] |
Returns the count of active attributes.
virtual int CL_ProgramObjectProvider::get_attribute_location | ( | const CL_StringRef & | name | ) | const [pure virtual] |
Returns the location of a named active attribute.
virtual std::vector<CL_ProgramAttribute> CL_ProgramObjectProvider::get_attributes | ( | ) | const [pure virtual] |
Returns the active attributes.
virtual unsigned int CL_ProgramObjectProvider::get_handle | ( | ) | const [pure virtual] |
Returns the OpenGL program object handle.
virtual CL_String CL_ProgramObjectProvider::get_info_log | ( | ) | const [pure virtual] |
Returns the current info log for the program object.
virtual bool CL_ProgramObjectProvider::get_link_status | ( | ) | const [pure virtual] |
Returns true if the link succeeded.
virtual std::vector<CL_ShaderObject> CL_ProgramObjectProvider::get_shaders | ( | ) | const [pure virtual] |
Returns the shaders used in this program.
virtual int CL_ProgramObjectProvider::get_uniform_count | ( | ) | const [pure virtual] |
Returns the count of active uniform variables.
virtual int CL_ProgramObjectProvider::get_uniform_location | ( | const CL_StringRef & | name | ) | const [pure virtual] |
Returns the location of a named uniform variable.
virtual std::vector<CL_ProgramUniform> CL_ProgramObjectProvider::get_uniforms | ( | ) | const [pure virtual] |
Returns the active uniforms.
virtual bool CL_ProgramObjectProvider::get_validate_status | ( | ) | const [pure virtual] |
Returns true if validation succeeded.
virtual void CL_ProgramObjectProvider::link | ( | ) | [pure virtual] |
Link program.
If the linking fails, get_link_status() will return false and get_info_log() will return the link log.
virtual void CL_ProgramObjectProvider::set_uniform1f | ( | const CL_StringRef & | name, | |
float | ||||
) | [pure virtual] |
virtual void CL_ProgramObjectProvider::set_uniform1i | ( | const CL_StringRef & | name, | |
int | ||||
) | [pure virtual] |
Set uniform variable(s).
virtual void CL_ProgramObjectProvider::set_uniform2f | ( | const CL_StringRef & | name, | |
float | , | |||
float | ||||
) | [pure virtual] |
Set uniform2f.
name | = String Ref | |
float | = value |
virtual void CL_ProgramObjectProvider::set_uniform2i | ( | const CL_StringRef & | name, | |
int | , | |||
int | ||||
) | [pure virtual] |
Set uniform2i.
name | = String Ref | |
int | = value |
virtual void CL_ProgramObjectProvider::set_uniform3f | ( | const CL_StringRef & | name, | |
float | , | |||
float | , | |||
float | ||||
) | [pure virtual] |
virtual void CL_ProgramObjectProvider::set_uniform3i | ( | const CL_StringRef & | name, | |
int | , | |||
int | , | |||
int | ||||
) | [pure virtual] |
virtual void CL_ProgramObjectProvider::set_uniform4f | ( | const CL_StringRef & | name, | |
float | , | |||
float | , | |||
float | , | |||
float | ||||
) | [pure virtual] |
Set uniform4f.
name | = String Ref | |
float | = value | |
float | = value |
virtual void CL_ProgramObjectProvider::set_uniform4i | ( | const CL_StringRef & | name, | |
int | , | |||
int | , | |||
int | , | |||
int | ||||
) | [pure virtual] |
Set uniform4i.
name | = String Ref | |
int | = value | |
int | = value |
virtual void CL_ProgramObjectProvider::set_uniform_matrix | ( | const CL_StringRef & | name, | |
int | size, | |||
int | count, | |||
bool | transpose, | |||
float * | data | |||
) | [pure virtual] |
Set uniform matrices.
virtual void CL_ProgramObjectProvider::set_uniformfv | ( | const CL_StringRef & | name, | |
int | size, | |||
int | count, | |||
float * | data | |||
) | [pure virtual] |
Set uniformfv.
name | = String Ref | |
size | = value | |
count | = value | |
data | = value |
virtual void CL_ProgramObjectProvider::set_uniformiv | ( | const CL_StringRef & | name, | |
int | size, | |||
int | count, | |||
int * | data | |||
) | [pure virtual] |
Set uniformiv.
name | = String Ref | |
size | = value | |
count | = value | |
data | = value |
virtual void CL_ProgramObjectProvider::validate | ( | ) | [pure virtual] |
Validate program.
If the validation fails, get_validate_status() will return false and get_info_log() will return the validation log.