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

Public Member Functions | Static Public Member Functions | List of all members
clan::ProgramObject Class Reference
clanDisplay Display

Program Object. More...

`#include <program_object.h>`

## Public Member Functions
| ProgramObject ()
| Construct a null instance.
| ProgramObject (GraphicContext &gc)
| Constructs a ProgramObject.
| ProgramObject (GraphicContextProvider *gc_provider)
| Constructs a ProgramObject.
| ProgramObject (std::unique_ptr< ProgramObjectProvider > provider)
| Constructs a ProgramObject.
virtual | ~ProgramObject ()
void | attach (const ShaderObject &obj)
| Add shader to program object.
void | bind_attribute_location (int index, const std::string &name)
| Bind attribute to specific location.
void | bind_frag_data_location (int color_number, const std::string &name)
| Bind shader out variable a specific color buffer location.
void | detach (const ShaderObject &obj)
| Remove shader from program object.
int | get_attribute_location (const std::string &name) const
| Returns the location of a named active attribute.
unsigned int | get_handle () const
| Returns the OpenGL program object handle.
std::string | get_info_log () const
| Returns the current info log for the program object.
ProgramObjectProvider * | get_provider () const
| Retrieves the provider.
std::vector< ShaderObject > | get_shaders () const
| Returns the shaders attached to the program object.
int | get_storage_buffer_index (const std::string &name) const
| Get the storage buffer index.
int | get_uniform_buffer_index (const std::string &block_name) const
| Get the uniform block index.
int | get_uniform_buffer_size (const std::string &block_name) const
| Get the uniform block size.
int | get_uniform_buffer_size (int block_index) const
| Get the uniform block size.
int | get_uniform_location (const std::string &name) const
| Returns the location of a named uniform variable.
bool | is_null () const
| Returns true if this object is invalid.
bool | link ()
| Link program.
| operator bool () const
bool | operator== (const ProgramObject &other) const
| Equality operator.
void | set_storage_buffer_index (const std::string &block_name, int bind_index)
| Sets the UniformBuffer.
void | set_storage_buffer_index (int block_index, int bind_index)
| Sets the UniformBuffer.
void | set_uniform1f (const std::string &name, float value_a)
void | set_uniform1f (int location, float value_a)
void | set_uniform1i (const std::string &name, int value_a)
void | set_uniform1i (int location, int value_a)
void | set_uniform2b (const std::string &name, const Vec2b &vec)
void | set_uniform2b (int location, const Vec2b &vec)
void | set_uniform2f (const std::string &name, const Vec2f &vec)
void | set_uniform2f (const std::string &name, float value_a, float value_b)
void | set_uniform2f (int location, const Vec2f &vec)
void | set_uniform2f (int location, float value_a, float value_b)
void | set_uniform2i (const std::string &name, const Vec2i &vec)
void | set_uniform2i (const std::string &name, int value_a, int value_b)
void | set_uniform2i (int location, const Vec2i &vec)
void | set_uniform2i (int location, int value_a, int value_b)
void | set_uniform2s (const std::string &name, const Vec2s &vec)
void | set_uniform2s (int location, const Vec2s &vec)
void | set_uniform3b (const std::string &name, const Vec3b &vec)
void | set_uniform3b (int location, const Vec3b &vec)
void | set_uniform3f (const std::string &name, const Vec3f &vec)
void | set_uniform3f (const std::string &name, float value_a, float value_b, float value_c)
void | set_uniform3f (int location, const Vec3f &vec)
void | set_uniform3f (int location, float value_a, float value_b, float value_c)
void | set_uniform3i (const std::string &name, const Vec3i &vec)
void | set_uniform3i (const std::string &name, int value_a, int value_b, int value_c)
void | set_uniform3i (int location, const Vec3i &vec)
void | set_uniform3i (int location, int value_a, int value_b, int value_c)
void | set_uniform3s (const std::string &name, const Vec3s &vec)
void | set_uniform3s (int location, const Vec3s &vec)
void | set_uniform4b (const std::string &name, const Vec4b &vec)
void | set_uniform4b (int location, const Vec4b &vec)
void | set_uniform4f (const std::string &name, const Vec4f &vec)
void | set_uniform4f (const std::string &name, float value_a, float value_b, float value_c, float value_d)
void | set_uniform4f (int location, const Vec4f &vec)
void | set_uniform4f (int location, float value_a, float value_b, float value_c, float value_d)
void | set_uniform4i (const std::string &name, const Vec4i &vec)
void | set_uniform4i (const std::string &name, int value_a, int value_b, int value_c, int value_d)
void | set_uniform4i (int location, const Vec4i &vec)
void | set_uniform4i (int location, int value_a, int value_b, int value_c, int value_d)
void | set_uniform4s (const std::string &name, const Vec4s &vec)
void | set_uniform4s (int location, const Vec4s &vec)
void | set_uniform_buffer_index (const std::string &block_name, int bind_index)
| Sets the UniformBuffer.
void | set_uniform_buffer_index (int block_index, int bind_index)
| Sets the UniformBuffer.
void | set_uniform_matrix (const std::string &name, const Mat2f &matrix)
void | set_uniform_matrix (const std::string &name, const Mat3f &matrix)
void | set_uniform_matrix (const std::string &name, const Mat4f &matrix)
void | set_uniform_matrix (const std::string &name, int count, const Mat2f *matrix)
void | set_uniform_matrix (const std::string &name, int count, const Mat3f *matrix)
void | set_uniform_matrix (const std::string &name, int count, const Mat4f *matrix)
void | set_uniform_matrix (const std::string &name, int size, int count, bool transpose, const float *data)
void | set_uniform_matrix (int location, const Mat2f &matrix)
void | set_uniform_matrix (int location, const Mat3f &matrix)
void | set_uniform_matrix (int location, const Mat4f &matrix)
void | set_uniform_matrix (int location, int count, const Mat2f *matrix)
void | set_uniform_matrix (int location, int count, const Mat3f *matrix)
void | set_uniform_matrix (int location, int count, const Mat4f *matrix)
void | set_uniform_matrix (int location, int size, int count, bool transpose, const float *data)
void | set_uniformfv (const std::string &name, int count, const Vec2f *data)
void | set_uniformfv (const std::string &name, int count, const Vec3f *data)
void | set_uniformfv (const std::string &name, int count, const Vec4f *data)
void | set_uniformfv (const std::string &name, int size, int count, const float *data)
void | set_uniformfv (int location, int count, const Vec2f *data)
void | set_uniformfv (int location, int count, const Vec3f *data)
void | set_uniformfv (int location, int count, const Vec4f *data)
void | set_uniformfv (int location, int size, int count, const float *data)
void | set_uniformiv (const std::string &name, int count, const Vec2i *data)
void | set_uniformiv (const std::string &name, int count, const Vec3i *data)
void | set_uniformiv (const std::string &name, int count, const Vec4i *data)
void | set_uniformiv (const std::string &name, int size, int count, const int *data)
void | set_uniformiv (int location, int count, const Vec2i *data)
void | set_uniformiv (int location, int count, const Vec3i *data)
void | set_uniformiv (int location, int count, const Vec4i *data)
void | set_uniformiv (int location, int size, int count, const int *data)
void | throw_if_null () const
| Throw an exception if this object is invalid.
bool | validate ()
| Validate program.

