clan::ProgramObjectProvider Class Referenceabstract

Program Object provider. More...

#include <program_object_provider.h>

Public Member Functions

virtual ~ProgramObjectProvider ()
 
virtual void attach (const ShaderObject &obj)=0
 Add shader to program object. More...
 
virtual void bind_attribute_location (int index, const std::string &name)=0
 Bind attribute to specific location. More...
 
virtual void bind_frag_data_location (int color_number, const std::string &name)=0
 Bind shader out variable a specific color buffer location. More...
 
virtual void detach (const ShaderObject &obj)=0
 Remove shader from program object. More...
 
virtual int get_attribute_location (const std::string &name) const =0
 Returns the location of a named active attribute. More...
 
virtual unsigned int get_handle () const =0
 Returns the OpenGL program object handle. More...
 
virtual std::string get_info_log () const =0
 Returns the current info log for the program object. More...
 
virtual bool get_link_status () const =0
 Returns true if the link succeeded. More...
 
virtual std::vector< ShaderObjectget_shaders () const =0
 Returns the shaders used in this program. More...
 
virtual int get_storage_buffer_index (const std::string &name) const =0
 Get the storage block index. More...
 
virtual int get_uniform_buffer_index (const std::string &block_name) const =0
 Get the uniform block index. More...
 
virtual int get_uniform_buffer_size (int block_index) const =0
 Get the uniform block size. More...
 
virtual int get_uniform_location (const std::string &name) const =0
 Returns the location of a named uniform variable. More...
 
virtual bool get_validate_status () const =0
 Returns true if validation succeeded. More...
 
virtual void link ()=0
 Link program. More...
 
virtual void set_storage_buffer_index (int buffer_index, int bind_unit_index)=0
 
virtual void set_uniform1f (int location, float value_a)=0
 
virtual void set_uniform1i (int location, int value_a)=0
 Set uniform variable(s). More...
 
virtual void set_uniform2f (int location, float value_a, float value_b)=0
 
virtual void set_uniform2i (int location, int value_a, int value_b)=0
 
virtual void set_uniform3f (int location, float value_a, float value_b, float value_c)=0
 
virtual void set_uniform3i (int location, int value_a, int value_b, int value_c)=0
 
virtual void set_uniform4f (int location, float value_a, float value_b, float value_c, float value_d)=0
 
virtual void set_uniform4i (int location, int value_a, int value_b, int value_c, int value_d)=0
 
virtual void set_uniform_buffer_index (int block_index, int bind_index)=0
 
virtual void set_uniform_matrix (int location, int size, int count, bool transpose, const float *data)=0
 
virtual void set_uniformfv (int location, int size, int count, const float *data)=0
 
virtual void set_uniformiv (int location, int size, int count, const int *data)=0
 
virtual void validate ()=0
 Validate program. More...
 

Detailed Description

Program Object provider.

Constructor & Destructor Documentation

virtual clan::ProgramObjectProvider::~ProgramObjectProvider ( )
inlinevirtual

Member Function Documentation

virtual void clan::ProgramObjectProvider::attach ( const ShaderObject obj)
pure virtual

Add shader to program object.

virtual void clan::ProgramObjectProvider::bind_attribute_location ( int  index,
const std::string name 
)
pure virtual

Bind attribute to specific location.

This function must be called before linking.

virtual void clan::ProgramObjectProvider::bind_frag_data_location ( int  color_number,
const std::string name 
)
pure virtual

Bind shader out variable a specific color buffer location.

This function must be called before linking.

virtual void clan::ProgramObjectProvider::detach ( const ShaderObject obj)
pure virtual

Remove shader from program object.

virtual int clan::ProgramObjectProvider::get_attribute_location ( const std::string name) const
pure virtual

Returns the location of a named active attribute.

virtual unsigned int clan::ProgramObjectProvider::get_handle ( ) const
pure virtual

Returns the OpenGL program object handle.

virtual std::string clan::ProgramObjectProvider::get_info_log ( ) const
pure virtual

Returns the current info log for the program object.

virtual bool clan::ProgramObjectProvider::get_link_status ( ) const
pure virtual

Returns true if the link succeeded.

virtual std::vector<ShaderObject> clan::ProgramObjectProvider::get_shaders ( ) const
pure virtual

Returns the shaders used in this program.

virtual int clan::ProgramObjectProvider::get_storage_buffer_index ( const std::string name) const
pure virtual

Get the storage block index.

Returns -1 when the block index was not found

virtual int clan::ProgramObjectProvider::get_uniform_buffer_index ( const std::string block_name) const
pure virtual

Get the uniform block index.

Returns -1 when the block index was not found

virtual int clan::ProgramObjectProvider::get_uniform_buffer_size ( int  block_index) const
pure virtual

Get the uniform block size.

virtual int clan::ProgramObjectProvider::get_uniform_location ( const std::string name) const
pure virtual

Returns the location of a named uniform variable.

virtual bool clan::ProgramObjectProvider::get_validate_status ( ) const
pure virtual

Returns true if validation succeeded.

virtual void clan::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 clan::ProgramObjectProvider::set_storage_buffer_index ( int  buffer_index,
int  bind_unit_index 
)
pure virtual
virtual void clan::ProgramObjectProvider::set_uniform1f ( int  location,
float  value_a 
)
pure virtual
virtual void clan::ProgramObjectProvider::set_uniform1i ( int  location,
int  value_a 
)
pure virtual

Set uniform variable(s).

virtual void clan::ProgramObjectProvider::set_uniform2f ( int  location,
float  value_a,
float  value_b 
)
pure virtual
virtual void clan::ProgramObjectProvider::set_uniform2i ( int  location,
int  value_a,
int  value_b 
)
pure virtual
virtual void clan::ProgramObjectProvider::set_uniform3f ( int  location,
float  value_a,
float  value_b,
float  value_c 
)
pure virtual
virtual void clan::ProgramObjectProvider::set_uniform3i ( int  location,
int  value_a,
int  value_b,
int  value_c 
)
pure virtual
virtual void clan::ProgramObjectProvider::set_uniform4f ( int  location,
float  value_a,
float  value_b,
float  value_c,
float  value_d 
)
pure virtual
virtual void clan::ProgramObjectProvider::set_uniform4i ( int  location,
int  value_a,
int  value_b,
int  value_c,
int  value_d 
)
pure virtual
virtual void clan::ProgramObjectProvider::set_uniform_buffer_index ( int  block_index,
int  bind_index 
)
pure virtual
virtual void clan::ProgramObjectProvider::set_uniform_matrix ( int  location,
int  size,
int  count,
bool  transpose,
const float *  data 
)
pure virtual
virtual void clan::ProgramObjectProvider::set_uniformfv ( int  location,
int  size,
int  count,
const float *  data 
)
pure virtual
virtual void clan::ProgramObjectProvider::set_uniformiv ( int  location,
int  size,
int  count,
const int *  data 
)
pure virtual
virtual void clan::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.


The documentation for this class was generated from the following file: