RenderTools::Program Class Reference

#include <Program.h>

Inheritance diagram for RenderTools::Program:

RenderTools::AbstractPropertyContainer RenderTools::ContainerProperty RenderTools::AbstractProperty RenderTools::InitializeInterface

List of all members.

Public Member Functions

 Program (void)
 loads the two files and creates, compiles and links the program
virtual ~Program (void)
virtual void createProperties (void)
virtual const string getTypeName (bool ofComponent=false) const
virtual void onInitialize (void)
GLuint getProgramID (void) const
GLuint getVertexID (void) const
GLuint getFragmentID (void) const
const PropertyContainerPtr getUniforms (void) const
const PropertyPtr findUniform (const string name) const
bool bind (const string uniform, const string value)
bool bind (const PropertyPtr uniform)
unsigned int bind (void)
 we call this bind, to stay close to the naming scheme of Sampler, Frame- and Renderbuffer, etc. calls glUseProgram and validates.
ProgramPtr getSharedPtrProgram (void)
const ProgramPtr getSharedPtrProgram (void) const

Static Public Member Functions

static PropertyPtr create (const XMLNodePtr &xml=XMLNodePtr())
static void unbind (void)
static const ProgramPtr getCurrent (void)


Detailed Description

Definition at line 17 of file Program.h.


Constructor & Destructor Documentation

RenderTools::Program::Program ( void   ) 

loads the two files and creates, compiles and links the program

( string& m_vertexShader, string& m_fragmentShader )

Parameters:
m_vertexShader path to vertex shader file
m_fragmentShader path to fragment shader file

Definition at line 24 of file Program.cpp.

RenderTools::Program::~Program ( void   )  [virtual]

Definition at line 483 of file Program.cpp.


Member Function Documentation

unsigned int RenderTools::Program::bind ( void   ) 

we call this bind, to stay close to the naming scheme of Sampler, Frame- and Renderbuffer, etc. calls glUseProgram and validates.

()

Returns:
the number of associated samplers checks if the program exists, and uses it if it does. then it validates the program and throws an error if it cannot be executed in the current state. dumps the infolog before throwing the Error::PROGRAM_VALIDATION_FAILED

Definition at line 609 of file Program.cpp.

bool RenderTools::Program::bind ( const PropertyPtr  uniform  ) 

Definition at line 503 of file Program.cpp.

bool RenderTools::Program::bind ( const string  uniform,
const string  value 
)

Definition at line 491 of file Program.cpp.

PropertyPtr RenderTools::Program::create ( const XMLNodePtr xml = XMLNodePtr()  )  [static]

Definition at line 35 of file Program.cpp.

void RenderTools::Program::createProperties ( void   )  [virtual]

Reimplemented from RenderTools::AbstractPropertyContainer.

Definition at line 43 of file Program.cpp.

const PropertyPtr RenderTools::Program::findUniform ( const string  name  )  const

Definition at line 296 of file Program.cpp.

static const ProgramPtr RenderTools::Program::getCurrent ( void   )  [inline, static]

Definition at line 38 of file Program.h.

GLuint RenderTools::Program::getFragmentID ( void   )  const

Definition at line 288 of file Program.cpp.

GLuint RenderTools::Program::getProgramID ( void   )  const

Definition at line 280 of file Program.cpp.

const ProgramPtr RenderTools::Program::getSharedPtrProgram ( void   )  const

Definition at line 670 of file Program.cpp.

ProgramPtr RenderTools::Program::getSharedPtrProgram ( void   ) 

Definition at line 666 of file Program.cpp.

const string RenderTools::Program::getTypeName ( bool  ofComponent = false  )  const [virtual]

Reimplemented from RenderTools::ContainerProperty.

Definition at line 50 of file Program.cpp.

const PropertyContainerPtr RenderTools::Program::getUniforms ( void   )  const

Definition at line 292 of file Program.cpp.

GLuint RenderTools::Program::getVertexID ( void   )  const

Definition at line 284 of file Program.cpp.

void RenderTools::Program::onInitialize ( void   )  [virtual]

TODO destroy previously initialised

Reimplemented from RenderTools::AbstractPropertyContainer.

Definition at line 54 of file Program.cpp.

void RenderTools::Program::unbind ( void   )  [static]

Definition at line 661 of file Program.cpp.


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

Generated on Wed Jan 26 00:15:36 2011 for RenderTools by  doxygen 1.5.8