## Static Public Member Functions
static ProgramObject | load (GraphicContext &gc, const std::string &resource_id, const XMLResourceDocument &resman)
| Load.
static ProgramObject | load (GraphicContext &gc, const std::string &vertex_filename, const std::string &fragment_filename, const FileSystem &fs)
| Load.
static ProgramObject | load (GraphicContext &gc, const std::string &vertex_filename, const std::string &geometry_filename, const std::string &fragment_filename, const FileSystem &fs)
| Load.
static ProgramObject | load (GraphicContext &gc, const std::string &vertex_fullname, const std::string &fragment_fullname)
| Load.
static ProgramObject | load (GraphicContext &gc, const std::string &vertex_fullname, const std::string &geometry_fullname, const std::string &fragment_fullname)
| Load.
static ProgramObject | load (GraphicContext &gc, IODevice &vertex_file, IODevice &fragment_file)
| Load.
static ProgramObject | load (GraphicContext &gc, IODevice &vertex_file, IODevice &geometry_file, IODevice &fragment_file)
| Load.
static ProgramObject | load_and_link (GraphicContext &gc, const std::string &vertex_filename, const std::string &fragment_filename, const FileSystem &fs)
| Load and link.
static ProgramObject | load_and_link (GraphicContext &gc, const std::string &vertex_filename, const std::string &geometry_filename, const std::string &fragment_filename, const FileSystem &fs)
| Load and link.
static ProgramObject | load_and_link (GraphicContext &gc, const std::string &vertex_fullname, const std::string &fragment_fullname)
| Load and link.
static ProgramObject | load_and_link (GraphicContext &gc, const std::string &vertex_fullname, const std::string &geometry_fullname, const std::string &fragment_fullname)
| Load and link.
static ProgramObject | load_and_link (GraphicContext &gc, IODevice &vertex_file, IODevice &fragment_file)
| Load and link.
static ProgramObject | load_and_link (GraphicContext &gc, IODevice &vertex_file, IODevice &geometry_file, IODevice &fragment_file)
| Load and link.

## Detailed Description

Program Object.

The shader objects that are to be used by programmable stages of OpenGL are collected together to form a program object. ProgramObject is ClanLib's C++ interface to OpenGL program objects.

To construct a program object programatically, the procedure is as follows:

       ShaderObject vertex_shader(shadertype_vertex, vertex_glsl_sourcecode);
       ShaderObject fragment_shader(shadertype_fragment, fragment_glsl_sourcecode);
       ProgramObject program;
       program.attach(vertex_shader);
       program.attach(fragment_shader);
       program.link();

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

## Constructor & Destructor Documentation

## ◆ ProgramObject() [1/4]

clan::ProgramObject::ProgramObject | ( |  | ) |

Construct a null instance.

