- static Program* New( ProgramCache& cache, Integration::ShaderDataPtr shaderData, bool modifiesGeometry );
-
- /**
- * Takes this program into use
- */
- void Use();
-
- /**
- * @return true if this program is used currently
- */
- bool IsUsed();
-
- /**
- * @param [in] type of the attribute
- * @return the index of the attribute
- */
- GLint GetAttribLocation( AttribType type );
-
- /**
- * Register a uniform name in our local cache
- * @param [in] name uniform name
- * @return the index of the uniform name in local cache
- */
- unsigned int RegisterUniform( const std::string& name );
-
- /**
- * Gets the location of a pre-registered uniform.
- * Uniforms in list UniformType are always registered and in the order of the enumeration
- * @param [in] uniformIndex of the uniform in local cache
- * @return the index of the uniform in the GL program
- */
- GLint GetUniformLocation( unsigned int uniformIndex );
-
- /**
- * Sets the uniform value
- * @param [in] location of uniform
- * @param [in] value0 as int
- */
- void SetUniform1i( GLint location, GLint value0 );
-
- /**
- * Sets the uniform value
- * @param [in] location of uniform
- * @param [in] value0 as int
- * @param [in] value1 as int
- * @param [in] value2 as int
- * @param [in] value3 as int
- */
- void SetUniform4i( GLint location, GLint value0, GLint value1, GLint value2, GLint value3 );
-
- /**
- * Sets the uniform value
- * @param [in] location of uniform
- * @param [in] value0 as float
- */
- void SetUniform1f( GLint location, GLfloat value0 );
-
- /**
- * Sets the uniform value
- * @param [in] location of uniform
- * @param [in] value0 as float
- * @param [in] value1 as float
- */
- void SetUniform2f( GLint location, GLfloat value0, GLfloat value1 );
-
- /**
- * Sets the uniform value
- * @param [in] location of uniform
- * @param [in] value0 as float
- * @param [in] value1 as float
- * @param [in] value2 as float
- */
- void SetUniform3f( GLint location, GLfloat value0, GLfloat value1, GLfloat value2 );
-
- /**
- * Sets the uniform value
- * @param [in] location of uniform
- * @param [in] value0 as float
- * @param [in] value1 as float
- * @param [in] value2 as float
- * @param [in] value3 as float
- */
- void SetUniform4f( GLint location, GLfloat value0, GLfloat value1, GLfloat value2, GLfloat value3 );
-
- /**
- * Sets the uniform value as matrix. NOTE! we never want GPU to transpose
- * so make sure your matrix is in correct order for GL.
- * @param [in] location Location of uniform
- * @param [in] count Count of matrices
- * @param [in] value values as float pointers
- */
- void SetUniformMatrix4fv( GLint location, GLsizei count, const GLfloat* value );
-
- /**
- * Sets the uniform value as matrix. NOTE! we never want GPU to transpose
- * so make sure your matrix is in correct order for GL.
- * @param [in] location Location of uniform
- * @param [in] count Count of matrices
- * @param [in] value values as float pointers
- */
- void SetUniformMatrix3fv( GLint location, GLsizei count, const GLfloat* value );
-
- /**
- * Needs to be called when GL context is (re)created
- */
- void GlContextCreated();
-
- /**
- * Needs to be called when GL context is destroyed
- */
- void GlContextDestroyed();
-
- /**
- * @return true if this program modifies geometry
- */
- bool ModifiesGeometry();