Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

shgl::GlslCode Class Reference

Inheritance diagram for shgl::GlslCode:

Inheritance graph
[legend]
Collaboration diagram for shgl::GlslCode:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GlslCode (const SH::ShProgramNodeCPtr &program, const std::string &target, TextureStrategy *texture)
virtual ~GlslCode ()
virtual bool allocateRegister (const SH::ShVariableNodePtr &var)
 Used by a register allocater to signal that a register should be allocated to var.
virtual void freeRegister (const SH::ShVariableNodePtr &var)
 Used by the register allocator to signal that the register used by var can be used by other registers in future allocateRegister() calls.
virtual void upload ()
 Upload this shader code to the GPU.
virtual void bind ()
 Bind this shader code after it has been uploaded.
virtual void unbind ()
 Unbind this shader.
virtual void update ()
 Upload any textures and uniform parameters which are out-of-date but required.
virtual void updateUniform (const SH::ShVariableNodePtr &uniform)
 Update the value of a uniform parameter after it has changed.
void set_bound (GLhandleARB program)
void upload_uniforms ()
std::ostream & print (std::ostream &out)
std::ostream & describe_interface (std::ostream &out)
 Prints input and output specification in target-specific format.
void generate ()
 Actually generate the code.
GlslProgramType glsl_unit () const
GLhandleARB glsl_shader ()
std::string target () const
void bind_textures ()

Detailed Description

Definition at line 67 of file GlslCode.hpp.


Member Function Documentation

virtual bool shgl::GlslCode::allocateRegister const SH::ShVariableNodePtr var  )  [inline, virtual]
 

Used by a register allocater to signal that a register should be allocated to var.

Return true iff the allocation succeeded.

Implements SH::ShBackendCode.

Definition at line 73 of file GlslCode.hpp.


The documentation for this class was generated from the following files:
Generated on Thu Jul 28 17:37:28 2005 for Sh by  doxygen 1.4.3-20050530