Referenced by load(), load(), load(), load(), load(), load(), load(), load_and_link(), load_and_link(), load_and_link(), load_and_link(), load_and_link(), load_and_link(), and operator==().

## ◆ ProgramObject() [2/4]

clan::ProgramObject::ProgramObject | ( | GraphicContext & | gc | ) |

Constructs a ProgramObject.

Parameters

  gc | = Graphic Context

## ◆ ProgramObject() [3/4]

clan::ProgramObject::ProgramObject | ( | GraphicContextProvider * | gc_provider | ) |

Constructs a ProgramObject.

Parameters

  gc_provider | = Graphic Context Provider

## ◆ ProgramObject() [4/4]

clan::ProgramObject::ProgramObject | ( | std::unique_ptr< ProgramObjectProvider > | provider | ) |

Constructs a ProgramObject.

Parameters

  provider | = Font Provider

## ◆ ~ProgramObject()

virtual clan::ProgramObject::~ProgramObject | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ attach()

void clan::ProgramObject::attach | ( | const ShaderObject & | obj | ) |

Add shader to program object.

## ◆ bind_attribute_location()

void clan::ProgramObject::bind_attribute_location | ( | int | index,
|  | const std::string & | name )

Bind attribute to specific location.

This function must be called before linking.

## ◆ bind_frag_data_location()

void clan::ProgramObject::bind_frag_data_location | ( | int | color_number,
|  | const std::string & | name )

Bind shader out variable a specific color buffer location.

This function must be called before linking.

## ◆ detach()

void clan::ProgramObject::detach | ( | const ShaderObject & | obj | ) |

Remove shader from program object.

## ◆ get_attribute_location()

int clan::ProgramObject::get_attribute_location | ( | const std::string & | name | ) | const

Returns the location of a named active attribute.

Returns -1 when unknown

## ◆ get_handle()

unsigned int clan::ProgramObject::get_handle | ( |  | ) | const

Returns the OpenGL program object handle.

## ◆ get_info_log()

std::string clan::ProgramObject::get_info_log | ( |  | ) | const

Returns the current info log for the program object.

## ◆ get_provider()

ProgramObjectProvider * clan::ProgramObject::get_provider | ( |  | ) | const

Retrieves the provider.

## ◆ get_shaders()

std::vector< ShaderObject > clan::ProgramObject::get_shaders | ( |  | ) | const

Returns the shaders attached to the program object.

## ◆ get_storage_buffer_index()

int clan::ProgramObject::get_storage_buffer_index | ( | const std::string & | name | ) | const

Get the storage buffer index.

Returns -1 when the block index was not found

## ◆ get_uniform_buffer_index()

int clan::ProgramObject::get_uniform_buffer_index | ( | const std::string & | block_name | ) | const

Get the uniform block index.

Returns -1 when the block index was not found

## ◆ get_uniform_buffer_size() [1/2]

int clan::ProgramObject::get_uniform_buffer_size | ( | const std::string & | block_name | ) | const

Get the uniform block size.

An exception is thrown of block_name was not found

Returns -1 when unknown

## ◆ get_uniform_buffer_size() [2/2]

int clan::ProgramObject::get_uniform_buffer_size | ( | int | block_index | ) | const

Get the uniform block size.

## ◆ get_uniform_location()

int clan::ProgramObject::get_uniform_location | ( | const std::string & | name | ) | const

Returns the location of a named uniform variable.

Returns -1 when unknown

Referenced by set_uniform1f(), set_uniform1i(), set_uniform2b(), set_uniform2f(), set_uniform2f(), set_uniform2i(), set_uniform2i(), set_uniform2s(), set_uniform3b(), set_uniform3f(), set_uniform3f(), set_uniform3i(), set_uniform3i(), set_uniform3s(), set_uniform4b(), set_uniform4f(), set_uniform4f(), set_uniform4i(), set_uniform4i(), set_uniform4s(), set_uniform_matrix(), set_uniform_matrix(), set_uniform_matrix(), set_uniform_matrix(), set_uniform_matrix(), set_uniform_matrix(), set_uniform_matrix(), set_uniformfv(), set_uniformfv(), set_uniformfv(), set_uniformfv(), set_uniformiv(), set_uniformiv(), set_uniformiv(), and set_uniformiv().

## ◆ is_null()

bool clan::ProgramObject::is_null | ( |  | ) | const
| inline

Returns true if this object is invalid.

## ◆ link()

bool clan::ProgramObject::link | ( |  | ) |

Link program.

If the linking fails, get_info_log() will return the link log.

## ◆ load() [1/7]

ProgramObject clan::ProgramObject::load | ( | GraphicContext & | gc,
|  | const std::string & | resource_id,
|  | const XMLResourceDocument & | resman )
| static

Load.

Parameters

  gc | = Graphic Context
  resource_id | = String Ref
  resman | = Resource Manager

Returns
  Program Object

References ProgramObject().

## ◆ load() [2/7]

ProgramObject clan::ProgramObject::load | ( | GraphicContext & | gc,
|  | const std::string & | vertex_filename,
|  | const std::string & | fragment_filename,
|  | const FileSystem & | fs )
| static

Load.

