GL Studio C++ Runtime API
IGlsStateManagerES20 Interface Referenceabstract

#include <gls_state_manager_es20_interface.h>

Inheritance diagram for IGlsStateManagerES20:
IGlsStateManager NonCopyable

Classes

struct  gl_LightSourceParameters
 

Public Member Functions

virtual void PushCustomShaderProgram (GlsEffect *effect, const GLboolean useProgramImmediately)=0
 
virtual void PopCustomShaderProgram (void)=0
 
virtual bool HasCustomShader (void) const =0
 
virtual void UpdateShaderProgram (const GLboolean forceUpdate)=0
 
virtual void UpdateShaderAttributes (void)=0
 
virtual void UpdateShaderUniforms (void)=0
 
- Public Member Functions inherited from IGlsStateManager
virtual void SetDefaultState (bool forceResetUnmanagedState=false)=0
 
virtual void LoadProjectionMatrixf (const GlsMatrixType &m)=0
 
virtual void LoadModelViewMatrixf (const GlsMatrixType &m)=0
 
virtual void MultModelViewMatrixf (const GlsMatrixType &m, const GLboolean pushMatrix)=0
 
virtual void TranslateModelViewMatrixf (GLfloat x, GLfloat y, GLfloat z)=0
 
virtual void PushModelViewMatrix (void)=0
 
virtual void PopModelViewMatrix (void)=0
 
virtual void LoadTextureMatrixf (const GlsMatrixType &m)=0
 
virtual void ScaleTextureMatrixf (GLfloat x, GLfloat y, GLfloat z)=0
 
virtual void TranslateTextureMatrixf (GLfloat x, GLfloat y, GLfloat z)=0
 
virtual void PushTextureMatrix (void)=0
 
virtual void PopTextureMatrix (void)=0
 
virtual void DrawArrays (const GLenum mode, const GLint first, const GLsizei count)=0
 
virtual void DrawElements (const GLenum mode, const GLsizei count, const GLenum type, const GLvoid *indices)=0
 

Protected Member Functions

 IGlsStateManagerES20 (void)
 
 ~IGlsStateManagerES20 ()
 
- Protected Member Functions inherited from IGlsStateManager
 IGlsStateManager (void)
 
 ~IGlsStateManager ()
 

Additional Inherited Members

- Public Types inherited from IGlsStateManager
enum  
 
enum  { MATRIX_STACK_DEPTH = 64u, PROJECTION_STACK_DEPTH = 64u, TEXTURE_STACK_DEPTH = 64u, CUSTOM_SHADER_PROGRAM_STACK_DEPTH = 64u }
 

Detailed Description

The interface to a state manager that manages the GL Studio runtime library's use of the OpenGL context, minimizing unnecessary state changes, and has support for managing shaders.

Constructor & Destructor Documentation

IGlsStateManagerES20 ( void  )
inlineprotected

empty ctor

~IGlsStateManagerES20 ( )
inlineprotected

empty dtor

Member Function Documentation

virtual bool HasCustomShader ( void  ) const
pure virtual

Returns true if there is at least one custom shader on the stack

virtual void PopCustomShaderProgram ( void  )
pure virtual

Pop the custom shader program stack enabling the next custom shader program on the stack if there is one

Precondition
number of custom shader programs is > 0
Postcondition
the custom shader program stack is popped enabling the next custom shader program on the stack if there is one
virtual void PushCustomShaderProgram ( GlsEffect effect,
const GLboolean  useProgramImmediately 
)
pure virtual

Enable the given custom shader program and push it to the top of the custom shader program stack

Parameters
effectcustom shader program
useProgramImmediatelyGL_TRUE if custom shader program should immediately be set as the active shader program else GL_FALSE to allow the state manager to set the program active when it is needed
Precondition
number of custom shader programs is < CUSTOM_SHADER_PROGRAM_STACK_DEPTH
Postcondition
the given custom shader program is at the top of the custom shader program stack and is enabled, it is set to the current active shader program if useProgramImmediately is GL_TRUE
virtual void UpdateShaderAttributes ( void  )
pure virtual

Update the attributes for the current shader as needed

Precondition
none
Postcondition
Appropriate attributes for the current shader are updated
virtual void UpdateShaderProgram ( const GLboolean  forceUpdate)
pure virtual

Select the appropriate shader program based on the current settings and update the current shader program if needed

Parameters
forceUpdateGL_TRUE to force uniforms to be updated as if shader program changed
Precondition
none
Postcondition
appropriate shader program based on the current settings is active
virtual void UpdateShaderUniforms ( void  )
pure virtual

Update the uniforms for the current shader as needed

Precondition
none
Postcondition
Appropriate uniforms for the current shader are updated

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