Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Data Structures | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
OpenGl_ShaderManager Class Reference

List of shader programs. More...

#include <OpenGl_ShaderManager.hxx>

Inheritance diagram for OpenGl_ShaderManager:
Inheritance graph
[legend]

Data Structures

struct  OpenGl_ShaderLightParameters
 Packed properties of light source. More...
 
class  OpenGl_ShaderProgramFFP
 Fake OpenGL program for tracking FFP state in the way consistent to programmable pipeline. More...
 

Public Member Functions

 OpenGl_ShaderManager (OpenGl_Context *theContext)
 Creates new empty shader manager.
 
 ~OpenGl_ShaderManager () override
 Releases resources of shader manager.
 
void clear ()
 Release all resources.
 
void UpdateSRgbState ()
 Fetch sRGB state from caps and invalidates programs, if necessary.
 
const gp_XYZLocalOrigin () const
 Return local camera transformation.
 
void SetLocalOrigin (const gp_XYZ &theOrigin)
 Setup local camera transformation for compensating float precision issues.
 
double LocalClippingPlaneW (const Graphic3d_ClipPlane &thePlane) const
 Return clipping plane W equation value moved considering local camera transformation.
 
bool Create (const occ::handle< Graphic3d_ShaderProgram > &theProxy, TCollection_AsciiString &theShareKey, occ::handle< OpenGl_ShaderProgram > &theProgram)
 Creates new shader program or re-use shared instance.
 
void Unregister (TCollection_AsciiString &theShareKey, occ::handle< OpenGl_ShaderProgram > &theProgram)
 Unregisters specified shader program.
 
const NCollection_Sequence< occ::handle< OpenGl_ShaderProgram > > & ShaderPrograms () const
 Returns list of registered shader programs.
 
bool IsEmpty () const
 Returns true if no program objects are registered in the manager.
 
bool BindFaceProgram (const occ::handle< OpenGl_TextureSet > &theTextures, Graphic3d_TypeOfShadingModel theShadingModel, Graphic3d_AlphaMode theAlphaMode, bool theHasVertColor, bool theEnableEnvMap, const occ::handle< OpenGl_ShaderProgram > &theCustomProgram)
 Bind program for filled primitives rendering.
 
bool BindFaceProgram (const occ::handle< OpenGl_TextureSet > &theTextures, Graphic3d_TypeOfShadingModel theShadingModel, Graphic3d_AlphaMode theAlphaMode, Aspect_InteriorStyle theInteriorStyle, bool theHasVertColor, bool theEnableEnvMap, bool theEnableMeshEdges, const occ::handle< OpenGl_ShaderProgram > &theCustomProgram)
 Bind program for filled primitives rendering.
 
bool BindLineProgram (const occ::handle< OpenGl_TextureSet > &theTextures, const Aspect_TypeOfLine theLineType, const Graphic3d_TypeOfShadingModel theShadingModel, const Graphic3d_AlphaMode theAlphaMode, const bool theHasVertColor, const occ::handle< OpenGl_ShaderProgram > &theCustomProgram)
 Bind program for line rendering.
 
bool BindMarkerProgram (const occ::handle< OpenGl_TextureSet > &theTextures, Graphic3d_TypeOfShadingModel theShadingModel, Graphic3d_AlphaMode theAlphaMode, bool theHasVertColor, const occ::handle< OpenGl_ShaderProgram > &theCustomProgram)
 Bind program for point rendering.
 
bool BindFontProgram (const occ::handle< OpenGl_ShaderProgram > &theCustomProgram)
 Bind program for rendering alpha-textured font.
 
bool BindOutlineProgram ()
 Bind program for outline rendering.
 
bool BindFboBlitProgram (int theNbSamples, bool theIsFallback_sRGB)
 Bind program for FBO blit operation.
 
bool BindOitCompositingProgram (bool theIsMSAAEnabled)
 Bind program for blended order-independent transparency buffers compositing.
 
bool BindOitDepthPeelingBlendProgram (bool theIsMSAAEnabled)
 Bind program for Depth Peeling order-independent transparency back color blending.
 
bool BindOitDepthPeelingFlushProgram (bool theIsMSAAEnabled)
 Bind program for Depth Peeling order-independent transparency flush.
 
bool BindStereoProgram (Graphic3d_StereoMode theStereoMode)
 Bind program for rendering stereoscopic image.
 
bool BindBoundBoxProgram ()
 Bind program for rendering bounding box.
 
const occ::handle< OpenGl_VertexBuffer > & BoundBoxVertBuffer () const
 Returns bounding box vertex buffer.
 
bool BindPBREnvBakingProgram (int theIndex)
 Bind program for IBL maps generation in PBR pipeline.
 
const occ::handle< Graphic3d_ShaderProgram > & GetBgCubeMapProgram ()
 Generates shader program to render environment cubemap as background.
 
const occ::handle< Graphic3d_ShaderProgram > & GetBgSkydomeProgram ()
 Generates shader program to render skydome background.
 
const occ::handle< Graphic3d_ShaderProgram > & GetColoredQuadProgram ()
 Generates shader program to render correctly colored quad.
 
bool BindGridProgram ()
 Compile (once) and bind the GPU grid shader program. Returns FALSE if shader compilation fails or the GAPI is not supported.
 
const OpenGl_LightSourceStateLightSourceState () const
 Returns current state of OCCT light sources.
 
void UpdateLightSourceStateTo (const occ::handle< Graphic3d_LightSet > &theLights, int theSpecIBLMapLevels, const occ::handle< OpenGl_ShadowMapArray > &theShadowMaps)
 Updates state of OCCT light sources.
 
bool SetCastShadows (const bool theToCast)
 Updates state of OCCT light sources to dynamically enable/disable shadowmap.
 
void UpdateLightSourceState ()
 Invalidate state of OCCT light sources.
 
void PushLightSourceState (const occ::handle< OpenGl_ShaderProgram > &theProgram) const
 Pushes current state of OCCT light sources to specified program (only on state change). Note that light sources definition depends also on WorldViewState.
 
void pushLightSourceState (const occ::handle< OpenGl_ShaderProgram > &theProgram) const
 Pushes current state of OCCT light sources to specified program.
 
const OpenGl_ProjectionStateProjectionState () const
 Returns current state of OCCT projection transform.
 
void UpdateProjectionStateTo (const NCollection_Mat4< float > &theProjectionMatrix)
 Updates state of OCCT projection transform.
 
