clan::ProgramObjectProvider Class Reference - ClanLib SDK
Description: clan::ProgramObjectProvider Class Reference

Public Member Functions | List of all members
clan::ProgramObjectProvider Class Referenceabstract
clanDisplay Display

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.
virtual void | bind_attribute_location (int index, const std::string &name)=0
| Bind attribute to specific location.
virtual void | bind_frag_data_location (int color_number, const std::string &name)=0
| Bind shader out variable a specific color buffer location.
virtual void | detach (const ShaderObject &obj)=0
| Remove shader from program object.
virtual int | get_attribute_location (const std::string &name) const =0
| Returns the location of a named active attribute.
virtual unsigned int | get_handle () const =0
| Returns the OpenGL program object handle.
virtual std::string | get_info_log () const =0
| Returns the current info log for the program object.
virtual bool | get_link_status () const =0
| Returns true if the link succeeded.
virtual std::vector< ShaderObject > | get_shaders () const =0
| Returns the shaders used in this program.
virtual int | get_storage_buffer_index (const std::string &name) const =0
| Get the storage block index.
virtual int | get_uniform_buffer_index (const std::string &block_name) const =0
| Get the uniform block index.
virtual int | get_uniform_buffer_size (int block_index) const =0
| Get the uniform block size.
virtual int | get_uniform_location (const std::string &name) const =0
| Returns the location of a named uniform variable.
virtual bool | get_validate_status () const =0
| Returns true if validation succeeded.
virtual void | link ()=0
| Link program.
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).
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.

## Detailed Description

Program Object provider.

## Constructor & Destructor Documentation

## ◆ ~ProgramObjectProvider()

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

## Member Function Documentation

## ◆ attach()

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

Add shader to program object.

## ◆ bind_attribute_location()

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.

## ◆ bind_frag_data_location()

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.

## ◆ detach()

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

Remove shader from program object.

## ◆ get_attribute_location()

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

Returns the location of a named active attribute.

## ◆ get_handle()

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

Returns the OpenGL program object handle.

## ◆ get_info_log()

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

Returns the current info log for the program object.

## ◆ get_link_status()

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

Returns true if the link succeeded.

## ◆ get_shaders()

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

Returns the shaders used in this program.

## ◆ get_storage_buffer_index()

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

## ◆ get_uniform_buffer_index()

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

## ◆ get_uniform_buffer_size()

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

Get the uniform block size.

## ◆ get_uniform_location()

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

Returns the location of a named uniform variable.

## ◆ get_validate_status()

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

Returns true if validation succeeded.

## ◆ link()

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.

## ◆ set_storage_buffer_index()

virtual void clan::ProgramObjectProvider::set_storage_buffer_index | ( | int | buffer_index,
|  | int | bind_unit_index )
| pure virtual

## ◆ set_uniform1f()

virtual void clan::ProgramObjectProvider::set_uniform1f | ( | int | location,
|  | float | value_a )
| pure virtual

## ◆ set_uniform1i()

virtual void clan::ProgramObjectProvider::set_uniform1i | ( | int | location,
|  | int | value_a )
| pure virtual

Set uniform variable(s).

## ◆ set_uniform2f()

virtual void clan::ProgramObjectProvider::set_uniform2f | ( | int | location,
|  | float | value_a,
|  | float | value_b )
| pure virtual

## ◆ set_uniform2i()

virtual void clan::ProgramObjectProvider::set_uniform2i | ( | int | location,
|  | int | value_a,
|  | int | value_b )
| pure virtual

## ◆ set_uniform3f()

virtual void clan::ProgramObjectProvider::set_uniform3f | ( | int | location,
|  | float | value_a,
|  | float | value_b,
|  | float | value_c )
| pure virtual

## ◆ set_uniform3i()

virtual void clan::ProgramObjectProvider::set_uniform3i | ( | int | location,
|  | int | value_a,
|  | int | value_b,
|  | int | value_c )
| pure virtual

## ◆ set_uniform4f()

virtual void clan::ProgramObjectProvider::set_uniform4f | ( | int | location,
|  | float | value_a,
|  | float | value_b,
|  | float | value_c,
|  | float | value_d )
| pure virtual

## ◆ set_uniform4i()

virtual void clan::ProgramObjectProvider::set_uniform4i | ( | int | location,
|  | int | value_a,
|  | int | value_b,
|  | int | value_c,
|  | int | value_d )
| pure virtual

## ◆ set_uniform_buffer_index()

virtual void clan::ProgramObjectProvider::set_uniform_buffer_index | ( | int | block_index,
|  | int | bind_index )
| pure virtual

## ◆ set_uniform_matrix()

virtual void clan::ProgramObjectProvider::set_uniform_matrix | ( | int | location,
|  | int | size,
|  | int | count,
|  | bool | transpose,
|  | const float * | data )
| pure virtual

## ◆ set_uniformfv()

virtual void clan::ProgramObjectProvider::set_uniformfv | ( | int | location,
|  | int | size,
|  | int | count,
|  | const float * | data )
| pure virtual

## ◆ set_uniformiv()

virtual void clan::ProgramObjectProvider::set_uniformiv | ( | int | location,
|  | int | size,
|  | int | count,
|  | const int * | data )
| pure virtual

## ◆ validate()

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:

- program_object_provider.h