|
Open CASCADE Technology
6.7.1
|
This class is responsible for managing shader programs. More...
#include <OpenGl_ShaderManager.hxx>

Public Member Functions | |
| OpenGl_ShaderManager (OpenGl_Context *theContext) | |
| Creates new empty shader manager. More... | |
| virtual | ~OpenGl_ShaderManager () |
| Releases resources of shader manager. More... | |
| void | Create (const Handle< Graphic3d_ShaderProgram > &theProxy, TCollection_AsciiString &theShareKey, Handle< OpenGl_ShaderProgram > &theProgram) |
| Creates new shader program or re-use shared instance. More... | |
| void | Unregister (TCollection_AsciiString &theShareKey, Handle< OpenGl_ShaderProgram > &theProgram) |
| Unregisters specified shader program. More... | |
| const OpenGl_ShaderProgramList & | ShaderPrograms () const |
| Returns list of registered shader programs. More... | |
| Standard_Boolean | IsEmpty () const |
| Returns true if no program objects are registered in the manager. More... | |
| const OpenGl_LightSourceState & | LightSourceState () const |
| Returns current state of OCCT light sources. More... | |
| void | UpdateLightSourceStateTo (const OpenGl_ListOfLight *theLights) |
| Updates state of OCCT light sources. More... | |
| void | PushLightSourceState (const Handle< OpenGl_ShaderProgram > &theProgram) const |
| Pushes current state of OCCT light sources to specified program. More... | |
| const OpenGl_ProjectionState & | ProjectionState () const |
| Returns current state of OCCT projection transform. More... | |
| void | UpdateProjectionStateTo (const Tmatrix3 &theProjectionMatrix) |
| Updates state of OCCT projection transform. More... | |
| void | RevertProjectionStateTo (const Tmatrix3 &theProjectionMatrix) |
| Reverts state of OCCT projection transform. More... | |
| void | PushProjectionState (const Handle< OpenGl_ShaderProgram > &theProgram) const |
| Pushes current state of OCCT projection transform to specified program. More... | |
| const OpenGl_ModelWorldState & | ModelWorldState () const |
| Returns current state of OCCT model-world transform. More... | |
| void | UpdateModelWorldStateTo (const Tmatrix3 &theModelWorldMatrix) |
| Updates state of OCCT model-world transform. More... | |
| void | RevertModelWorldStateTo (const Tmatrix3 &theModelWorldMatrix) |
| Reverts state of OCCT model-world transform. More... | |
| void | PushModelWorldState (const Handle< OpenGl_ShaderProgram > &theProgram) const |
| Pushes current state of OCCT model-world transform to specified program. More... | |
| const OpenGl_WorldViewState & | WorldViewState () const |
| Returns current state of OCCT world-view transform. More... | |
| void | UpdateWorldViewStateTo (const Tmatrix3 &theWorldViewMatrix) |
| Updates state of OCCT world-view transform. More... | |
| void | RevertWorldViewStateTo (const Tmatrix3 &theWorldViewMatrix) |
| Reverts state of OCCT world-view transform. More... | |
| void | PushWorldViewState (const Handle< OpenGl_ShaderProgram > &theProgram) const |
| Pushes current state of OCCT world-view transform to specified program. More... | |
| void | UpdateClippingState () |
| Updates state of OCCT clipping planes. More... | |
| void | RevertClippingState () |
| Reverts state of OCCT clipping planes. More... | |
| void | PushClippingState (const Handle< OpenGl_ShaderProgram > &theProgram) const |
| Pushes current state of OCCT clipping planes to specified program. More... | |
| void | ResetMaterialStates () |
| Resets state of OCCT material for all programs. More... | |
| void | UpdateMaterialStateTo (const Handle< OpenGl_ShaderProgram > &theProgram, const OpenGl_Element *theAspect) |
| Updates state of OCCT material for specified program. More... | |
| void | PushMaterialState (const Handle< OpenGl_ShaderProgram > &theProgram) const |
| Pushes current state of OCCT material to specified program. More... | |
| const OpenGl_MaterialState * | MaterialState (const Handle< OpenGl_ShaderProgram > &theProgram) const |
| Returns current state of OCCT material for specified program. More... | |
| void | PushState (const Handle< OpenGl_ShaderProgram > &theProgram) const |
| Pushes current state of OCCT graphics parameters to specified program. More... | |
| void | SetContext (OpenGl_Context *theCtx) |
| Overwrites context. More... | |
Public Member Functions inherited from Standard_Transient | |
| Standard_Transient () | |
| Empty constructor. More... | |
| Standard_Transient (const Standard_Transient &) | |
| Copy constructor – does nothing. More... | |
| Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter. More... | |
| virtual | ~Standard_Transient () |
| Destructor must be virtual. More... | |
| virtual void | Delete () const |
| Memory deallocator for transient classes. More... | |
| virtual void | ShallowDump (Standard_OStream &) const |
| virtual const Handle_Standard_Type & | DynamicType () const |
| Returns a type information object about this object. More... | |
| Standard_Boolean | IsInstance (const Handle_Standard_Type &theType) const |
| Returns a true value if this is an instance of Type. More... | |
| Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
| Returns a true value if this is an instance of TypeName. More... | |
| Standard_Boolean | IsKind (const Handle_Standard_Type &theType) const |
| Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
| Standard_Boolean | IsKind (const Standard_CString theTypeName) const |
| Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
| virtual Handle_Standard_Transient | This () const |
| Returns a Handle which references this object. Must never be called to objects created in stack. More... | |
| Standard_Integer | GetRefCount () const |
| Get the reference counter of this object. More... | |
Protected Attributes | |
| OpenGl_MaterialStates | myMaterialStates |
| Per-program state of OCCT material. More... | |
| OpenGl_ProjectionState | myProjectionState |
| State of OCCT projection transformation. More... | |
| OpenGl_ModelWorldState | myModelWorldState |
| State of OCCT model-world transformation. More... | |
| OpenGl_WorldViewState | myWorldViewState |
| State of OCCT world-view transformation. More... | |
| OpenGl_LightSourceState | myClippingState |
| State of OCCT clipping planes. More... | |
| OpenGl_LightSourceState | myLightSourceState |
| State of OCCT light sources. More... | |
| OpenGl_ShaderProgramList | myProgramList |
| The list of shader programs. More... | |
| OpenGl_Context * | myContext |
| The OpenGL context. More... | |
This class is responsible for managing shader programs.
| OpenGl_ShaderManager::OpenGl_ShaderManager | ( | OpenGl_Context * | theContext | ) |
Creates new empty shader manager.
|
virtual |
Releases resources of shader manager.
| void OpenGl_ShaderManager::Create | ( | const Handle< Graphic3d_ShaderProgram > & | theProxy, |
| TCollection_AsciiString & | theShareKey, | ||
| Handle< OpenGl_ShaderProgram > & | theProgram | ||
| ) |
Creates new shader program or re-use shared instance.
| theProxy | [IN] program definition |
| theShareKey | [OUT] sharing key |
| theProgram | [OUT] OpenGL program |
| Standard_Boolean OpenGl_ShaderManager::IsEmpty | ( | ) | const |
Returns true if no program objects are registered in the manager.
| const OpenGl_LightSourceState& OpenGl_ShaderManager::LightSourceState | ( | ) | const |
Returns current state of OCCT light sources.
| const OpenGl_MaterialState* OpenGl_ShaderManager::MaterialState | ( | const Handle< OpenGl_ShaderProgram > & | theProgram | ) | const |
Returns current state of OCCT material for specified program.
| const OpenGl_ModelWorldState& OpenGl_ShaderManager::ModelWorldState | ( | ) | const |
Returns current state of OCCT model-world transform.
| const OpenGl_ProjectionState& OpenGl_ShaderManager::ProjectionState | ( | ) | const |
Returns current state of OCCT projection transform.
| void OpenGl_ShaderManager::PushClippingState | ( | const Handle< OpenGl_ShaderProgram > & | theProgram | ) | const |
Pushes current state of OCCT clipping planes to specified program.
| void OpenGl_ShaderManager::PushLightSourceState | ( | const Handle< OpenGl_ShaderProgram > & | theProgram | ) | const |
Pushes current state of OCCT light sources to specified program.
| void OpenGl_ShaderManager::PushMaterialState | ( | const Handle< OpenGl_ShaderProgram > & | theProgram | ) | const |
Pushes current state of OCCT material to specified program.
| void OpenGl_ShaderManager::PushModelWorldState | ( | const Handle< OpenGl_ShaderProgram > & | theProgram | ) | const |
Pushes current state of OCCT model-world transform to specified program.
| void OpenGl_ShaderManager::PushProjectionState | ( | const Handle< OpenGl_ShaderProgram > & | theProgram | ) | const |
Pushes current state of OCCT projection transform to specified program.
| void OpenGl_ShaderManager::PushState | ( | const Handle< OpenGl_ShaderProgram > & | theProgram | ) | const |
Pushes current state of OCCT graphics parameters to specified program.
| void OpenGl_ShaderManager::PushWorldViewState | ( | const Handle< OpenGl_ShaderProgram > & | theProgram | ) | const |
Pushes current state of OCCT world-view transform to specified program.
| void OpenGl_ShaderManager::ResetMaterialStates | ( | ) |
Resets state of OCCT material for all programs.
| void OpenGl_ShaderManager::RevertClippingState | ( | ) |
Reverts state of OCCT clipping planes.
| void OpenGl_ShaderManager::RevertModelWorldStateTo | ( | const Tmatrix3 & | theModelWorldMatrix | ) |
Reverts state of OCCT model-world transform.
| void OpenGl_ShaderManager::RevertProjectionStateTo | ( | const Tmatrix3 & | theProjectionMatrix | ) |
Reverts state of OCCT projection transform.
| void OpenGl_ShaderManager::RevertWorldViewStateTo | ( | const Tmatrix3 & | theWorldViewMatrix | ) |
Reverts state of OCCT world-view transform.
|
inline |
Overwrites context.
| const OpenGl_ShaderProgramList& OpenGl_ShaderManager::ShaderPrograms | ( | ) | const |
Returns list of registered shader programs.
| void OpenGl_ShaderManager::Unregister | ( | TCollection_AsciiString & | theShareKey, |
| Handle< OpenGl_ShaderProgram > & | theProgram | ||
| ) |
Unregisters specified shader program.
| void OpenGl_ShaderManager::UpdateClippingState | ( | ) |
Updates state of OCCT clipping planes.
| void OpenGl_ShaderManager::UpdateLightSourceStateTo | ( | const OpenGl_ListOfLight * | theLights | ) |
Updates state of OCCT light sources.
| void OpenGl_ShaderManager::UpdateMaterialStateTo | ( | const Handle< OpenGl_ShaderProgram > & | theProgram, |
| const OpenGl_Element * | theAspect | ||
| ) |
Updates state of OCCT material for specified program.
| void OpenGl_ShaderManager::UpdateModelWorldStateTo | ( | const Tmatrix3 & | theModelWorldMatrix | ) |
Updates state of OCCT model-world transform.
| void OpenGl_ShaderManager::UpdateProjectionStateTo | ( | const Tmatrix3 & | theProjectionMatrix | ) |
Updates state of OCCT projection transform.
| void OpenGl_ShaderManager::UpdateWorldViewStateTo | ( | const Tmatrix3 & | theWorldViewMatrix | ) |
Updates state of OCCT world-view transform.
| const OpenGl_WorldViewState& OpenGl_ShaderManager::WorldViewState | ( | ) | const |
Returns current state of OCCT world-view transform.
|
protected |
State of OCCT clipping planes.
|
protected |
The OpenGL context.
|
protected |
State of OCCT light sources.
|
protected |
Per-program state of OCCT material.
|
protected |
State of OCCT model-world transformation.
|
protected |
The list of shader programs.
|
protected |
State of OCCT projection transformation.
|
protected |
State of OCCT world-view transformation.
1.8.5