void PushProjectionState (const occ::handle< OpenGl_ShaderProgram > &theProgram) const
 Pushes current state of OCCT projection transform to specified program (only on state change).
 
void pushProjectionState (const occ::handle< OpenGl_ShaderProgram > &theProgram) const
 Pushes current state of OCCT projection transform to specified program.
 
const OpenGl_ModelWorldStateModelWorldState () const
 Returns current state of OCCT model-world transform.
 
void UpdateModelWorldStateTo (const NCollection_Mat4< float > &theModelWorldMatrix)
 Updates state of OCCT model-world transform.
 
void PushModelWorldState (const occ::handle< OpenGl_ShaderProgram > &theProgram) const
 Pushes current state of OCCT model-world transform to specified program (only on state change).
 
void pushModelWorldState (const occ::handle< OpenGl_ShaderProgram > &theProgram) const
 Pushes current state of OCCT model-world transform to specified program.
 
const OpenGl_WorldViewStateWorldViewState () const
 Returns current state of OCCT world-view transform.
 
void UpdateWorldViewStateTo (const NCollection_Mat4< float > &theWorldViewMatrix)
 Updates state of OCCT world-view transform.
 
void PushWorldViewState (const occ::handle< OpenGl_ShaderProgram > &theProgram) const
 Pushes current state of OCCT world-view transform to specified program (only on state change).
 
void pushWorldViewState (const occ::handle< OpenGl_ShaderProgram > &theProgram) const
 Pushes current state of OCCT world-view transform to specified program.
 
void UpdateClippingState ()
 Updates state of OCCT clipping planes.
 
void RevertClippingState ()
 Reverts state of OCCT clipping planes.
 
void PushClippingState (const occ::handle< OpenGl_ShaderProgram > &theProgram) const
 Pushes current state of OCCT clipping planes to specified program (only on state change).
 
void pushClippingState (const occ::handle< OpenGl_ShaderProgram > &theProgram) const
 Pushes current state of OCCT clipping planes to specified program.
 
const OpenGl_MaterialStateMaterialState () const
 Returns current state of material.
 
void UpdateMaterialStateTo (const OpenGl_Material &theMat, const float theAlphaCutoff, const bool theToDistinguish, const bool theToMapTexture)
 Updates state of material.
 
void UpdateMaterialState ()
 Updates state of material.
 
void PushMaterialState (const occ::handle< OpenGl_ShaderProgram > &theProgram) const
 Pushes current state of material to specified program (only on state change).
 
void pushMaterialState (const occ::handle< OpenGl_ShaderProgram > &theProgram) const
 Pushes current state of material to specified program.
 
void PushInteriorState (const occ::handle< OpenGl_ShaderProgram > &theProgram, const occ::handle< Graphic3d_Aspects > &theAspect) const
 Setup interior style line edges variables.
 
const OpenGl_OitStateOitState () const
 Returns state of OIT uniforms.
 
void ResetOitState ()
 Reset the state of OIT rendering pass (only on state change).
 
void SetOitState (Graphic3d_RenderTransparentMethod theMode)
 Set the state of OIT rendering pass (only on state change).
 
void SetWeighedOitState (float theDepthFactor)
 Set the state of weighed OIT rendering pass (only on state change).
 
void PushOitState (const occ::handle< OpenGl_ShaderProgram > &theProgram) const
 Pushes state of OIT uniforms to the specified program.
 
void pushOitState (const occ::handle< OpenGl_ShaderProgram > &theProgram) const
 Pushes state of OIT uniforms to the specified program.
 
void PushState (const occ::handle< OpenGl_ShaderProgram > &theProgram, Graphic3d_TypeOfShadingModel theShadingModel=Graphic3d_TypeOfShadingModel_Unlit) const
 Pushes current state of OCCT graphics parameters to specified program.
 
void SetContext (OpenGl_Context *theCtx)
 Overwrites context.
 
bool IsSameContext (OpenGl_Context *theCtx) const
 Returns true when provided context is the same as used one by shader manager.
 
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. Fallbacks to corresponding non-PBR models if PBR is unavailable.
 
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. Fallbacks to corresponding non-PBR models if PBR is unavailable.
 
Graphic3d_TypeOfShadingModel ChooseMarkerShadingModel (Graphic3d_TypeOfShadingModel theCustomModel, bool theHasNodalNormals) const
 Choose Shading Model for Marker primitives.
 
Graphic3d_TypeOfShadingModel ShadingModel () const
 Returns default Shading Model.
 
void SetShadingModel (const Graphic3d_TypeOfShadingModel theModel)
 Sets shading model.
 
- Public Member Functions inherited from Graphic3d_ShaderManager
 Graphic3d_ShaderManager (Aspect_GraphicsLibrary theGapi)
 Creates new empty shader manager.
 
 ~Graphic3d_ShaderManager () override
 Releases resources of shader manager.
 
bool IsGapiGreaterEqual (int theVerMajor, int theVerMinor) const
 
int GapiVersionMajor () const
 Return GAPI version major number.
 
int GapiVersionMinor () const
 Return GAPI version minor number.
 
void SetGapiVersion (int theVerMajor, int theVerMinor)
 Return GAPI version major number.
 
bool UseRedAlpha () const
 Return TRUE if RED channel should be used instead of ALPHA for single-channel textures (e.g. GAPI supports only GL_RED textures and not GL_ALPHA).
 
void SetUseRedAlpha (bool theUseRedAlpha)
 Set if RED channel should be used instead of ALPHA for single-channel textures.
 
bool HasFlatShading () const
 Return flag indicating flat shading usage; TRUE by default.
 
bool ToReverseDFdxSign () const
 Return flag indicating flat shading should reverse normal flag; FALSE by default.
 
void SetFlatShading (bool theToUse, bool theToReverseSign)
 Set flag indicating flat shading usage.
 
bool ToEmulateDepthClamp () const
 Return TRUE if depth clamping should be emulated by GLSL program; TRUE by default.
 
void SetEmulateDepthClamp (bool theToEmulate)
 Set if depth clamping should be emulated by GLSL program.
 
bool HasGlslExtension (Graphic3d_GlslExtension theExt) const
 Return TRUE if specified extension is available.
 
void EnableGlslExtension (Graphic3d_GlslExtension theExt, bool theToEnable=true)
 Set if specified extension is available or not.
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor.
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing.
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter.
 
virtual ~Standard_Transient ()=default
 Destructor must be virtual.
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object.
 
bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type.
 
bool IsInstance (const char *const theTypeName) const
 Returns a true value if this is an instance of TypeName.
 