Parameters

  gc | = Graphic Context
  vertex_filename | = String Ref
  fragment_filename | = String Ref
  directory | = Virtual Directory

Returns
  Program Object

References ProgramObject().

## ◆ load() [3/7]

ProgramObject clan::ProgramObject::load | ( | GraphicContext & | gc,
|  | const std::string & | vertex_filename,
|  | const std::string & | geometry_filename,
|  | const std::string & | fragment_filename,
|  | const FileSystem & | fs )
| static

Load.

Parameters

  gc | = Graphic Context
  vertex_filename | = String Ref
  geometry_filename | = String Ref
  fragment_filename | = String Ref
  directory | = Virtual Directory

Returns
  Program Object

References ProgramObject().

## ◆ load() [4/7]

ProgramObject clan::ProgramObject::load | ( | GraphicContext & | gc,
|  | const std::string & | vertex_fullname,
|  | const std::string & | fragment_fullname )
| static

Load.

Parameters

  gc | = Graphic Context
  vertex_fullname | = String Ref
  fragment_fullname | = String Ref

Returns
  Program Object

References ProgramObject().

## ◆ load() [5/7]

ProgramObject clan::ProgramObject::load | ( | GraphicContext & | gc,
|  | const std::string & | vertex_fullname,
|  | const std::string & | geometry_fullname,
|  | const std::string & | fragment_fullname )
| static

Load.

Parameters

  gc | = Graphic Context
  vertex_fullname | = String Ref
  geometry_fullname | = String Ref
  fragment_fullname | = String Ref

Returns
  Program Object

References ProgramObject().

## ◆ load() [6/7]

ProgramObject clan::ProgramObject::load | ( | GraphicContext & | gc,
|  | IODevice & | vertex_file,
|  | IODevice & | fragment_file )
| static

Load.

Parameters

  gc | = Graphic Context
  vertex_file | = IODevice
  fragment_file | = IODevice

Returns
  Program Object

References ProgramObject().

## ◆ load() [7/7]

ProgramObject clan::ProgramObject::load | ( | GraphicContext & | gc,
|  | IODevice & | vertex_file,
|  | IODevice & | geometry_file,
|  | IODevice & | fragment_file )
| static

Load.

Parameters

  gc | = Graphic Context
  vertex_file | = IODevice
  geometry_file | = IODevice
  fragment_file | = IODevice

Returns
  Program Object

References ProgramObject().

## ◆ load_and_link() [1/6]

ProgramObject clan::ProgramObject::load_and_link | ( | GraphicContext & | gc,
|  | const std::string & | vertex_filename,
|  | const std::string & | fragment_filename,
|  | const FileSystem & | fs )
| static

Load and link.

Parameters

  gc | = Graphic Context
  vertex_filename | = String Ref
  fragment_filename | = String Ref
  directory | = Virtual Directory

Returns
  Program Object

References ProgramObject().

## ◆ load_and_link() [2/6]

ProgramObject clan::ProgramObject::load_and_link | ( | GraphicContext & | gc,
|  | const std::string & | vertex_filename,
|  | const std::string & | geometry_filename,
|  | const std::string & | fragment_filename,
|  | const FileSystem & | fs )
| static

Load and link.

Parameters

  gc | = Graphic Context
  vertex_filename | = String Ref
  geometry_filename | = String Ref
  fragment_filename | = String Ref
  directory | = Virtual Directory

Returns
  Program Object

References ProgramObject().

## ◆ load_and_link() [3/6]

ProgramObject clan::ProgramObject::load_and_link | ( | GraphicContext & | gc,
|  | const std::string & | vertex_fullname,
|  | const std::string & | fragment_fullname )
| static

Load and link.

Parameters

  gc | = Graphic Context
  vertex_fullname | = String Ref
  fragment_fullname | = String Ref

Returns
  Program Object

References ProgramObject().

## ◆ load_and_link() [4/6]

ProgramObject clan::ProgramObject::load_and_link | ( | GraphicContext & | gc,
|  | const std::string & | vertex_fullname,
|  | const std::string & | geometry_fullname,
|  | const std::string & | fragment_fullname )
| static

Load and link.

Parameters

  gc | = Graphic Context
  vertex_fullname | = String Ref
  geometry_fullname | = String Ref
  fragment_fullname | = String Ref

Returns
  Program Object

References ProgramObject().

## ◆ load_and_link() [5/6]

ProgramObject clan::ProgramObject::load_and_link | ( | GraphicContext & | gc,
|  | IODevice & | vertex_file,
|  | IODevice & | fragment_file )
| static

Load and link.

Parameters

  gc | = Graphic Context
  vertex_file | = IODevice
  fragment_file | = IODevice

Returns
  Program Object

References ProgramObject().

## ◆ load_and_link() [6/6]

ProgramObject clan::ProgramObject::load_and_link | ( | GraphicContext & | gc,
|  | IODevice & | vertex_file,
|  | IODevice & | geometry_file,
|  | IODevice & | fragment_file )
| static

Load and link.

Parameters

  gc | = Graphic Context
  vertex_file | = IODevice
  geometry_file | = IODevice
  fragment_file | = IODevice

