|
| OpenGl_ShaderManager (OpenGl_Context *theContext) |
| Creates new empty shader manager. More...
|
|
virtual | ~OpenGl_ShaderManager () |
| Releases resources of shader manager. More...
|
|
void | clear () |
| Release all resources. More...
|
|
const gp_XYZ & | LocalOrigin () const |
| Return local camera transformation. More...
|
|
void | SetLocalOrigin (const gp_XYZ &theOrigin) |
| Setup local camera transformation for compensating float precision issues. More...
|
|
Standard_Boolean | 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...
|
|
Standard_Boolean | BindFaceProgram (const Handle< OpenGl_TextureSet > &theTextures, const Graphic3d_TypeOfShadingModel theShadingModel, const Graphic3d_AlphaMode theAlphaMode, const Standard_Boolean theHasVertColor, const Standard_Boolean theEnableEnvMap, const Handle< OpenGl_ShaderProgram > &theCustomProgram) |
| Bind program for filled primitives rendering. More...
|
|
Standard_Boolean | BindLineProgram (const Handle< OpenGl_TextureSet > &theTextures, const Aspect_TypeOfLine theLineType, const Graphic3d_TypeOfShadingModel theShadingModel, const Graphic3d_AlphaMode theAlphaMode, const Standard_Boolean theHasVertColor, const Handle< OpenGl_ShaderProgram > &theCustomProgram) |
| Bind program for line rendering. More...
|
|
Standard_Boolean | BindMarkerProgram (const Handle< OpenGl_TextureSet > &theTextures, const Graphic3d_TypeOfShadingModel theShadingModel, const Graphic3d_AlphaMode theAlphaMode, const Standard_Boolean theHasVertColor, const Handle< OpenGl_ShaderProgram > &theCustomProgram) |
| Bind program for point rendering. More...
|
|
Standard_Boolean | BindFontProgram (const Handle< OpenGl_ShaderProgram > &theCustomProgram) |
| Bind program for rendering alpha-textured font. More...
|
|
Standard_Boolean | BindFboBlitProgram () |
| Bind program for FBO blit operation. More...
|
|
Standard_Boolean | BindOitCompositingProgram (const Standard_Boolean theIsMSAAEnabled) |
| Bind program for blended order-independent transparency buffers compositing. More...
|
|
Standard_Boolean | BindStereoProgram (const Graphic3d_StereoMode theStereoMode) |
| Bind program for rendering stereoscopic image. More...
|
|
const OpenGl_LightSourceState & | LightSourceState () const |
| Returns current state of OCCT light sources. More...
|
|
void | UpdateLightSourceStateTo (const Handle< Graphic3d_LightSet > &theLights) |
| Updates state of OCCT light sources. More...
|
|
void | UpdateLightSourceState () |
| Invalidate 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 OpenGl_Mat4 &theProjectionMatrix) |
| Updates 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 OpenGl_Mat4 &theModelWorldMatrix) |
| Updates 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 OpenGl_Mat4 &theWorldViewMatrix) |
| Updates 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...
|
|
const OpenGl_MaterialState & | MaterialState () const |
| Returns current state of material. More...
|
|
void | UpdateMaterialStateTo (const OpenGl_Material &theFrontMat, const OpenGl_Material &theBackMat, const float theAlphaCutoff, const bool theToDistinguish, const bool theToMapTexture) |
| Updates state of material. More...
|
|
void | UpdateMaterialState () |
| Updates state of material. More...
|
|
void | PushMaterialState (const Handle< OpenGl_ShaderProgram > &theProgram) const |
| Pushes current state of material to specified program. More...
|
|
const OpenGl_OitState & | OitState () const |
| Returns state of OIT uniforms. More...
|
|
void | SetOitState (const bool theToEnableOitWrite, const float theDepthFactor) |
| Set the state of OIT rendering pass. More...
|
|
void | PushOitState (const Handle< OpenGl_ShaderProgram > &theProgram) const |
| Pushes state of OIT uniforms to the 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...
|
|
bool | IsSameContext (OpenGl_Context *theCtx) const |
| Returns true when provided context is the same as used one by shader manager. More...
|
|
Graphic3d_TypeOfShadingModel | ChooseFaceShadingModel (Graphic3d_TypeOfShadingModel theCustomModel, bool theHasNodalNormals) const |
| Choose Shading Model for filled primitives. Fallbacks to FACET model if there are no normal attributes. More...
|
|
Graphic3d_TypeOfShadingModel | ChooseLineShadingModel (Graphic3d_TypeOfShadingModel theCustomModel, bool theHasNodalNormals) const |
| Choose Shading Model for line primitives. Fallbacks to UNLIT model if there are no normal attributes. More...
|
|
Graphic3d_TypeOfShadingModel | ChooseMarkerShadingModel (Graphic3d_TypeOfShadingModel theCustomModel, bool theHasNodalNormals) const |
| Choose Shading Model for Marker primitives. More...
|
|
Graphic3d_TypeOfShadingModel | ShadingModel () const |
| Returns default Shading Model. More...
|
|
void | SetShadingModel (const Graphic3d_TypeOfShadingModel theModel) |
| Sets shading model. More...
|
|
void | SetLastView (const OpenGl_View *theLastView) |
| Sets last view manger used with. Helps to handle matrix states in multi-view configurations. More...
|
|
bool | IsSameView (const OpenGl_View *theView) const |
| Returns true when provided view is the same as cached one. 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 const opencascade::handle< Standard_Type > & | DynamicType () const |
| Returns a type descriptor about this object. More...
|
|
Standard_Boolean | IsInstance (const opencascade::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 opencascade::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...
|
|
Standard_Transient * | This () const |
| Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...
|
|
Standard_Integer | GetRefCount () const |
| Get the reference counter of this object. More...
|
|
void | IncrementRefCounter () const |
| Increments the reference counter of this object. More...
|
|
Standard_Integer | DecrementRefCounter () const |
| Decrements the reference counter of this object; returns the decremented value. More...
|
|
|
Standard_Integer | getProgramBits (const Handle< OpenGl_TextureSet > &theTextures, Graphic3d_AlphaMode theAlphaMode, Standard_Boolean theHasVertColor, Standard_Boolean theEnableEnvMap) |
| Define program bits. More...
|
|
Handle< OpenGl_ShaderProgram > & | getStdProgram (Graphic3d_TypeOfShadingModel theShadingModel, Standard_Integer theBits) |
| Prepare standard GLSL program. More...
|
|
TCollection_AsciiString | pointSpriteAlphaSrc (const Standard_Integer theBits) |
| Prepare standard GLSL program for accessing point sprite alpha. More...
|
|
TCollection_AsciiString | pointSpriteShadingSrc (const TCollection_AsciiString theBaseColorSrc, const Standard_Integer theBits) |
| Prepare standard GLSL program for computing point sprite shading. More...
|
|
Standard_Boolean | prepareStdProgramFont () |
| Prepare standard GLSL program for textured font. More...
|
|
Standard_Boolean | prepareStdProgramFboBlit () |
| Prepare standard GLSL program for FBO blit operation. More...
|
|
Standard_Boolean | prepareStdProgramOitCompositing (const Standard_Boolean theMsaa) |
| Prepare standard GLSL programs for OIT compositing operation. More...
|
|
Standard_Boolean | prepareStdProgramUnlit (Handle< OpenGl_ShaderProgram > &theProgram, const Standard_Integer theBits) |
| Prepare standard GLSL program without lighting. More...
|
|
Standard_Boolean | prepareStdProgramLight (Handle< OpenGl_ShaderProgram > &theProgram, Graphic3d_TypeOfShadingModel theShadingModel, Standard_Integer theBits) |
| Prepare standard GLSL program with lighting. More...
|
|
Standard_Boolean | prepareStdProgramGouraud (Handle< OpenGl_ShaderProgram > &theProgram, const Standard_Integer theBits) |
| Prepare standard GLSL program with per-vertex lighting. More...
|
|
Standard_Boolean | prepareStdProgramPhong (Handle< OpenGl_ShaderProgram > &theProgram, const Standard_Integer theBits, const Standard_Boolean theIsFlatNormal=false) |
| Prepare standard GLSL program with per-pixel lighting. More...
|
|
TCollection_AsciiString | stdComputeLighting (Standard_Integer &theNbLights, Standard_Boolean theHasVertColor) |
| Define computeLighting GLSL function depending on current lights configuration. More...
|
|
Standard_Boolean | bindProgramWithState (const Handle< OpenGl_ShaderProgram > &theProgram) |
| Bind specified program to current context and apply state. More...
|
|
void | switchLightPrograms () |
| Set pointer myLightPrograms to active lighting programs set from myMapOfLightPrograms. More...
|
|
Standard_Boolean | prepareStdProgramStereo (Handle< OpenGl_ShaderProgram > &theProgram, const Graphic3d_StereoMode theStereoMode) |
| Prepare standard GLSL program for stereoscopic image. More...
|
|
This class is responsible for managing shader programs.