bool 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.
 
bool IsKind (const char *const 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.
 
Standard_TransientThis () 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.
 
int GetRefCount () const noexcept
 Get the reference counter of this object.
 
void IncrementRefCounter () noexcept
 Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
 
int DecrementRefCounter () noexcept
 Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
 
virtual void Delete () const
 Memory deallocator for transient classes.
 

Static Public Member Functions

static Graphic3d_TypeOfShadingModel PBRShadingModelFallback (Graphic3d_TypeOfShadingModel theShadingModel, bool theIsPbrAllowed=false)
 Resets PBR shading models to corresponding non-PBR ones if PBR is not allowed.
 
- Static Public Member Functions inherited from Standard_Transient
static constexpr const charget_type_name ()
 Returns a type descriptor about this object.
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class.
 

Protected Member Functions

int getClipPlaneBits () const
 Define clipping planes program bits.
 
int getProgramBits (const occ::handle< OpenGl_TextureSet > &theTextures, Graphic3d_AlphaMode theAlphaMode, Aspect_InteriorStyle theInteriorStyle, bool theHasVertColor, bool theEnableEnvMap, bool theEnableMeshEdges) const
 Define program bits.
 
occ::handle< OpenGl_ShaderProgram > & getStdProgram (Graphic3d_TypeOfShadingModel theShadingModel, int theBits)
 Prepare standard GLSL program.
 
bool prepareStdProgramUnlit (occ::handle< OpenGl_ShaderProgram > &theProgram, int theBits, bool theIsOutline=false)
 Prepare standard GLSL program without lighting.
 
bool prepareStdProgramLight (occ::handle< OpenGl_ShaderProgram > &theProgram, Graphic3d_TypeOfShadingModel theShadingModel, int theBits)
 Prepare standard GLSL program with lighting.
 
bool prepareStdProgramGouraud (occ::handle< OpenGl_ShaderProgram > &theProgram, const int theBits)
 Prepare standard GLSL program with per-vertex lighting.
 
bool prepareStdProgramPhong (occ::handle< OpenGl_ShaderProgram > &theProgram, const int theBits, const bool theIsFlatNormal=false, const bool theIsPBR=false)
 Prepare standard GLSL program with per-pixel lighting.
 
bool bindProgramWithState (const occ::handle< OpenGl_ShaderProgram > &theProgram, Graphic3d_TypeOfShadingModel theShadingModel)
 Bind specified program to current context and apply state.
 
void switchLightPrograms ()
 Set pointer myLightPrograms to active lighting programs set from myMapOfLightPrograms.
 
bool prepareStdProgramBoundBox ()
 Prepare standard GLSL program for bounding box.
 
bool preparePBREnvBakingProgram (int theIndex)
 Prepare GLSL source for IBL generation used in PBR pipeline.
 
bool IsPbrAllowed () const
 Checks whether one of PBR shading models is set as default model.
 
void addClippingPlane (int &thePlaneId, const Graphic3d_ClipPlane &thePlane, const NCollection_Vec4< double > &theEq, const int theChainFwd) const
 Append clipping plane definition to temporary buffers.
 
- Protected Member Functions inherited from Graphic3d_ShaderManager
TCollection_AsciiString genLightKey (const occ::handle< Graphic3d_LightSet > &theLights, const bool theHasShadowMap) const
 Generate map key for light sources configuration.
 
occ::handle< Graphic3d_ShaderProgramgetStdProgramFont () const
 Prepare standard GLSL program for textured font.
 
occ::handle< Graphic3d_ShaderProgramgetStdProgramUnlit (int theBits, bool theIsOutline=false) const
 Prepare standard GLSL program without lighting.
 
occ::handle< Graphic3d_ShaderProgramgetStdProgramGouraud (const occ::handle< Graphic3d_LightSet > &theLights, int theBits) const
 Prepare standard GLSL program with per-vertex lighting.
 
occ::handle< Graphic3d_ShaderProgramgetStdProgramPhong (const occ::handle< Graphic3d_LightSet > &theLights, const int theBits, const bool theIsFlatNormal, const bool theIsPBR, const int theNbShadowMaps) const
 Prepare standard GLSL program with per-pixel lighting.
 
occ::handle< Graphic3d_ShaderProgramgetStdProgramBoundBox () const
 Prepare standard GLSL program for bounding box.
 
occ::handle< Graphic3d_ShaderProgramgetBgCubeMapProgram () const
 Generates shader program to render environment cubemap as background.
 
occ::handle< Graphic3d_ShaderProgramgetBgSkydomeProgram () const
 Generates shader program to render skydome background.
 
occ::handle< Graphic3d_ShaderProgramgetColoredQuadProgram () const
 Generates shader program to render correctly colored quad.
 
occ::handle< Graphic3d_ShaderProgramgetGridProgram () const
 Generates shader program to render a GPU grid on an arbitrary plane. Uses a screen-space triangle unprojected to world rays and ray-plane intersection driven by uniforms uPlaneOrigin / uPlaneX / uPlaneY / uPlaneN.
 
occ::handle< Graphic3d_ShaderProgramgetPBREnvBakingProgram (int theIndex) const
 Prepare GLSL source for IBL generation used in PBR pipeline.
 
occ::handle< Graphic3d_ShaderProgramgetStdProgramFboBlit (int theNbSamples, bool theIsFallback_sRGB) const
 Prepare standard GLSL program for FBO blit operation.
 
occ::handle< Graphic3d_ShaderProgramgetStdProgramStereo (Graphic3d_StereoMode theStereoMode) const
 Prepare standard GLSL program for stereoscopic image.
 
occ::handle< Graphic3d_ShaderProgramgetStdProgramOitCompositing (bool theMsaa) const
 Prepare standard GLSL programs for OIT compositing operation.
 
occ::handle< Graphic3d_ShaderProgramgetStdProgramOitDepthPeelingBlend (bool theMsaa) const
 Prepare standard GLSL programs for OIT Depth Peeling blend operation.
 
occ::handle< Graphic3d_ShaderProgramgetStdProgramOitDepthPeelingFlush (bool theMsaa) const
 Prepare standard GLSL programs for OIT Depth Peeling flush operation.
 
bool hasGlslBitwiseOps () const
 Return TRUE if bitwise operations can be used in GLSL program.
 
int defaultGlslVersion (const occ::handle< Graphic3d_ShaderProgram > &theProgram, const TCollection_AsciiString &theName, int theBits, bool theUsesDerivates=false) const
 Prepare GLSL version header.
 
void defaultOitGlslVersion (const occ::handle< Graphic3d_ShaderProgram > &theProgram, const TCollection_AsciiString &theName, bool theMsaa) const
 Prepare GLSL version header for OIT composition programs.
 
TCollection_AsciiString pointSpriteAlphaSrc (int theBits) const
 Prepare standard GLSL program for accessing point sprite alpha.
 
TCollection_AsciiString pointSpriteShadingSrc (const TCollection_AsciiString &theBaseColorSrc, int theBits) const
 Prepare standard GLSL program for computing point sprite shading.
 
TCollection_AsciiString stdComputeLighting (int &theNbLights, const occ::handle< Graphic3d_LightSet > &theLights, bool theHasVertColor, bool theIsPBR, bool theHasTexColor, int theNbShadowMaps) const
 Define computeLighting GLSL function depending on current lights configuration.
 

Protected Attributes

occ::handle< OpenGl_ShaderProgramFFPmyFfpProgram
 
Graphic3d_TypeOfShadingModel myShadingModel
 lighting shading model
 
NCollection_Sequence< occ::handle< OpenGl_ShaderProgram > > myProgramList
 The list of shader programs.
 
occ::handle< OpenGl_SetOfShaderProgramsmyLightPrograms
 pointer to active lighting programs matrix
 
occ::handle< OpenGl_SetOfProgramsmyUnlitPrograms
 programs matrix without lighting
 
occ::handle< OpenGl_SetOfProgramsmyOutlinePrograms
 programs matrix without lighting for outline presentation
 
occ::handle< OpenGl_ShaderProgrammyFontProgram
 standard program for textured text
 
NCollection_Array1< occ::handle< OpenGl_ShaderProgram > > myBlitPrograms [2]
 standard program for FBO blit emulation
 
occ::handle< OpenGl_ShaderProgrammyBoundBoxProgram
 standard program for bounding box
 
occ::handle< OpenGl_ShaderProgrammyOitCompositingProgram [2]
 standard program for OIT compositing (default and MSAA).
 
occ::handle< OpenGl_ShaderProgrammyOitDepthPeelingBlendProgram [2]
 standard program for OIT Depth Peeling blend (default and MSAA)
 
occ::handle< OpenGl_ShaderProgrammyOitDepthPeelingFlushProgram [2]
 standard program for OIT Depth Peeling flush (default and MSAA)
 
NCollection_DataMap< TCollection_AsciiString, occ::handle< OpenGl_SetOfShaderPrograms > > myMapOfLightPrograms
 map of lighting programs depending on lights configuration
 
occ::handle< OpenGl_ShaderProgrammyPBREnvBakingProgram [3]
 programs for IBL maps generation used in PBR pipeline (0 for Diffuse; 1 for Specular; 2 for fallback)
 
occ::handle< Graphic3d_ShaderProgrammyBgCubeMapProgram
 program for background cubemap rendering
 
occ::handle< Graphic3d_ShaderProgrammyBgSkydomeProgram
 program for background cubemap rendering
 
occ::handle< Graphic3d_ShaderProgrammyColoredQuadProgram
 program for correct quad rendering
 
occ::handle< OpenGl_ShaderProgrammyGridProgram
 shader program for GPU grid
 
occ::handle< OpenGl_ShaderProgrammyStereoPrograms [Graphic3d_StereoMode_NB]
 standard stereo programs
 
occ::handle< OpenGl_VertexBuffermyBoundBoxVertBuffer
 bounding box vertex buffer
 
occ::handle< OpenGl_PBREnvironmentmyPBREnvironment
 manager of IBL maps used in PBR pipeline
 
OpenGl_ContextmyContext
 OpenGL context.
 
OpenGl_ProjectionState myProjectionState
 State of OCCT projection transformation.
 
OpenGl_ModelWorldState myModelWorldState
 State of OCCT model-world transformation.
 
OpenGl_WorldViewState myWorldViewState
 State of OCCT world-view transformation.
 
OpenGl_ClippingState myClippingState
 State of OCCT clipping planes.
 
OpenGl_LightSourceState myLightSourceState
 State of OCCT light sources.
 
OpenGl_MaterialState myMaterialState
 State of Front and Back materials.
 
OpenGl_OitState myOitState
 State of OIT uniforms.
 
gp_XYZ myLocalOrigin
 local camera transformation
 
bool myHasLocalOrigin
 flag indicating that local camera transformation has been set
 
NCollection_Array1< intmyLightTypeArray
 
NCollection_Array1< OpenGl_ShaderLightParametersmyLightParamsArray
 
NCollection_Array1< NCollection_Mat4< float > > myShadowMatArray
 
NCollection_Array1< NCollection_Vec4< float > > myClipPlaneArray
 
NCollection_Array1< NCollection_Vec4< double > > myClipPlaneArrayFfp
 
NCollection_Array1< intmyClipChainArray
 
- Protected Attributes inherited from Graphic3d_ShaderManager
Aspect_GraphicsLibrary myGapi
 GAPI name.
 
NCollection_Vec2< intmyGapiVersion
 GAPI version major/minor number pair.
 
bool myGlslExtensions [Graphic3d_GlslExtension_NB]
 
bool myHasFlatShading
 flag indicating flat shading usage
 
bool myToReverseDFdxSign
 flag to reverse flat shading normal (workaround)
 
bool mySetPointSize
 always set gl_PointSize variable
 
bool myUseRedAlpha
 use RED channel instead of ALPHA (e.g. GAPI supports only GL_RED textures and not GL_ALPHA)
 
bool myToEmulateDepthClamp
 emulate depth clamping in GLSL program
 
bool mySRgbState
 track sRGB state
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object.
 

Detailed Description

List of shader programs.

This class is responsible for managing shader programs.

Constructor & Destructor Documentation

◆ OpenGl_ShaderManager()

OpenGl_ShaderManager::OpenGl_ShaderManager ( OpenGl_Context * theContext)

Creates new empty shader manager.

◆ ~OpenGl_ShaderManager()

OpenGl_ShaderManager::~OpenGl_ShaderManager ( )
override

Releases resources of shader manager.

Member Function Documentation

◆ addClippingPlane()

void OpenGl_ShaderManager::addClippingPlane ( int & thePlaneId,
const Graphic3d_ClipPlane & thePlane,
const NCollection_Vec4< double > & theEq,
const int theChainFwd ) const
inlineprotected

Append clipping plane definition to temporary buffers.

◆ BindBoundBoxProgram()

bool OpenGl_ShaderManager::BindBoundBoxProgram ( )
inline

Bind program for rendering bounding box.

◆ BindFaceProgram() [1/2]

bool OpenGl_ShaderManager::BindFaceProgram ( const occ::handle< OpenGl_TextureSet > & theTextures,
Graphic3d_TypeOfShadingModel theShadingModel,
Graphic3d_AlphaMode theAlphaMode,
Aspect_InteriorStyle theInteriorStyle,
bool theHasVertColor,
bool theEnableEnvMap,
bool theEnableMeshEdges,
const occ::handle< OpenGl_ShaderProgram > & theCustomProgram )
inline

Bind program for filled primitives rendering.

◆ BindFaceProgram() [2/2]

bool OpenGl_ShaderManager::BindFaceProgram ( const occ::handle< OpenGl_TextureSet > & theTextures,
Graphic3d_TypeOfShadingModel theShadingModel,
Graphic3d_AlphaMode theAlphaMode,
bool theHasVertColor,
bool theEnableEnvMap,
const occ::handle< OpenGl_ShaderProgram > & theCustomProgram )
inline

Bind program for filled primitives rendering.

◆ BindFboBlitProgram()

bool OpenGl_ShaderManager::BindFboBlitProgram ( int theNbSamples,
bool theIsFallback_sRGB )

Bind program for FBO blit operation.

Parameters
[in]theNbSamplesnumber of samples within source MSAA texture
theIsFallback_sRGB[in]flag indicating that destination buffer is not sRGB-ready

◆ BindFontProgram()

bool OpenGl_ShaderManager::BindFontProgram ( const occ::handle< OpenGl_ShaderProgram > & theCustomProgram)

Bind program for rendering alpha-textured font.

◆ BindGridProgram()

bool OpenGl_ShaderManager::BindGridProgram ( )

Compile (once) and bind the GPU grid shader program. Returns FALSE if shader compilation fails or the GAPI is not supported.

◆ BindLineProgram()

bool OpenGl_ShaderManager::BindLineProgram ( const occ::handle< OpenGl_TextureSet > & theTextures,
const Aspect_TypeOfLine theLineType,
const Graphic3d_TypeOfShadingModel theShadingModel,
const Graphic3d_AlphaMode theAlphaMode,
const bool theHasVertColor,
const occ::handle< OpenGl_ShaderProgram > & theCustomProgram )
inline

Bind program for line rendering.

◆ BindMarkerProgram()

bool OpenGl_ShaderManager::BindMarkerProgram ( const occ::handle< OpenGl_TextureSet > & theTextures,
Graphic3d_TypeOfShadingModel theShadingModel,
Graphic3d_AlphaMode theAlphaMode,
bool theHasVertColor,
const occ::handle< OpenGl_ShaderProgram > & theCustomProgram )

Bind program for point rendering.

◆ BindOitCompositingProgram()

bool OpenGl_ShaderManager::BindOitCompositingProgram ( bool theIsMSAAEnabled)

Bind program for blended order-independent transparency buffers compositing.

◆ BindOitDepthPeelingBlendProgram()

bool OpenGl_ShaderManager::BindOitDepthPeelingBlendProgram ( bool theIsMSAAEnabled)

Bind program for Depth Peeling order-independent transparency back color blending.

◆ BindOitDepthPeelingFlushProgram()

bool OpenGl_ShaderManager::BindOitDepthPeelingFlushProgram ( bool theIsMSAAEnabled)

Bind program for Depth Peeling order-independent transparency flush.

◆ BindOutlineProgram()

bool OpenGl_ShaderManager::BindOutlineProgram ( )
inline

Bind program for outline rendering.

◆ BindPBREnvBakingProgram()

bool OpenGl_ShaderManager::BindPBREnvBakingProgram ( int theIndex)
inline

Bind program for IBL maps generation in PBR pipeline.

◆ bindProgramWithState()

bool OpenGl_ShaderManager::bindProgramWithState ( const occ::handle< OpenGl_ShaderProgram > & theProgram,
Graphic3d_TypeOfShadingModel theShadingModel )
protected

Bind specified program to current context and apply state.

◆ BindStereoProgram()

bool OpenGl_ShaderManager::BindStereoProgram ( Graphic3d_StereoMode theStereoMode)

Bind program for rendering stereoscopic image.

◆ BoundBoxVertBuffer()

const occ::handle< OpenGl_VertexBuffer > & OpenGl_ShaderManager::BoundBoxVertBuffer ( ) const
inline

Returns bounding box vertex buffer.

◆ ChooseFaceShadingModel()

Graphic3d_TypeOfShadingModel OpenGl_ShaderManager::ChooseFaceShadingModel ( Graphic3d_TypeOfShadingModel theCustomModel,
bool theHasNodalNormals ) const
inline

Choose Shading Model for filled primitives. Fallbacks to FACET model if there are no normal attributes. Fallbacks to corresponding non-PBR models if PBR is unavailable.

◆ ChooseLineShadingModel()

Graphic3d_TypeOfShadingModel OpenGl_ShaderManager::ChooseLineShadingModel ( Graphic3d_TypeOfShadingModel theCustomModel,
bool theHasNodalNormals ) const
inline

Choose Shading Model for line primitives. Fallbacks to UNLIT model if there are no normal attributes. Fallbacks to corresponding non-PBR models if PBR is unavailable.

◆ ChooseMarkerShadingModel()

Graphic3d_TypeOfShadingModel OpenGl_ShaderManager::ChooseMarkerShadingModel ( Graphic3d_TypeOfShadingModel theCustomModel,
bool theHasNodalNormals ) const
inline

Choose Shading Model for Marker primitives.

◆ clear()

void OpenGl_ShaderManager::clear ( )

Release all resources.

◆ Create()

bool OpenGl_ShaderManager::Create ( const occ::handle< Graphic3d_ShaderProgram > & theProxy,
TCollection_AsciiString & theShareKey,
occ::handle< OpenGl_ShaderProgram > & theProgram )

Creates new shader program or re-use shared instance.

Parameters
[in]theProxyprogram definition
[out]theShareKeysharing key
[out]theProgramOpenGL program
Returns
true on success

◆ GetBgCubeMapProgram()

const occ::handle< Graphic3d_ShaderProgram > & OpenGl_ShaderManager::GetBgCubeMapProgram ( )

Generates shader program to render environment cubemap as background.

◆ GetBgSkydomeProgram()

const occ::handle< Graphic3d_ShaderProgram > & OpenGl_ShaderManager::GetBgSkydomeProgram ( )

Generates shader program to render skydome background.

◆ getClipPlaneBits()

int OpenGl_ShaderManager::getClipPlaneBits ( ) const
inlineprotected

Define clipping planes program bits.

◆ GetColoredQuadProgram()

const occ::handle< Graphic3d_ShaderProgram > & OpenGl_ShaderManager::GetColoredQuadProgram ( )

Generates shader program to render correctly colored quad.

◆ getProgramBits()

int OpenGl_ShaderManager::getProgramBits ( const occ::handle< OpenGl_TextureSet > & theTextures,
Graphic3d_AlphaMode theAlphaMode,
Aspect_InteriorStyle theInteriorStyle,
bool theHasVertColor,
bool theEnableEnvMap,
bool theEnableMeshEdges ) const
inlineprotected

Define program bits.

◆ getStdProgram()

occ::handle< OpenGl_ShaderProgram > & OpenGl_ShaderManager::getStdProgram ( Graphic3d_TypeOfShadingModel theShadingModel,
int theBits )
inlineprotected

Prepare standard GLSL program.

◆ IsEmpty()

bool OpenGl_ShaderManager::IsEmpty ( ) const
inline

Returns true if no program objects are registered in the manager.

◆ IsPbrAllowed()

bool OpenGl_ShaderManager::IsPbrAllowed ( ) const
inlineprotected

Checks whether one of PBR shading models is set as default model.

◆ IsSameContext()

bool OpenGl_ShaderManager::IsSameContext ( OpenGl_Context * theCtx) const
inline

Returns true when provided context is the same as used one by shader manager.

◆ LightSourceState()

const OpenGl_LightSourceState & OpenGl_ShaderManager::LightSourceState ( ) const
inline

Returns current state of OCCT light sources.

◆ LocalClippingPlaneW()

double OpenGl_ShaderManager::LocalClippingPlaneW ( const Graphic3d_ClipPlane & thePlane) const
inline

Return clipping plane W equation value moved considering local camera transformation.

◆ LocalOrigin()

const gp_XYZ & OpenGl_ShaderManager::LocalOrigin ( ) const
inline

Return local camera transformation.

◆ MaterialState()

const OpenGl_MaterialState & OpenGl_ShaderManager::MaterialState ( ) const
inline

Returns current state of material.

◆ ModelWorldState()

const OpenGl_ModelWorldState & OpenGl_ShaderManager::ModelWorldState ( ) const
inline

Returns current state of OCCT model-world transform.

◆ OitState()

const OpenGl_OitState & OpenGl_ShaderManager::OitState ( ) const
inline

Returns state of OIT uniforms.

◆ PBRShadingModelFallback()

static Graphic3d_TypeOfShadingModel OpenGl_ShaderManager::PBRShadingModelFallback ( Graphic3d_TypeOfShadingModel theShadingModel,
bool theIsPbrAllowed = false )
inlinestatic

Resets PBR shading models to corresponding non-PBR ones if PBR is not allowed.

◆ preparePBREnvBakingProgram()

bool OpenGl_ShaderManager::preparePBREnvBakingProgram ( int theIndex)
protected

Prepare GLSL source for IBL generation used in PBR pipeline.

◆ prepareStdProgramBoundBox()

bool OpenGl_ShaderManager::prepareStdProgramBoundBox ( )
protected

Prepare standard GLSL program for bounding box.

◆ prepareStdProgramGouraud()

bool OpenGl_ShaderManager::prepareStdProgramGouraud ( occ::handle< OpenGl_ShaderProgram > & theProgram,
const int theBits )
protected

Prepare standard GLSL program with per-vertex lighting.

◆ prepareStdProgramLight()

bool OpenGl_ShaderManager::prepareStdProgramLight ( occ::handle< OpenGl_ShaderProgram > & theProgram,
Graphic3d_TypeOfShadingModel theShadingModel,
int theBits )
inlineprotected

Prepare standard GLSL program with lighting.

◆ prepareStdProgramPhong()

bool OpenGl_ShaderManager::prepareStdProgramPhong ( occ::handle< OpenGl_ShaderProgram > & theProgram,
const int theBits,
const bool theIsFlatNormal = false,
const bool theIsPBR = false )
protected

Prepare standard GLSL program with per-pixel lighting.

Parameters
theIsFlatNormalwhen TRUE, the Vertex normals will be ignored and Face normal will be computed instead
theIsPBRwhen TRUE, the PBR pipeline will be activated

◆ prepareStdProgramUnlit()

bool OpenGl_ShaderManager::prepareStdProgramUnlit ( occ::handle< OpenGl_ShaderProgram > & theProgram,
int theBits,
bool theIsOutline = false )
protected

Prepare standard GLSL program without lighting.

◆ ProjectionState()

const OpenGl_ProjectionState & OpenGl_ShaderManager::ProjectionState ( ) const
inline

Returns current state of OCCT projection transform.

◆ PushClippingState()

void OpenGl_ShaderManager::PushClippingState ( const occ::handle< OpenGl_ShaderProgram > & theProgram) const
inline

Pushes current state of OCCT clipping planes to specified program (only on state change).

◆ pushClippingState()

void OpenGl_ShaderManager::pushClippingState ( const occ::handle< OpenGl_ShaderProgram > & theProgram) const

Pushes current state of OCCT clipping planes to specified program.

◆ PushInteriorState()

void OpenGl_ShaderManager::PushInteriorState ( const occ::handle< OpenGl_ShaderProgram > & theProgram,
const occ::handle< Graphic3d_Aspects > & theAspect ) const

Setup interior style line edges variables.

◆ PushLightSourceState()

void OpenGl_ShaderManager::PushLightSourceState ( const occ::handle< OpenGl_ShaderProgram > & theProgram) const
inline

Pushes current state of OCCT light sources to specified program (only on state change). Note that light sources definition depends also on WorldViewState.

◆ pushLightSourceState()

void OpenGl_ShaderManager::pushLightSourceState ( const occ::handle< OpenGl_ShaderProgram > & theProgram) const

Pushes current state of OCCT light sources to specified program.

◆ PushMaterialState()

void OpenGl_ShaderManager::PushMaterialState ( const occ::handle< OpenGl_ShaderProgram > & theProgram) const
inline

Pushes current state of material to specified program (only on state change).

◆ pushMaterialState()

void OpenGl_ShaderManager::pushMaterialState ( const occ::handle< OpenGl_ShaderProgram > & theProgram) const

Pushes current state of material to specified program.

◆ PushModelWorldState()

void OpenGl_ShaderManager::PushModelWorldState ( const occ::handle< OpenGl_ShaderProgram > & theProgram) const
inline

Pushes current state of OCCT model-world transform to specified program (only on state change).

◆ pushModelWorldState()

void OpenGl_ShaderManager::pushModelWorldState ( const occ::handle< OpenGl_ShaderProgram > & theProgram) const

Pushes current state of OCCT model-world transform to specified program.

◆ PushOitState()

void OpenGl_ShaderManager::PushOitState ( const occ::handle< OpenGl_ShaderProgram > & theProgram) const
inline

Pushes state of OIT uniforms to the specified program.

◆ pushOitState()

void OpenGl_ShaderManager::pushOitState ( const occ::handle< OpenGl_ShaderProgram > & theProgram) const

Pushes state of OIT uniforms to the specified program.

◆ PushProjectionState()

void OpenGl_ShaderManager::PushProjectionState ( const occ::handle< OpenGl_ShaderProgram > & theProgram) const
inline

Pushes current state of OCCT projection transform to specified program (only on state change).

◆ pushProjectionState()

void OpenGl_ShaderManager::pushProjectionState ( const occ::handle< OpenGl_ShaderProgram > & theProgram) const

Pushes current state of OCCT projection transform to specified program.

◆ PushState()

void OpenGl_ShaderManager::PushState ( const occ::handle< OpenGl_ShaderProgram > & theProgram,
Graphic3d_TypeOfShadingModel theShadingModel = Graphic3d_TypeOfShadingModel_Unlit ) const

Pushes current state of OCCT graphics parameters to specified program.

◆ PushWorldViewState()

void OpenGl_ShaderManager::PushWorldViewState ( const occ::handle< OpenGl_ShaderProgram > & theProgram) const
inline

Pushes current state of OCCT world-view transform to specified program (only on state change).

◆ pushWorldViewState()

void OpenGl_ShaderManager::pushWorldViewState ( const occ::handle< OpenGl_ShaderProgram > & theProgram) const

Pushes current state of OCCT world-view transform to specified program.

◆ ResetOitState()

void OpenGl_ShaderManager::ResetOitState ( )
inline

Reset the state of OIT rendering pass (only on state change).

◆ RevertClippingState()

void OpenGl_ShaderManager::RevertClippingState ( )

Reverts state of OCCT clipping planes.

◆ SetCastShadows()

bool OpenGl_ShaderManager::SetCastShadows ( const bool theToCast)
inline

Updates state of OCCT light sources to dynamically enable/disable shadowmap.

Parameters
[in]theToCastflag to enable/disable shadowmap
Returns
previous flag state

◆ SetContext()

void OpenGl_ShaderManager::SetContext ( OpenGl_Context * theCtx)
inline

Overwrites context.

◆ SetLocalOrigin()

void OpenGl_ShaderManager::SetLocalOrigin ( const gp_XYZ & theOrigin)
inline

Setup local camera transformation for compensating float precision issues.

◆ SetOitState()

void OpenGl_ShaderManager::SetOitState ( Graphic3d_RenderTransparentMethod theMode)
inline

Set the state of OIT rendering pass (only on state change).

Parameters
[in]theModeflag indicating whether the special output should be written for OIT algorithm

◆ SetShadingModel()

void OpenGl_ShaderManager::SetShadingModel ( const Graphic3d_TypeOfShadingModel theModel)

Sets shading model.

◆ SetWeighedOitState()

void OpenGl_ShaderManager::SetWeighedOitState ( float theDepthFactor)
inline

Set the state of weighed OIT rendering pass (only on state change).

Parameters
[in]theDepthFactorthe scalar factor of depth influence to the fragment's coverage

◆ ShaderPrograms()

const NCollection_Sequence< occ::handle< OpenGl_ShaderProgram > > & OpenGl_ShaderManager::ShaderPrograms ( ) const
inline

Returns list of registered shader programs.

◆ ShadingModel()

Graphic3d_TypeOfShadingModel OpenGl_ShaderManager::ShadingModel ( ) const
inline

Returns default Shading Model.

◆ switchLightPrograms()

void OpenGl_ShaderManager::switchLightPrograms ( )
protected

Set pointer myLightPrograms to active lighting programs set from myMapOfLightPrograms.

◆ Unregister()

void OpenGl_ShaderManager::Unregister ( TCollection_AsciiString & theShareKey,
occ::handle< OpenGl_ShaderProgram > & theProgram )

Unregisters specified shader program.

◆ UpdateClippingState()

void OpenGl_ShaderManager::UpdateClippingState ( )

Updates state of OCCT clipping planes.

◆ UpdateLightSourceState()

void OpenGl_ShaderManager::UpdateLightSourceState ( )

Invalidate state of OCCT light sources.

◆ UpdateLightSourceStateTo()

void OpenGl_ShaderManager::UpdateLightSourceStateTo ( const occ::handle< Graphic3d_LightSet > & theLights,
int theSpecIBLMapLevels,
const occ::handle< OpenGl_ShadowMapArray > & theShadowMaps )

Updates state of OCCT light sources.

◆ UpdateMaterialState()

void OpenGl_ShaderManager::UpdateMaterialState ( )
inline

Updates state of material.

◆ UpdateMaterialStateTo()

void OpenGl_ShaderManager::UpdateMaterialStateTo ( const OpenGl_Material & theMat,
const float theAlphaCutoff,
const bool theToDistinguish,
const bool theToMapTexture )
inline

Updates state of material.

◆ UpdateModelWorldStateTo()

void OpenGl_ShaderManager::UpdateModelWorldStateTo ( const NCollection_Mat4< float > & theModelWorldMatrix)

Updates state of OCCT model-world transform.

◆ UpdateProjectionStateTo()

void OpenGl_ShaderManager::UpdateProjectionStateTo ( const NCollection_Mat4< float > & theProjectionMatrix)

Updates state of OCCT projection transform.

◆ UpdateSRgbState()

void OpenGl_ShaderManager::UpdateSRgbState ( )

Fetch sRGB state from caps and invalidates programs, if necessary.

◆ UpdateWorldViewStateTo()

void OpenGl_ShaderManager::UpdateWorldViewStateTo ( const NCollection_Mat4< float > & theWorldViewMatrix)

Updates state of OCCT world-view transform.

◆ WorldViewState()

const OpenGl_WorldViewState & OpenGl_ShaderManager::WorldViewState ( ) const
inline

Returns current state of OCCT world-view transform.

Field Documentation

◆ myBgCubeMapProgram

occ::handle<Graphic3d_ShaderProgram> OpenGl_ShaderManager::myBgCubeMapProgram
protected

program for background cubemap rendering

◆ myBgSkydomeProgram

occ::handle<Graphic3d_ShaderProgram> OpenGl_ShaderManager::myBgSkydomeProgram
protected

program for background cubemap rendering

◆ myBlitPrograms

NCollection_Array1<occ::handle<OpenGl_ShaderProgram> > OpenGl_ShaderManager::myBlitPrograms[2]
protected

standard program for FBO blit emulation

◆ myBoundBoxProgram

occ::handle<OpenGl_ShaderProgram> OpenGl_ShaderManager::myBoundBoxProgram
protected

standard program for bounding box

◆ myBoundBoxVertBuffer

occ::handle<OpenGl_VertexBuffer> OpenGl_ShaderManager::myBoundBoxVertBuffer
protected

bounding box vertex buffer

◆ myClipChainArray

NCollection_Array1<int> OpenGl_ShaderManager::myClipChainArray
mutableprotected

◆ myClippingState

OpenGl_ClippingState OpenGl_ShaderManager::myClippingState
protected

State of OCCT clipping planes.

◆ myClipPlaneArray

NCollection_Array1<NCollection_Vec4<float> > OpenGl_ShaderManager::myClipPlaneArray
mutableprotected

◆ myClipPlaneArrayFfp

NCollection_Array1<NCollection_Vec4<double> > OpenGl_ShaderManager::myClipPlaneArrayFfp
mutableprotected

◆ myColoredQuadProgram

occ::handle<Graphic3d_ShaderProgram> OpenGl_ShaderManager::myColoredQuadProgram
protected

program for correct quad rendering

◆ myContext

OpenGl_Context* OpenGl_ShaderManager::myContext
protected

OpenGL context.

◆ myFfpProgram

occ::handle<OpenGl_ShaderProgramFFP> OpenGl_ShaderManager::myFfpProgram
protected

◆ myFontProgram

occ::handle<OpenGl_ShaderProgram> OpenGl_ShaderManager::myFontProgram
protected

standard program for textured text

◆ myGridProgram

occ::handle<OpenGl_ShaderProgram> OpenGl_ShaderManager::myGridProgram
protected

shader program for GPU grid

◆ myHasLocalOrigin

bool OpenGl_ShaderManager::myHasLocalOrigin
protected

flag indicating that local camera transformation has been set

◆ myLightParamsArray

NCollection_Array1<OpenGl_ShaderLightParameters> OpenGl_ShaderManager::myLightParamsArray
mutableprotected

◆ myLightPrograms

occ::handle<OpenGl_SetOfShaderPrograms> OpenGl_ShaderManager::myLightPrograms
protected

pointer to active lighting programs matrix

◆ myLightSourceState

OpenGl_LightSourceState OpenGl_ShaderManager::myLightSourceState
protected

State of OCCT light sources.

◆ myLightTypeArray

NCollection_Array1<int> OpenGl_ShaderManager::myLightTypeArray
mutableprotected

◆ myLocalOrigin

gp_XYZ OpenGl_ShaderManager::myLocalOrigin
protected

local camera transformation

◆ myMapOfLightPrograms

NCollection_DataMap<TCollection_AsciiString, occ::handle<OpenGl_SetOfShaderPrograms> > OpenGl_ShaderManager::myMapOfLightPrograms
protected

map of lighting programs depending on lights configuration

◆ myMaterialState

OpenGl_MaterialState OpenGl_ShaderManager::myMaterialState
protected

State of Front and Back materials.

◆ myModelWorldState

OpenGl_ModelWorldState OpenGl_ShaderManager::myModelWorldState
protected

State of OCCT model-world transformation.

◆ myOitCompositingProgram

occ::handle<OpenGl_ShaderProgram> OpenGl_ShaderManager::myOitCompositingProgram[2]
protected

standard program for OIT compositing (default and MSAA).

◆ myOitDepthPeelingBlendProgram

occ::handle<OpenGl_ShaderProgram> OpenGl_ShaderManager::myOitDepthPeelingBlendProgram[2]
protected

standard program for OIT Depth Peeling blend (default and MSAA)

◆ myOitDepthPeelingFlushProgram

occ::handle<OpenGl_ShaderProgram> OpenGl_ShaderManager::myOitDepthPeelingFlushProgram[2]
protected

standard program for OIT Depth Peeling flush (default and MSAA)

◆ myOitState

OpenGl_OitState OpenGl_ShaderManager::myOitState
protected

State of OIT uniforms.

◆ myOutlinePrograms

occ::handle<OpenGl_SetOfPrograms> OpenGl_ShaderManager::myOutlinePrograms
protected

programs matrix without lighting for outline presentation

◆ myPBREnvBakingProgram

occ::handle<OpenGl_ShaderProgram> OpenGl_ShaderManager::myPBREnvBakingProgram[3]
protected

programs for IBL maps generation used in PBR pipeline (0 for Diffuse; 1 for Specular; 2 for fallback)

◆ myPBREnvironment

occ::handle<OpenGl_PBREnvironment> OpenGl_ShaderManager::myPBREnvironment
mutableprotected

manager of IBL maps used in PBR pipeline

◆ myProgramList

NCollection_Sequence<occ::handle<OpenGl_ShaderProgram> > OpenGl_ShaderManager::myProgramList
protected

The list of shader programs.

◆ myProjectionState

OpenGl_ProjectionState OpenGl_ShaderManager::myProjectionState
protected

State of OCCT projection transformation.

◆ myShadingModel

Graphic3d_TypeOfShadingModel OpenGl_ShaderManager::myShadingModel
protected

lighting shading model

◆ myShadowMatArray

NCollection_Array1<NCollection_Mat4<float> > OpenGl_ShaderManager::myShadowMatArray
mutableprotected

◆ myStereoPrograms

occ::handle<OpenGl_ShaderProgram> OpenGl_ShaderManager::myStereoPrograms[Graphic3d_StereoMode_NB]
protected

standard stereo programs

◆ myUnlitPrograms

occ::handle<OpenGl_SetOfPrograms> OpenGl_ShaderManager::myUnlitPrograms
protected

programs matrix without lighting

◆ myWorldViewState

OpenGl_WorldViewState OpenGl_ShaderManager::myWorldViewState
protected

State of OCCT world-view transformation.


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