Returns
  Program Object

References ProgramObject().

## ◆ operator bool()

clan::ProgramObject::operator bool | ( |  | ) | const
| inlineexplicit

## ◆ operator==()

bool clan::ProgramObject::operator== | ( | const ProgramObject & | other | ) | const

Equality operator.

References ProgramObject().

## ◆ set_storage_buffer_index() [1/2]

void clan::ProgramObject::set_storage_buffer_index | ( | const std::string & | block_name,
|  | int | bind_index )

Sets the UniformBuffer.

## ◆ set_storage_buffer_index() [2/2]

void clan::ProgramObject::set_storage_buffer_index | ( | int | block_index,
|  | int | bind_index )

Sets the UniformBuffer.

## ◆ set_uniform1f() [1/2]

void clan::ProgramObject::set_uniform1f | ( | const std::string & | name,
|  | float | value_a )
| inline

References get_uniform_location(), and set_uniform1f().

Referenced by set_uniform1f().

## ◆ set_uniform1f() [2/2]

void clan::ProgramObject::set_uniform1f | ( | int | location,
|  | float | value_a )

## ◆ set_uniform1i() [1/2]

void clan::ProgramObject::set_uniform1i | ( | const std::string & | name,
|  | int | value_a )
| inline

References get_uniform_location(), and set_uniform1i().

Referenced by set_uniform1i().

## ◆ set_uniform1i() [2/2]

void clan::ProgramObject::set_uniform1i | ( | int | location,
|  | int | value_a )

## ◆ set_uniform2b() [1/2]

void clan::ProgramObject::set_uniform2b | ( | const std::string & | name,
|  | const Vec2b & | vec )
| inline

References get_uniform_location(), and set_uniform2b().

Referenced by set_uniform2b().

## ◆ set_uniform2b() [2/2]

void clan::ProgramObject::set_uniform2b | ( | int | location,
|  | const Vec2b & | vec )
| inline

References set_uniform2i(), clan::Vec2< Type >::x, and clan::Vec2< Type >::y.

## ◆ set_uniform2f() [1/4]

void clan::ProgramObject::set_uniform2f | ( | const std::string & | name,
|  | const Vec2f & | vec )
| inline

References get_uniform_location(), and set_uniform2f().

Referenced by set_uniform2f().

## ◆ set_uniform2f() [2/4]

void clan::ProgramObject::set_uniform2f | ( | const std::string & | name,
|  | float | value_a,
|  | float | value_b )
| inline

References get_uniform_location(), and set_uniform2f().

Referenced by set_uniform2f().

## ◆ set_uniform2f() [3/4]

void clan::ProgramObject::set_uniform2f | ( | int | location,
|  | const Vec2f & | vec )
| inline

References set_uniform2f(), clan::Vec2< Type >::x, and clan::Vec2< Type >::y.

Referenced by set_uniform2f().

## ◆ set_uniform2f() [4/4]

void clan::ProgramObject::set_uniform2f | ( | int | location,
|  | float | value_a,
|  | float | value_b )

## ◆ set_uniform2i() [1/4]

void clan::ProgramObject::set_uniform2i | ( | const std::string & | name,
|  | const Vec2i & | vec )
| inline

References get_uniform_location(), and set_uniform2i().

Referenced by set_uniform2i().

## ◆ set_uniform2i() [2/4]

void clan::ProgramObject::set_uniform2i | ( | const std::string & | name,
|  | int | value_a,
|  | int | value_b )
| inline

References get_uniform_location(), and set_uniform2i().

Referenced by set_uniform2i().

## ◆ set_uniform2i() [3/4]

void clan::ProgramObject::set_uniform2i | ( | int | location,
|  | const Vec2i & | vec )
| inline

References set_uniform2i(), clan::Vec2< Type >::x, and clan::Vec2< Type >::y.

Referenced by set_uniform2i().

## ◆ set_uniform2i() [4/4]

void clan::ProgramObject::set_uniform2i | ( | int | location,
|  | int | value_a,
|  | int | value_b )

Referenced by set_uniform2b(), and set_uniform2s().

## ◆ set_uniform2s() [1/2]

void clan::ProgramObject::set_uniform2s | ( | const std::string & | name,
|  | const Vec2s & | vec )
| inline

References get_uniform_location(), and set_uniform2s().

Referenced by set_uniform2s().

## ◆ set_uniform2s() [2/2]

void clan::ProgramObject::set_uniform2s | ( | int | location,
|  | const Vec2s & | vec )
| inline

References set_uniform2i(), clan::Vec2< Type >::x, and clan::Vec2< Type >::y.

## ◆ set_uniform3b() [1/2]

void clan::ProgramObject::set_uniform3b | ( | const std::string & | name,
|  | const Vec3b & | vec )
| inline

References get_uniform_location(), and set_uniform3b().

Referenced by set_uniform3b().

## ◆ set_uniform3b() [2/2]

void clan::ProgramObject::set_uniform3b | ( | int | location,
|  | const Vec3b & | vec )
| inline

