clan::ShaderObject Class Reference

Shader Object. More...

#include <shader_object.h>

Public Member Functions

Attributes
unsigned int get_handle () const
 Returns the OpenGL shader handle. More...
 
ShaderType get_shader_type () const
 Gets the shader type. More...
 
std::string get_info_log () const
 Get shader object's info log. More...
 
std::string get_shader_source () const
 Get shader source code. More...
 
bool is_null () const
 Returns true if this object is invalid. More...
 
void throw_if_null () const
 Throw an exception if this object is invalid. More...
 
ShaderObjectProviderget_provider () const
 Get Provider. More...
 
Operations
bool operator== (const ShaderObject &other) const
 Handle comparison operator. More...
 
bool compile ()
 Compile program. More...
 

Construction

 ShaderObject ()
 Constructs a null instance. More...
 
 ShaderObject (GraphicContext &gc, ShaderType type, const std::string &source)
 Constructs an OpenGL shader. More...
 
 ShaderObject (GraphicContext &gc, ShaderType type, const void *source, int source_size)
 Constructs a ShaderObject. More...
 
 ShaderObject (GraphicContext &gc, ShaderType type, const std::vector< std::string > &sources)
 Constructs a ShaderObject. More...
 
 ShaderObject (GraphicContextProvider *gc_provider, ShaderType type, const std::string &source)
 Constructs a ShaderObject. More...
 
 ShaderObject (GraphicContextProvider *gc_provider, ShaderType type, const std::vector< std::string > &sources)
 Constructs a ShaderObject. More...
 
virtual ~ShaderObject ()
 
static ShaderObject load (GraphicContext &gc, const std::string &resource_id, const XMLResourceDocument &resources)
 Load. More...
 
static ShaderObject load (GraphicContext &gc, ShaderType type, const std::string &filename, const FileSystem &fs)
 Load. More...
 
static ShaderObject load (GraphicContext &gc, ShaderType type, const std::string &fullname)
 Load. More...
 
static ShaderObject load (GraphicContext &gc, ShaderType type, IODevice &file)
 Load. More...
 
static ShaderObject load_and_compile (GraphicContext &gc, ShaderType type, const std::string &filename, const FileSystem &fs)
 Load and compile. More...
 
static ShaderObject load_and_compile (GraphicContext &gc, ShaderType type, const std::string &filename)
 Load and compile. More...
 
static ShaderObject load_and_compile (GraphicContext &gc, ShaderType type, IODevice &file)
 Load and compile. More...
 

Detailed Description

Shader Object.

The source code that makes up a program that gets executed by one of the programmable stages is encapsulated in one or more shader objects. Shader objects are attached to a program objects to form a programmable setup. ShaderObject is ClanLib's C++ interface to OpenGL shader objects.



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