References set_uniform3i(), clan::Vec3< Type >::x, clan::Vec3< Type >::y, and clan::Vec3< Type >::z.

## ◆ set_uniform3f() [1/4]

void clan::ProgramObject::set_uniform3f | ( | const std::string & | name,
|  | const Vec3f & | vec )
| inline

References get_uniform_location(), and set_uniform3f().

Referenced by set_uniform3f().

## ◆ set_uniform3f() [2/4]

void clan::ProgramObject::set_uniform3f | ( | const std::string & | name,
|  | float | value_a,
|  | float | value_b,
|  | float | value_c )
| inline

References get_uniform_location(), and set_uniform3f().

Referenced by set_uniform3f().

## ◆ set_uniform3f() [3/4]

void clan::ProgramObject::set_uniform3f | ( | int | location,
|  | const Vec3f & | vec )
| inline

References set_uniform3f(), clan::Vec3< Type >::x, clan::Vec3< Type >::y, and clan::Vec3< Type >::z.

Referenced by set_uniform3f().

## ◆ set_uniform3f() [4/4]

void clan::ProgramObject::set_uniform3f | ( | int | location,
|  | float | value_a,
|  | float | value_b,
|  | float | value_c )

## ◆ set_uniform3i() [1/4]

void clan::ProgramObject::set_uniform3i | ( | const std::string & | name,
|  | const Vec3i & | vec )
| inline

References get_uniform_location(), and set_uniform3i().

Referenced by set_uniform3i().

## ◆ set_uniform3i() [2/4]

void clan::ProgramObject::set_uniform3i | ( | const std::string & | name,
|  | int | value_a,
|  | int | value_b,
|  | int | value_c )
| inline

References get_uniform_location(), and set_uniform3i().

Referenced by set_uniform3i().

## ◆ set_uniform3i() [3/4]

void clan::ProgramObject::set_uniform3i | ( | int | location,
|  | const Vec3i & | vec )
| inline

References set_uniform3i(), clan::Vec3< Type >::x, clan::Vec3< Type >::y, and clan::Vec3< Type >::z.

Referenced by set_uniform3i().

## ◆ set_uniform3i() [4/4]

void clan::ProgramObject::set_uniform3i | ( | int | location,
|  | int | value_a,
|  | int | value_b,
|  | int | value_c )

Referenced by set_uniform3b(), and set_uniform3s().

## ◆ set_uniform3s() [1/2]

void clan::ProgramObject::set_uniform3s | ( | const std::string & | name,
|  | const Vec3s & | vec )
| inline

References get_uniform_location(), and set_uniform3s().

Referenced by set_uniform3s().

## ◆ set_uniform3s() [2/2]

void clan::ProgramObject::set_uniform3s | ( | int | location,
|  | const Vec3s & | vec )
| inline

References set_uniform3i(), clan::Vec3< Type >::x, clan::Vec3< Type >::y, and clan::Vec3< Type >::z.

## ◆ set_uniform4b() [1/2]

void clan::ProgramObject::set_uniform4b | ( | const std::string & | name,
|  | const Vec4b & | vec )
| inline

References get_uniform_location(), and set_uniform4b().

Referenced by set_uniform4b().

## ◆ set_uniform4b() [2/2]

void clan::ProgramObject::set_uniform4b | ( | int | location,
|  | const Vec4b & | vec )
| inline

References set_uniform4i(), clan::Vec4< Type >::w, clan::Vec4< Type >::x, clan::Vec4< Type >::y, and clan::Vec4< Type >::z.

## ◆ set_uniform4f() [1/4]

void clan::ProgramObject::set_uniform4f | ( | const std::string & | name,
|  | const Vec4f & | vec )
| inline

References get_uniform_location(), and set_uniform4f().

Referenced by set_uniform4f().

## ◆ set_uniform4f() [2/4]

void clan::ProgramObject::set_uniform4f | ( | const std::string & | name,
|  | float | value_a,
|  | float | value_b,
|  | float | value_c,
|  | float | value_d )
| inline

References get_uniform_location(), and set_uniform4f().

Referenced by set_uniform4f().

## ◆ set_uniform4f() [3/4]

void clan::ProgramObject::set_uniform4f | ( | int | location,
|  | const Vec4f & | vec )
| inline

References set_uniform4f(), clan::Vec4< Type >::w, clan::Vec4< Type >::x, clan::Vec4< Type >::y, and clan::Vec4< Type >::z.

Referenced by set_uniform4f().

## ◆ set_uniform4f() [4/4]

void clan::ProgramObject::set_uniform4f | ( | int | location,
|  | float | value_a,
|  | float | value_b,
|  | float | value_c,
|  | float | value_d )

## ◆ set_uniform4i() [1/4]

void clan::ProgramObject::set_uniform4i | ( | const std::string & | name,
|  | const Vec4i & | vec )
| inline

References get_uniform_location(), and set_uniform4i().

Referenced by set_uniform4i().

## ◆ set_uniform4i() [2/4]

void clan::ProgramObject::set_uniform4i | ( | const std::string & | name,
|  | int | value_a,
|  | int | value_b,
|  | int | value_c,
|  | int | value_d )
| inline

References get_uniform_location(), and set_uniform4i().

Referenced by set_uniform4i().

## ◆ set_uniform4i() [3/4]

void clan::ProgramObject::set_uniform4i | ( | int | location,
|  | const Vec4i & | vec )
| inline

References set_uniform4i(), clan::Vec4< Type >::w, clan::Vec4< Type >::x, clan::Vec4< Type >::y, and clan::Vec4< Type >::z.

Referenced by set_uniform4i().

## ◆ set_uniform4i() [4/4]

void clan::ProgramObject::set_uniform4i | ( | int | location,
|  | int | value_a,
|  | int | value_b,
|  | int | value_c,
|  | int | value_d )

Referenced by set_uniform4b(), and set_uniform4s().

## ◆ set_uniform4s() [1/2]

void clan::ProgramObject::set_uniform4s | ( | const std::string & | name,
|  | const Vec4s & | vec )
| inline

References get_uniform_location(), and set_uniform4s().

Referenced by set_uniform4s().

## ◆ set_uniform4s() [2/2]

void clan::ProgramObject::set_uniform4s | ( | int | location,
|  | const Vec4s & | vec )
| inline

References set_uniform4i(), clan::Vec4< Type >::w, clan::Vec4< Type >::x, clan::Vec4< Type >::y, and clan::Vec4< Type >::z.

## ◆ set_uniform_buffer_index() [1/2]

void clan::ProgramObject::set_uniform_buffer_index | ( | const std::string & | block_name,
|  | int | bind_index )

Sets the UniformBuffer.

## ◆ set_uniform_buffer_index() [2/2]

void clan::ProgramObject::set_uniform_buffer_index | ( | int | block_index,
|  | int | bind_index )

Sets the UniformBuffer.

## ◆ set_uniform_matrix() [1/14]

void clan::ProgramObject::set_uniform_matrix | ( | const std::string & | name,
|  | const Mat2f & | matrix )
| inline

References get_uniform_location(), and set_uniform_matrix().

Referenced by set_uniform_matrix().

## ◆ set_uniform_matrix() [2/14]

void clan::ProgramObject::set_uniform_matrix | ( | const std::string & | name,
|  | const Mat3f & | matrix )
| inline

References get_uniform_location(), and set_uniform_matrix().

Referenced by set_uniform_matrix().

## ◆ set_uniform_matrix() [3/14]

void clan::ProgramObject::set_uniform_matrix | ( | const std::string & | name,
|  | const Mat4f & | matrix )
| inline

References get_uniform_location(), and set_uniform_matrix().

Referenced by set_uniform_matrix().

## ◆ set_uniform_matrix() [4/14]

void clan::ProgramObject::set_uniform_matrix | ( | const std::string & | name,
|  | int | count,
|  | const Mat2f * | matrix )
| inline

References get_uniform_location(), and set_uniform_matrix().

Referenced by set_uniform_matrix().

## ◆ set_uniform_matrix() [5/14]

void clan::ProgramObject::set_uniform_matrix | ( | const std::string & | name,
|  | int | count,
|  | const Mat3f * | matrix )
| inline

References get_uniform_location(), and set_uniform_matrix().

Referenced by set_uniform_matrix().

## ◆ set_uniform_matrix() [6/14]

void clan::ProgramObject::set_uniform_matrix | ( | const std::string & | name,
|  | int | count,
|  | const Mat4f * | matrix )
| inline

References get_uniform_location(), and set_uniform_matrix().

Referenced by set_uniform_matrix().

## ◆ set_uniform_matrix() [7/14]

void clan::ProgramObject::set_uniform_matrix | ( | const std::string & | name,
|  | int | size,
|  | int | count,
|  | bool | transpose,
|  | const float * | data )
| inline

References get_uniform_location(), and set_uniform_matrix().

Referenced by set_uniform_matrix().

## ◆ set_uniform_matrix() [8/14]

void clan::ProgramObject::set_uniform_matrix | ( | int | location,
|  | const Mat2f & | matrix )
| inline

References clan::Mat2< Type >::matrix, and set_uniform_matrix().

Referenced by set_uniform_matrix().

## ◆ set_uniform_matrix() [9/14]

void clan::ProgramObject::set_uniform_matrix | ( | int | location,
|  | const Mat3f & | matrix )
| inline

References clan::Mat3< Type >::matrix, and set_uniform_matrix().

Referenced by set_uniform_matrix().

## ◆ set_uniform_matrix() [10/14]

void clan::ProgramObject::set_uniform_matrix | ( | int | location,
|  | const Mat4f & | matrix )
| inline

References clan::Mat4< Type >::matrix, and set_uniform_matrix().

Referenced by set_uniform_matrix().

## ◆ set_uniform_matrix() [11/14]

void clan::ProgramObject::set_uniform_matrix | ( | int | location,
|  | int | count,
|  | const Mat2f * | matrix )
| inline

References clan::Mat2< Type >::matrix, and set_uniform_matrix().

Referenced by set_uniform_matrix().

## ◆ set_uniform_matrix() [12/14]

void clan::ProgramObject::set_uniform_matrix | ( | int | location,
|  | int | count,
|  | const Mat3f * | matrix )
| inline

References clan::Mat3< Type >::matrix, and set_uniform_matrix().

Referenced by set_uniform_matrix().

## ◆ set_uniform_matrix() [13/14]

void clan::ProgramObject::set_uniform_matrix | ( | int | location,
|  | int | count,
|  | const Mat4f * | matrix )
| inline

References clan::Mat4< Type >::matrix, and set_uniform_matrix().

Referenced by set_uniform_matrix().

## ◆ set_uniform_matrix() [14/14]

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

## ◆ set_uniformfv() [1/8]

void clan::ProgramObject::set_uniformfv | ( | const std::string & | name,
|  | int | count,
|  | const Vec2f * | data )
| inline

References get_uniform_location(), and set_uniformfv().

Referenced by set_uniformfv().

## ◆ set_uniformfv() [2/8]

void clan::ProgramObject::set_uniformfv | ( | const std::string & | name,
|  | int | count,
|  | const Vec3f * | data )
| inline

References get_uniform_location(), and set_uniformfv().

Referenced by set_uniformfv().

## ◆ set_uniformfv() [3/8]

void clan::ProgramObject::set_uniformfv | ( | const std::string & | name,
|  | int | count,
|  | const Vec4f * | data )
| inline

References get_uniform_location(), and set_uniformfv().

Referenced by set_uniformfv().

## ◆ set_uniformfv() [4/8]

void clan::ProgramObject::set_uniformfv | ( | const std::string & | name,
|  | int | size,
|  | int | count,
|  | const float * | data )
| inline

References get_uniform_location(), and set_uniformfv().

Referenced by set_uniformfv().

## ◆ set_uniformfv() [5/8]

void clan::ProgramObject::set_uniformfv | ( | int | location,
|  | int | count,
|  | const Vec2f * | data )
| inline

References set_uniformfv(), and clan::Vec2< Type >::x.

Referenced by set_uniformfv().

## ◆ set_uniformfv() [6/8]

void clan::ProgramObject::set_uniformfv | ( | int | location,
|  | int | count,
|  | const Vec3f * | data )
| inline

References set_uniformfv(), and clan::Vec3< Type >::x.

Referenced by set_uniformfv().

## ◆ set_uniformfv() [7/8]

void clan::ProgramObject::set_uniformfv | ( | int | location,
|  | int | count,
|  | const Vec4f * | data )
| inline

References set_uniformfv(), and clan::Vec4< Type >::x.

Referenced by set_uniformfv().

## ◆ set_uniformfv() [8/8]

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

## ◆ set_uniformiv() [1/8]

void clan::ProgramObject::set_uniformiv | ( | const std::string & | name,
|  | int | count,
|  | const Vec2i * | data )
| inline

References get_uniform_location(), and set_uniformiv().

Referenced by set_uniformiv().

## ◆ set_uniformiv() [2/8]

void clan::ProgramObject::set_uniformiv | ( | const std::string & | name,
|  | int | count,
|  | const Vec3i * | data )
| inline

References get_uniform_location(), and set_uniformiv().

Referenced by set_uniformiv().

## ◆ set_uniformiv() [3/8]

void clan::ProgramObject::set_uniformiv | ( | const std::string & | name,
|  | int | count,
|  | const Vec4i * | data )
| inline

References get_uniform_location(), and set_uniformiv().

Referenced by set_uniformiv().

## ◆ set_uniformiv() [4/8]

void clan::ProgramObject::set_uniformiv | ( | const std::string & | name,
|  | int | size,
|  | int | count,
|  | const int * | data )
| inline

References get_uniform_location(), and set_uniformiv().

Referenced by set_uniformiv().

## ◆ set_uniformiv() [5/8]

void clan::ProgramObject::set_uniformiv | ( | int | location,
|  | int | count,
|  | const Vec2i * | data )
| inline

References set_uniformiv(), and clan::Vec2< Type >::x.

Referenced by set_uniformiv().

## ◆ set_uniformiv() [6/8]

void clan::ProgramObject::set_uniformiv | ( | int | location,
|  | int | count,
|  | const Vec3i * | data )
| inline

References set_uniformiv(), and clan::Vec3< Type >::x.

Referenced by set_uniformiv().

## ◆ set_uniformiv() [7/8]

void clan::ProgramObject::set_uniformiv | ( | int | location,
|  | int | count,
|  | const Vec4i * | data )
| inline

References set_uniformiv(), and clan::Vec4< Type >::x.

Referenced by set_uniformiv().

## ◆ set_uniformiv() [8/8]

void clan::ProgramObject::set_uniformiv | ( | int | location,
|  | int | size,
|  | int | count,
|  | const int * | data )

## ◆ throw_if_null()

void clan::ProgramObject::throw_if_null | ( |  | ) | const

Throw an exception if this object is invalid.

## ◆ validate()

bool clan::ProgramObject::validate | ( |  | ) |

Validate program.

If the validation fails, get_info_log() will return the validation log.

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

- program_object.h