Open CASCADE Technology  6.8.0
Data Structures | Public Member Functions | Data Fields | Protected Types | Protected Member Functions | Static Protected Attributes
OpenGl_Workspace Class Reference

Represents window with GL context. Provides methods to render primitives and maintain GL state. More...

#include <OpenGl_Workspace.hxx>

Inheritance diagram for OpenGl_Workspace:
Inheritance graph
[legend]

Data Structures

struct  RaytracingParams
 Compile-time ray-tracing parameters. More...
 
class  ShaderSource
 Tool class for management of shader sources. More...
 

Public Member Functions

 OpenGl_Workspace (const Handle< OpenGl_GraphicDriver > &theDriver, const CALL_DEF_WINDOW &theCWindow, Aspect_RenderingContext theGContext, const Handle< OpenGl_Caps > &theCaps, const Handle< OpenGl_Context > &theShareCtx)
 Main constructor - prepare GL context for specified window. More...
 
virtual ~OpenGl_Workspace ()
 Destructor. More...
 
void SetActiveView (const Handle< OpenGl_View > &theView)
 
const Handle< OpenGl_View > & ActiveView () const
 
void Redraw (const Graphic3d_CView &theCView, const Aspect_CLayer2d &theCUnderLayer, const Aspect_CLayer2d &theCOverLayer)
 Redraw the window. More...
 
Standard_Boolean SetImmediateModeDrawToFront (const Standard_Boolean theDrawToFrontBuffer)
 
void RedrawImmediate (const Graphic3d_CView &theCView, const Aspect_CLayer2d &theCUnderLayer, const Aspect_CLayer2d &theCOverLayer, const Standard_Boolean theToForce=Standard_False)
 
void Invalidate (const Graphic3d_CView &)
 
Standard_Boolean Print (const Handle< OpenGl_PrinterContext > &thePrintContext, const Graphic3d_CView &theCView, const Aspect_CLayer2d &theCUnderLayer, const Aspect_CLayer2d &theCOverLayer, const Aspect_Handle theHPrintDC, const Standard_Boolean theToShowBackground, const Standard_CString theFileName, const Aspect_PrintAlgo thePrintAlgorithm, const Standard_Real theScaleFactor)
 Special method to perform printing. System-specific and currently only Win platform implemented. More...
 
const Handle
< OpenGl_PrinterContext > & 
PrinterContext () const
 
void DisplayCallback (const Graphic3d_CView &theCView, int theReason)
 
Graphic3d_PtrFrameBuffer FBOCreate (const Standard_Integer theWidth, const Standard_Integer theHeight)
 
void FBORelease (Graphic3d_PtrFrameBuffer theFBOPtr)
 
Standard_Boolean BufferDump (OpenGl_FrameBuffer *theFBOPtr, Image_PixMap &theImage, const Graphic3d_BufferType &theBufferType)
 
void UseTransparency (const Standard_Boolean theFlag)
 
Standard_BooleanUseZBuffer ()
 
Standard_BooleanUseDepthTest ()
 
Standard_BooleanUseGLLight ()
 
Standard_Integer AntiAliasingMode () const
 
const OpenGl_MatrixSetViewMatrix (const OpenGl_Matrix *)
 
const OpenGl_MatrixSetStructureMatrix (const OpenGl_Matrix *, bool aRevert=false)
 
const void UpdateModelViewMatrix ()
 Updates current model-view matrix replacing it with StructureMatrixT*ViewMatrix from the workspace. More...
 
const OpenGl_AspectLineSetAspectLine (const OpenGl_AspectLine *theAspect)
 
const OpenGl_AspectFaceSetAspectFace (const OpenGl_AspectFace *theAspect)
 
const OpenGl_AspectMarkerSetAspectMarker (const OpenGl_AspectMarker *theAspect)
 
const OpenGl_AspectTextSetAspectText (const OpenGl_AspectText *theAspect)
 
void SetTextParam (const OpenGl_TextParam *theParam)
 
const OpenGl_AspectLineAspectLine (const Standard_Boolean theWithApply)
 
const OpenGl_AspectFaceAspectFace (const Standard_Boolean theWithApply)
 
const OpenGl_AspectMarkerAspectMarker (const Standard_Boolean theWithApply)
 
const OpenGl_AspectTextAspectText (const Standard_Boolean theWithApply)
 
const OpenGl_TextParamAspectTextParams () const
 
void ResetAppliedAspect ()
 Clear the applied aspect state. More...
 
Handle< OpenGl_TextureDisableTexture ()
 
Handle< OpenGl_TextureEnableTexture (const Handle< OpenGl_Texture > &theTexture, const Handle< Graphic3d_TextureParams > &theParams=NULL)
 
const Handle< OpenGl_Texture > & ActiveTexture () const
 
void SetRenderFilter (const Handle< OpenGl_RenderFilter > &theFilter)
 Set filter for restricting rendering of particular elements. Filter can be applied for rendering passes used by recursive rendering algorithms for rendering elements of groups. More...
 
const Handle
< OpenGl_RenderFilter > & 
GetRenderFilter () const
 Get rendering filter. More...
 
const OpenGl_MatrixViewMatrix () const
 
const OpenGl_MatrixModelMatrix () const
 
void SetPolygonOffset (int theMode, Standard_ShortReal theFactor, Standard_ShortReal theUnits)
 Sets and applies current polygon offset. More...
 
const TEL_POFFSET_PARAMAppliedPolygonOffset ()
 Returns currently applied polygon offset params. More...
 
Standard_Boolean IsCullingEnabled () const
 
Standard_Boolean ToRedrawGL () const
 Returns a flag whether to redraw the scene using OpenGL rasterization. More...
 
- Public Member Functions inherited from OpenGl_Window
 OpenGl_Window (const Handle< OpenGl_GraphicDriver > &theDriver, const CALL_DEF_WINDOW &theCWindow, Aspect_RenderingContext theGContext, const Handle< OpenGl_Caps > &theCaps, const Handle< OpenGl_Context > &theShareCtx)
 Main constructor - prepare GL context for specified window. More...
 
virtual ~OpenGl_Window ()
 Destructor. More...
 
void Resize (const CALL_DEF_WINDOW &theCWindow)
 Resizes the window. More...
 
void ReadDepths (const Standard_Integer theX, const Standard_Integer theY, const Standard_Integer theWidth, const Standard_Integer theHeight, float *theDepths)
 Reads depth component for current scene into specified buffer. More...
 
void SetBackgroundColor (const Standard_ShortReal theR, const Standard_ShortReal theG, const Standard_ShortReal theB)
 
Standard_Integer Width () const
 
Standard_Integer Height () const
 
const TEL_COLOURBackgroundColor () const
 
const Handle< OpenGl_Context > & GetGlContext () const
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
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...
 

Data Fields

Standard_Integer NamedStatus
 
const TEL_COLOURHighlightColor
 

Protected Types

enum  RaytraceInitStatus { OpenGl_RT_NONE, OpenGl_RT_INIT, OpenGl_RT_FAIL }
 Result of OpenGL shaders initialization. More...
 
enum  GeomUpdateMode { OpenGl_GUM_CHECK, OpenGl_GUM_PREPARE, OpenGl_GUM_UPDATE }
 Describes update mode (state). More...
 
enum  ShaderVariableIndex {
  OpenGl_RT_aPosition, OpenGl_RT_uOriginLT, OpenGl_RT_uOriginLB, OpenGl_RT_uOriginRT,
  OpenGl_RT_uOriginRB, OpenGl_RT_uDirectLT, OpenGl_RT_uDirectLB, OpenGl_RT_uDirectRT,
  OpenGl_RT_uDirectRB, OpenGl_RT_uUnviewMat, OpenGl_RT_uSceneRad, OpenGl_RT_uSceneEps,
  OpenGl_RT_uLightAmbnt, OpenGl_RT_uLightCount, OpenGl_RT_uShadEnabled, OpenGl_RT_uReflEnabled,
  OpenGl_RT_uEnvMapEnable, OpenGl_RT_uOffsetX, OpenGl_RT_uOffsetY, OpenGl_RT_uSamples,
  OpenGl_RT_uTextures, OpenGl_RT_NbVariables
}
 Defines frequently used shader variables. More...
 
enum  ShaderSamplerNames {
  OpenGl_RT_SceneNodeInfoTexture = 0, OpenGl_RT_SceneMinPointTexture = 1, OpenGl_RT_SceneMaxPointTexture = 2, OpenGl_RT_ObjectNodeInfoTexture = 3,
  OpenGl_RT_ObjectMinPointTexture = 4, OpenGl_RT_ObjectMaxPointTexture = 5, OpenGl_RT_GeometryVertexTexture = 6, OpenGl_RT_GeometryNormalTexture = 7,
  OpenGl_RT_GeometryTexCrdTexture = 8, OpenGl_RT_GeometryTriangTexture = 9, OpenGl_RT_EnvironmentMapTexture = 10, OpenGl_RT_RaytraceMaterialTexture = 11,
  OpenGl_RT_RaytraceLightSrcTexture = 12, OpenGl_RT_FSAAInputTexture = 13, OpenGl_RT_SceneTransformTexture = 14, OpenGl_RT_OpenGlColorTexture = 15,
  OpenGl_RT_OpenGlDepthTexture = 16
}
 Defines texture samplers. More...
 

Protected Member Functions

void copyBackToFront ()
 Copy content of Back buffer to the Front buffer. More...
 
virtual Standard_Boolean Activate ()
 Makes GL context for this window active in current thread. More...
 
void redraw1 (const Graphic3d_CView &theCView, const Aspect_CLayer2d &theCUnderLayer, const Aspect_CLayer2d &theCOverLayer, const int theToSwap)
 
void updateMaterial (const int theFlag)
 
void setTextureParams (Handle< OpenGl_Texture > &theTexture, const Handle< Graphic3d_TextureParams > &theParams)
 
methods related to ray-tracing
Standard_Boolean UpdateRaytraceGeometry (GeomUpdateMode theMode)
 Updates 3D scene geometry for ray-tracing. More...
 
Standard_Boolean CheckRaytraceStructure (const OpenGl_Structure *theStructure)
 Checks to see if the structure is modified. More...
 
Standard_Boolean CreateMaterial (const OpenGl_AspectFace *theAspect, OpenGl_RaytraceMaterial &theMaterial)
 Creates ray-tracing material properties. More...
 
Standard_Boolean UpdateRaytraceLightSources (const OpenGl_Mat4 &theInvModelView)
 Updates 3D scene light sources for ray-tracing. More...
 
Standard_Boolean UpdateRaytraceEnvironmentMap ()
 Updates environment map for ray-tracing. More...
 
Standard_Boolean AddRaytraceStructure (const OpenGl_Structure *theStructure, std::set< const OpenGl_Structure * > &theElements)
 Adds OpenGL structure to ray-traced scene geometry. More...
 
Standard_Boolean AddRaytraceGroups (const OpenGl_Structure *theStructure, const Standard_Integer theStructMatId, const Standard_ShortReal *theTransform)
 Adds OpenGL groups to ray-traced scene geometry. More...
 
OpenGl_TriangleSetAddRaytracePrimitiveArray (const OpenGl_PrimitiveArray *theArray, int theMatID, const OpenGl_Mat4 *theTrans)
 Adds OpenGL primitive array to ray-traced scene geometry. More...
 
Standard_Boolean AddRaytraceVertexIndices (OpenGl_TriangleSet &theSet, const OpenGl_PrimitiveArray &theArray, Standard_Integer theOffset, Standard_Integer theCount, Standard_Integer theMatID)
 Adds vertex indices from OpenGL primitive array to ray-traced scene geometry. More...
 
Standard_Boolean AddRaytraceTriangleArray (OpenGl_TriangleSet &theSet, const Handle< Graphic3d_IndexBuffer > &theIndices, Standard_Integer theOffset, Standard_Integer theCount, Standard_Integer theMatID)
 Adds OpenGL triangle array to ray-traced scene geometry. More...
 
Standard_Boolean AddRaytraceTriangleFanArray (OpenGl_TriangleSet &theSet, const Handle< Graphic3d_IndexBuffer > &theIndices, Standard_Integer theOffset, Standard_Integer theCount, Standard_Integer theMatID)
 Adds OpenGL triangle fan array to ray-traced scene geometry. More...
 
Standard_Boolean AddRaytraceTriangleStripArray (OpenGl_TriangleSet &theSet, const Handle< Graphic3d_IndexBuffer > &theIndices, Standard_Integer theOffset, Standard_Integer theCount, Standard_Integer theMatID)
 Adds OpenGL triangle strip array to ray-traced scene geometry. More...
 
Standard_Boolean AddRaytraceQuadrangleArray (OpenGl_TriangleSet &theSet, const Handle< Graphic3d_IndexBuffer > &theIndices, Standard_Integer theOffset, Standard_Integer theCount, Standard_Integer theMatID)
 Adds OpenGL quadrangle array to ray-traced scene geometry. More...
 
Standard_Boolean AddRaytraceQuadrangleStripArray (OpenGl_TriangleSet &theSet, const Handle< Graphic3d_IndexBuffer > &theIndices, Standard_Integer theOffset, Standard_Integer theCount, Standard_Integer theMatID)
 Adds OpenGL quadrangle strip array to ray-traced scene geometry. More...
 
Standard_Boolean AddRaytracePolygonArray (OpenGl_TriangleSet &theSet, const Handle< Graphic3d_IndexBuffer > &theIndices, Standard_Integer theOffset, Standard_Integer theCount, Standard_Integer theMatID)
 Adds OpenGL polygon array to ray-traced scene geometry. More...
 
Handle< OpenGl_ShaderObjectLoadShader (const ShaderSource &theSource, GLenum theType)
 Loads and compiles shader object from specified source. More...
 
Standard_Boolean SafeFailBack (const TCollection_ExtendedString &theMessage)
 Performs safe exit when shaders initialization fails. More...
 
TCollection_AsciiString GenerateShaderPrefix ()
 Generates shader prefix based on current ray-tracing options. More...
 
Standard_Boolean InitRaytraceResources (const Graphic3d_CView &theCView)
 Initializes OpenGL/GLSL shader programs. More...
 
void ReleaseRaytraceResources ()
 Releases OpenGL/GLSL shader programs. More...
 
Standard_Boolean UploadRaytraceData ()
 Uploads ray-trace data to the GPU. More...
 
Standard_Boolean ResizeRaytraceBuffers (const Standard_Integer theSizeX, const Standard_Integer theSizeY)
 Resizes OpenGL frame buffers. More...
 
void UpdateCamera (const OpenGl_Mat4 &theOrientation, const OpenGl_Mat4 &theViewMapping, OpenGl_Vec3 theOrigins[4], OpenGl_Vec3 theDirects[4], OpenGl_Mat4 &theInvModelProj)
 Generates viewing rays for corners of screen quad. More...
 
Standard_Boolean SetUniformState (const Graphic3d_CView &theCView, const OpenGl_Vec3 *theOrigins, const OpenGl_Vec3 *theDirects, const OpenGl_Mat4 &theUnviewMat, const Standard_Integer theProgramIndex, Handle< OpenGl_ShaderProgram > &theRaytraceProgram)
 Sets uniform state for the given ray-tracing shader program. More...
 
Standard_Boolean RunRaytraceShaders (const Graphic3d_CView &theCView, const Standard_Integer theSizeX, const Standard_Integer theSizeY, const OpenGl_Vec3 theOrigins[4], const OpenGl_Vec3 theDirects[4], const OpenGl_Mat4 &theUnviewMat, OpenGl_FrameBuffer *theFrameBuffer)
 Runs ray-tracing shader programs. More...
 
Standard_Boolean Raytrace (const Graphic3d_CView &theCView, const Standard_Integer theSizeX, const Standard_Integer theSizeY, const Standard_Boolean theToSwap, const Aspect_CLayer2d &theCOverLayer, const Aspect_CLayer2d &theCUnderLayer, OpenGl_FrameBuffer *theFrameBuffer)
 Redraws the window using OpenGL/GLSL ray-tracing. More...
 
- Protected Member Functions inherited from OpenGl_Window
void Init ()
 Activates GL context and setup viewport. More...
 
void EnableFeatures () const
 
void DisableFeatures () const
 
void MakeFrontBufCurrent () const
 Draw directly to the FRONT buffer. Can cause artifacts on the screen. More...
 
void MakeBackBufCurrent () const
 Draw to BACK buffer. Normal and default state. More...
 

Protected Attributes

fields related to ray-tracing
RaytraceInitStatus myComputeInitStatus
 Result of shaders initialization. More...
 
Standard_Boolean myIsRaytraceDataValid
 Is geometry data valid? More...
 
Standard_Boolean myIsRaytraceWarnTextures
 Warning about missing extension GL_ARB_bindless_texture has been displayed? More...
 
OpenGl_RaytraceGeometry myRaytraceGeometry
 3D scene geometry data for ray-tracing. More...
 
Standard_ShortReal myRaytraceSceneRadius
 Radius of bounding sphere of the scene. More...
 
Standard_ShortReal myRaytraceSceneEpsilon
 Scene epsilon to prevent self-intersections. More...
 
RaytracingParams myRaytraceParameters
 Compile-time ray-tracing parameters. More...
 
ShaderSource myRaytraceShaderSource
 OpenGL/GLSL source of ray-tracing fragment shader. More...
 
ShaderSource myPostFSAAShaderSource
 OpenGL/GLSL source of adaptive-AA fragment shader. More...
 
Handle< OpenGl_ShaderObjectmyRaytraceShader
 OpenGL/GLSL ray-tracing fragment shader. More...
 
Handle< OpenGl_ShaderObjectmyPostFSAAShader
 OpenGL/GLSL adaptive-AA fragment shader. More...
 
Handle< OpenGl_ShaderProgrammyRaytraceProgram
 OpenGL/GLSL ray-tracing shader program. More...
 
Handle< OpenGl_ShaderProgrammyPostFSAAProgram
 OpenGL/GLSL adaptive-AA shader program. More...
 
Handle< OpenGl_TextureBufferArbmySceneNodeInfoTexture
 Texture buffer of data records of high-level BVH nodes. More...
 
Handle< OpenGl_TextureBufferArbmySceneMinPointTexture
 Texture buffer of minimum points of high-level BVH nodes. More...
 
Handle< OpenGl_TextureBufferArbmySceneMaxPointTexture
 Texture buffer of maximum points of high-level BVH nodes. More...
 
Handle< OpenGl_TextureBufferArbmySceneTransformTexture
 Texture buffer of transformations of high-level BVH nodes. More...
 
Handle< OpenGl_TextureBufferArbmyObjectNodeInfoTexture
 Texture buffer of data records of bottom-level BVH nodes. More...
 
Handle< OpenGl_TextureBufferArbmyObjectMinPointTexture
 Texture buffer of minimum points of bottom-level BVH nodes. More...
 
Handle< OpenGl_TextureBufferArbmyObjectMaxPointTexture
 Texture buffer of maximum points of bottom-level BVH nodes. More...
 
Handle< OpenGl_TextureBufferArbmyGeometryVertexTexture
 Texture buffer of vertex coords. More...
 
Handle< OpenGl_TextureBufferArbmyGeometryNormalTexture
 Texture buffer of vertex normals. More...
 
Handle< OpenGl_TextureBufferArbmyGeometryTexCrdTexture
 Texture buffer of vertex UV coords. More...
 
Handle< OpenGl_TextureBufferArbmyGeometryTriangTexture
 Texture buffer of triangle indices. More...
 
Handle< OpenGl_TextureBufferArbmyRaytraceMaterialTexture
 Texture buffer of material properties. More...
 
Handle< OpenGl_TextureBufferArbmyRaytraceLightSrcTexture
 Texture buffer of light source properties. More...
 
OpenGl_VertexBuffer myRaytraceScreenQuad
 Vertex buffer (VBO) for drawing dummy quad. More...
 
Handle< OpenGl_FrameBuffermyRaytraceFBO1
 Framebuffer (FBO) to perform adaptive FSAA. More...
 
Handle< OpenGl_FrameBuffermyRaytraceFBO2
 Framebuffer (FBO) to perform adaptive FSAA. More...
 
Handle< OpenGl_FrameBuffermyOpenGlFBO
 Framebuffer (FBO) for pre-raytrace rendering by OpenGL. More...
 
Standard_Size myViewModificationStatus
 State of OpenGL view. More...
 
Standard_Size myLayersModificationStatus
 State of OpenGL layer list. More...
 
std::map< const
OpenGl_Structure
*, Standard_Size
myStructureStates
 State of OpenGL structures reflected to ray-tracing. More...
 
std::map< Standard_Size,
OpenGl_TriangleSet * > 
myArrayToTrianglesMap
 PrimitiveArray to TriangleSet map for scene partial update. More...
 
Standard_Integer myUniformLocations [2][OpenGl_RT_NbVariables]
 Cached locations of frequently used uniform variables. More...
 
Handle< OpenGl_RaytraceFiltermyRaytraceFilter
 Graphical ray-tracing filter to filter out all raytracable structures. More...
 
Standard_Boolean myToRedrawGL
 Redraw the scene using OpenGL rasterization or ray-tracing? More...
 
protected fields
Handle< OpenGl_PrinterContextmyPrintContext
 optimization flag for immediate mode (to render directly to the front buffer) More...
 
Handle< OpenGl_ViewmyView
 optimization flag for immediate mode (to render directly to the front buffer) More...
 
Handle< OpenGl_LineAttributesmyLineAttribs
 optimization flag for immediate mode (to render directly to the front buffer) More...
 
Standard_Integer myAntiAliasingMode
 optimization flag for immediate mode (to render directly to the front buffer) More...
 
Standard_Boolean myTransientDrawToFront
 optimization flag for immediate mode (to render directly to the front buffer) More...
 
Standard_Boolean myBackBufferRestored
 optimization flag for immediate mode (to render directly to the front buffer) More...
 
Standard_Boolean myIsImmediateDrawn
 flag indicates that immediate mode buffer contains some data More...
 
Standard_Boolean myUseTransparency
 optimization flag for immediate mode (to render directly to the front buffer) More...
 
Standard_Boolean myUseZBuffer
 optimization flag for immediate mode (to render directly to the front buffer) More...
 
Standard_Boolean myUseDepthTest
 optimization flag for immediate mode (to render directly to the front buffer) More...
 
Standard_Boolean myUseGLLight
 optimization flag for immediate mode (to render directly to the front buffer) More...
 
Standard_Boolean myIsCullingEnabled
 frustum culling flag More...
 
unsigned int myFrameCounter
 redraw counter, for debugging More...
 
fields related to status
Handle< OpenGl_RenderFiltermyRenderFilter
 currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture) More...
 
Handle< OpenGl_TexturemyTextureBound
 currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture) More...
 
const OpenGl_AspectLineAspectLine_set
 currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture) More...
 
const OpenGl_AspectLineAspectLine_applied
 currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture) More...
 
const OpenGl_AspectFaceAspectFace_set
 currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture) More...
 
const OpenGl_AspectFaceAspectFace_applied
 currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture) More...
 
const OpenGl_AspectMarkerAspectMarker_set
 currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture) More...
 
const OpenGl_AspectMarkerAspectMarker_applied
 currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture) More...
 
const OpenGl_AspectTextAspectText_set
 currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture) More...
 
const OpenGl_AspectTextAspectText_applied
 currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture) More...
 
const OpenGl_TextParamTextParam_set
 currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture) More...
 
const OpenGl_TextParamTextParam_applied
 currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture) More...
 
const OpenGl_MatrixViewMatrix_applied
 currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture) More...
 
const OpenGl_MatrixStructureMatrix_applied
 currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture) More...
 
OpenGl_Material myMatFront
 current front material state (cached to reduce GL context updates) More...
 
OpenGl_Material myMatBack
 current back material state More...
 
OpenGl_Material myMatTmp
 temporary variable More...
 
TelCullMode myCullingMode
 back face culling mode, applied from face aspect More...
 
OpenGl_Matrix myModelViewMatrix
 Model matrix with applied structure transformations. More...
 
TEL_POFFSET_PARAM PolygonOffset_applied
 Currently applied polygon offset. More...
 
OpenGl_AspectFace myAspectFaceHl
 Hiddenline aspect. More...
 
- Protected Attributes inherited from OpenGl_Window
Handle< OpenGl_ContextmyGlContext
 
Standard_Boolean myOwnGContext
 set to TRUE if GL context was not created by this class More...
 
Standard_Integer myWidth
 window width More...
 
Standard_Integer myHeight
 window height More...
 
TEL_COLOUR myBgColor
 background color More...
 

Static Protected Attributes

static const Standard_Integer THE_DEFAULT_NB_BOUNCES = 3
 Default ray-tracing depth. More...
 
static const Standard_Integer THE_DEFAULT_STACK_SIZE = 24
 Default size of traversal stack. More...
 

Detailed Description

Represents window with GL context. Provides methods to render primitives and maintain GL state.

Member Enumeration Documentation

Describes update mode (state).

Enumerator
OpenGl_GUM_CHECK 

check if geometry update is necessary

OpenGl_GUM_PREPARE 

collect unchanged objects

OpenGl_GUM_UPDATE 

update raytracing data, rebuild changed objects

Result of OpenGL shaders initialization.

Enumerator
OpenGl_RT_NONE 
OpenGl_RT_INIT 
OpenGl_RT_FAIL 

Defines texture samplers.

Enumerator
OpenGl_RT_SceneNodeInfoTexture 
OpenGl_RT_SceneMinPointTexture 
OpenGl_RT_SceneMaxPointTexture 
OpenGl_RT_ObjectNodeInfoTexture 
OpenGl_RT_ObjectMinPointTexture 
OpenGl_RT_ObjectMaxPointTexture 
OpenGl_RT_GeometryVertexTexture 
OpenGl_RT_GeometryNormalTexture 
OpenGl_RT_GeometryTexCrdTexture 
OpenGl_RT_GeometryTriangTexture 
OpenGl_RT_EnvironmentMapTexture 
OpenGl_RT_RaytraceMaterialTexture 
OpenGl_RT_RaytraceLightSrcTexture 
OpenGl_RT_FSAAInputTexture 
OpenGl_RT_SceneTransformTexture 
OpenGl_RT_OpenGlColorTexture 
OpenGl_RT_OpenGlDepthTexture 

Defines frequently used shader variables.

Enumerator
OpenGl_RT_aPosition 
OpenGl_RT_uOriginLT 
OpenGl_RT_uOriginLB 
OpenGl_RT_uOriginRT 
OpenGl_RT_uOriginRB 
OpenGl_RT_uDirectLT 
OpenGl_RT_uDirectLB 
OpenGl_RT_uDirectRT 
OpenGl_RT_uDirectRB 
OpenGl_RT_uUnviewMat 
OpenGl_RT_uSceneRad 
OpenGl_RT_uSceneEps 
OpenGl_RT_uLightAmbnt 
OpenGl_RT_uLightCount 
OpenGl_RT_uShadEnabled 
OpenGl_RT_uReflEnabled 
OpenGl_RT_uEnvMapEnable 
OpenGl_RT_uOffsetX 
OpenGl_RT_uOffsetY 
OpenGl_RT_uSamples 
OpenGl_RT_uTextures 
OpenGl_RT_NbVariables 

Constructor & Destructor Documentation

OpenGl_Workspace::OpenGl_Workspace ( const Handle< OpenGl_GraphicDriver > &  theDriver,
const CALL_DEF_WINDOW theCWindow,
Aspect_RenderingContext  theGContext,
const Handle< OpenGl_Caps > &  theCaps,
const Handle< OpenGl_Context > &  theShareCtx 
)

Main constructor - prepare GL context for specified window.

virtual OpenGl_Workspace::~OpenGl_Workspace ( )
virtual

Destructor.

Member Function Documentation

virtual Standard_Boolean OpenGl_Workspace::Activate ( )
protectedvirtual

Makes GL context for this window active in current thread.

Reimplemented from OpenGl_Window.

const Handle< OpenGl_Texture >& OpenGl_Workspace::ActiveTexture ( ) const
inline
const Handle< OpenGl_View >& OpenGl_Workspace::ActiveView ( ) const
inline
Standard_Boolean OpenGl_Workspace::AddRaytraceGroups ( const OpenGl_Structure theStructure,
const Standard_Integer  theStructMatId,
const Standard_ShortReal theTransform 
)
protected

Adds OpenGL groups to ray-traced scene geometry.

Standard_Boolean OpenGl_Workspace::AddRaytracePolygonArray ( OpenGl_TriangleSet theSet,
const Handle< Graphic3d_IndexBuffer > &  theIndices,
Standard_Integer  theOffset,
Standard_Integer  theCount,
Standard_Integer  theMatID 
)
protected

Adds OpenGL polygon array to ray-traced scene geometry.

OpenGl_TriangleSet* OpenGl_Workspace::AddRaytracePrimitiveArray ( const OpenGl_PrimitiveArray theArray,
int  theMatID,
const OpenGl_Mat4 theTrans 
)
protected

Adds OpenGL primitive array to ray-traced scene geometry.

Standard_Boolean OpenGl_Workspace::AddRaytraceQuadrangleArray ( OpenGl_TriangleSet theSet,
const Handle< Graphic3d_IndexBuffer > &  theIndices,
Standard_Integer  theOffset,
Standard_Integer  theCount,
Standard_Integer  theMatID 
)
protected

Adds OpenGL quadrangle array to ray-traced scene geometry.

Standard_Boolean OpenGl_Workspace::AddRaytraceQuadrangleStripArray ( OpenGl_TriangleSet theSet,
const Handle< Graphic3d_IndexBuffer > &  theIndices,
Standard_Integer  theOffset,
Standard_Integer  theCount,
Standard_Integer  theMatID 
)
protected

Adds OpenGL quadrangle strip array to ray-traced scene geometry.

Standard_Boolean OpenGl_Workspace::AddRaytraceStructure ( const OpenGl_Structure theStructure,
std::set< const OpenGl_Structure * > &  theElements 
)
protected

Adds OpenGL structure to ray-traced scene geometry.

Standard_Boolean OpenGl_Workspace::AddRaytraceTriangleArray ( OpenGl_TriangleSet theSet,
const Handle< Graphic3d_IndexBuffer > &  theIndices,
Standard_Integer  theOffset,
Standard_Integer  theCount,
Standard_Integer  theMatID 
)
protected

Adds OpenGL triangle array to ray-traced scene geometry.

Standard_Boolean OpenGl_Workspace::AddRaytraceTriangleFanArray ( OpenGl_TriangleSet theSet,
const Handle< Graphic3d_IndexBuffer > &  theIndices,
Standard_Integer  theOffset,
Standard_Integer  theCount,
Standard_Integer  theMatID 
)
protected

Adds OpenGL triangle fan array to ray-traced scene geometry.

Standard_Boolean OpenGl_Workspace::AddRaytraceTriangleStripArray ( OpenGl_TriangleSet theSet,
const Handle< Graphic3d_IndexBuffer > &  theIndices,
Standard_Integer  theOffset,
Standard_Integer  theCount,
Standard_Integer  theMatID 
)
protected

Adds OpenGL triangle strip array to ray-traced scene geometry.

Standard_Boolean OpenGl_Workspace::AddRaytraceVertexIndices ( OpenGl_TriangleSet theSet,
const OpenGl_PrimitiveArray theArray,
Standard_Integer  theOffset,
Standard_Integer  theCount,
Standard_Integer  theMatID 
)
protected

Adds vertex indices from OpenGL primitive array to ray-traced scene geometry.

Standard_Integer OpenGl_Workspace::AntiAliasingMode ( ) const
inline
const TEL_POFFSET_PARAM& OpenGl_Workspace::AppliedPolygonOffset ( )
inline

Returns currently applied polygon offset params.

const OpenGl_AspectFace* OpenGl_Workspace::AspectFace ( const Standard_Boolean  theWithApply)
const OpenGl_AspectLine* OpenGl_Workspace::AspectLine ( const Standard_Boolean  theWithApply)
const OpenGl_AspectMarker* OpenGl_Workspace::AspectMarker ( const Standard_Boolean  theWithApply)
const OpenGl_AspectText* OpenGl_Workspace::AspectText ( const Standard_Boolean  theWithApply)
const OpenGl_TextParam* OpenGl_Workspace::AspectTextParams ( ) const
inline
Standard_Boolean OpenGl_Workspace::BufferDump ( OpenGl_FrameBuffer theFBOPtr,
Image_PixMap theImage,
const Graphic3d_BufferType theBufferType 
)
Standard_Boolean OpenGl_Workspace::CheckRaytraceStructure ( const OpenGl_Structure theStructure)
protected

Checks to see if the structure is modified.

void OpenGl_Workspace::copyBackToFront ( )
protected

Copy content of Back buffer to the Front buffer.

Standard_Boolean OpenGl_Workspace::CreateMaterial ( const OpenGl_AspectFace theAspect,
OpenGl_RaytraceMaterial theMaterial 
)
protected

Creates ray-tracing material properties.

Handle< OpenGl_Texture > OpenGl_Workspace::DisableTexture ( )
void OpenGl_Workspace::DisplayCallback ( const Graphic3d_CView theCView,
int  theReason 
)
Handle< OpenGl_Texture > OpenGl_Workspace::EnableTexture ( const Handle< OpenGl_Texture > &  theTexture,
const Handle< Graphic3d_TextureParams > &  theParams = NULL 
)
Graphic3d_PtrFrameBuffer OpenGl_Workspace::FBOCreate ( const Standard_Integer  theWidth,
const Standard_Integer  theHeight 
)
void OpenGl_Workspace::FBORelease ( Graphic3d_PtrFrameBuffer  theFBOPtr)
TCollection_AsciiString OpenGl_Workspace::GenerateShaderPrefix ( )
protected

Generates shader prefix based on current ray-tracing options.

const Handle< OpenGl_RenderFilter >& OpenGl_Workspace::GetRenderFilter ( ) const
inline

Get rendering filter.

Returns
filter instance.
Standard_Boolean OpenGl_Workspace::InitRaytraceResources ( const Graphic3d_CView theCView)
protected

Initializes OpenGL/GLSL shader programs.

void OpenGl_Workspace::Invalidate ( const Graphic3d_CView )
inline
Standard_Boolean OpenGl_Workspace::IsCullingEnabled ( ) const
inline
Returns
true if clipping algorithm enabled
Handle< OpenGl_ShaderObject > OpenGl_Workspace::LoadShader ( const ShaderSource theSource,
GLenum  theType 
)
protected

Loads and compiles shader object from specified source.

const OpenGl_Matrix* OpenGl_Workspace::ModelMatrix ( ) const
inline
Returns
applied model structure matrix.
Standard_Boolean OpenGl_Workspace::Print ( const Handle< OpenGl_PrinterContext > &  thePrintContext,
const Graphic3d_CView theCView,
const Aspect_CLayer2d theCUnderLayer,
const Aspect_CLayer2d theCOverLayer,
const Aspect_Handle  theHPrintDC,
const Standard_Boolean  theToShowBackground,
const Standard_CString  theFileName,
const Aspect_PrintAlgo  thePrintAlgorithm,
const Standard_Real  theScaleFactor 
)

Special method to perform printing. System-specific and currently only Win platform implemented.

const Handle< OpenGl_PrinterContext >& OpenGl_Workspace::PrinterContext ( ) const
inline
Standard_Boolean OpenGl_Workspace::Raytrace ( const Graphic3d_CView theCView,
const Standard_Integer  theSizeX,
const Standard_Integer  theSizeY,
const Standard_Boolean  theToSwap,
const Aspect_CLayer2d theCOverLayer,
const Aspect_CLayer2d theCUnderLayer,
OpenGl_FrameBuffer theFrameBuffer 
)
protected

Redraws the window using OpenGL/GLSL ray-tracing.

void OpenGl_Workspace::Redraw ( const Graphic3d_CView theCView,
const Aspect_CLayer2d theCUnderLayer,
const Aspect_CLayer2d theCOverLayer 
)

Redraw the window.

void OpenGl_Workspace::redraw1 ( const Graphic3d_CView theCView,
const Aspect_CLayer2d theCUnderLayer,
const Aspect_CLayer2d theCOverLayer,
const int  theToSwap 
)
protected
void OpenGl_Workspace::RedrawImmediate ( const Graphic3d_CView theCView,
const Aspect_CLayer2d theCUnderLayer,
const Aspect_CLayer2d theCOverLayer,
const Standard_Boolean  theToForce = Standard_False 
)
void OpenGl_Workspace::ReleaseRaytraceResources ( )
protected

Releases OpenGL/GLSL shader programs.

void OpenGl_Workspace::ResetAppliedAspect ( )

Clear the applied aspect state.

Standard_Boolean OpenGl_Workspace::ResizeRaytraceBuffers ( const Standard_Integer  theSizeX,
const Standard_Integer  theSizeY 
)
protected

Resizes OpenGL frame buffers.

Standard_Boolean OpenGl_Workspace::RunRaytraceShaders ( const Graphic3d_CView theCView,
const Standard_Integer  theSizeX,
const Standard_Integer  theSizeY,
const OpenGl_Vec3  theOrigins[4],
const OpenGl_Vec3  theDirects[4],
const OpenGl_Mat4 theUnviewMat,
OpenGl_FrameBuffer theFrameBuffer 
)
protected

Runs ray-tracing shader programs.

Standard_Boolean OpenGl_Workspace::SafeFailBack ( const TCollection_ExtendedString theMessage)
protected

Performs safe exit when shaders initialization fails.

void OpenGl_Workspace::SetActiveView ( const Handle< OpenGl_View > &  theView)
inline
const OpenGl_AspectFace* OpenGl_Workspace::SetAspectFace ( const OpenGl_AspectFace theAspect)
const OpenGl_AspectLine* OpenGl_Workspace::SetAspectLine ( const OpenGl_AspectLine theAspect)
const OpenGl_AspectMarker* OpenGl_Workspace::SetAspectMarker ( const OpenGl_AspectMarker theAspect)
const OpenGl_AspectText* OpenGl_Workspace::SetAspectText ( const OpenGl_AspectText theAspect)
Standard_Boolean OpenGl_Workspace::SetImmediateModeDrawToFront ( const Standard_Boolean  theDrawToFrontBuffer)
void OpenGl_Workspace::SetPolygonOffset ( int  theMode,
Standard_ShortReal  theFactor,
Standard_ShortReal  theUnits 
)

Sets and applies current polygon offset.

void OpenGl_Workspace::SetRenderFilter ( const Handle< OpenGl_RenderFilter > &  theFilter)
inline

Set filter for restricting rendering of particular elements. Filter can be applied for rendering passes used by recursive rendering algorithms for rendering elements of groups.

Parameters
theFilter[in] the filter instance.
const OpenGl_Matrix* OpenGl_Workspace::SetStructureMatrix ( const OpenGl_Matrix ,
bool  aRevert = false 
)
void OpenGl_Workspace::SetTextParam ( const OpenGl_TextParam theParam)
inline
void OpenGl_Workspace::setTextureParams ( Handle< OpenGl_Texture > &  theTexture,
const Handle< Graphic3d_TextureParams > &  theParams 
)
protected
Standard_Boolean OpenGl_Workspace::SetUniformState ( const Graphic3d_CView theCView,
const OpenGl_Vec3 theOrigins,
const OpenGl_Vec3 theDirects,
const OpenGl_Mat4 theUnviewMat,
const Standard_Integer  theProgramIndex,
Handle< OpenGl_ShaderProgram > &  theRaytraceProgram 
)
protected

Sets uniform state for the given ray-tracing shader program.

const OpenGl_Matrix* OpenGl_Workspace::SetViewMatrix ( const OpenGl_Matrix )
Standard_Boolean OpenGl_Workspace::ToRedrawGL ( ) const
inline

Returns a flag whether to redraw the scene using OpenGL rasterization.

void OpenGl_Workspace::UpdateCamera ( const OpenGl_Mat4 theOrientation,
const OpenGl_Mat4 theViewMapping,
OpenGl_Vec3  theOrigins[4],
OpenGl_Vec3  theDirects[4],
OpenGl_Mat4 theInvModelProj 
)
protected

Generates viewing rays for corners of screen quad.

void OpenGl_Workspace::updateMaterial ( const int  theFlag)
protected
const void OpenGl_Workspace::UpdateModelViewMatrix ( )

Updates current model-view matrix replacing it with StructureMatrixT*ViewMatrix from the workspace.

Standard_Boolean OpenGl_Workspace::UpdateRaytraceEnvironmentMap ( )
protected

Updates environment map for ray-tracing.

Standard_Boolean OpenGl_Workspace::UpdateRaytraceGeometry ( GeomUpdateMode  theMode)
protected

Updates 3D scene geometry for ray-tracing.

Standard_Boolean OpenGl_Workspace::UpdateRaytraceLightSources ( const OpenGl_Mat4 theInvModelView)
protected

Updates 3D scene light sources for ray-tracing.

Standard_Boolean OpenGl_Workspace::UploadRaytraceData ( )
protected

Uploads ray-trace data to the GPU.

Standard_Boolean& OpenGl_Workspace::UseDepthTest ( )
inline
Standard_Boolean& OpenGl_Workspace::UseGLLight ( )
inline
void OpenGl_Workspace::UseTransparency ( const Standard_Boolean  theFlag)
Standard_Boolean& OpenGl_Workspace::UseZBuffer ( )
inline
const OpenGl_Matrix* OpenGl_Workspace::ViewMatrix ( ) const
inline
Returns
applied view matrix.

Field Documentation

const OpenGl_AspectFace * OpenGl_Workspace::AspectFace_applied
protected

currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)

const OpenGl_AspectFace* OpenGl_Workspace::AspectFace_set
protected

currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)

const OpenGl_AspectLine * OpenGl_Workspace::AspectLine_applied
protected

currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)

const OpenGl_AspectLine* OpenGl_Workspace::AspectLine_set
protected

currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)

const OpenGl_AspectMarker * OpenGl_Workspace::AspectMarker_applied
protected

currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)

const OpenGl_AspectMarker* OpenGl_Workspace::AspectMarker_set
protected

currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)

const OpenGl_AspectText * OpenGl_Workspace::AspectText_applied
protected

currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)

const OpenGl_AspectText* OpenGl_Workspace::AspectText_set
protected

currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)

const TEL_COLOUR* OpenGl_Workspace::HighlightColor
Standard_Integer OpenGl_Workspace::myAntiAliasingMode
protected

optimization flag for immediate mode (to render directly to the front buffer)

std::map<Standard_Size, OpenGl_TriangleSet*> OpenGl_Workspace::myArrayToTrianglesMap
protected

PrimitiveArray to TriangleSet map for scene partial update.

OpenGl_AspectFace OpenGl_Workspace::myAspectFaceHl
protected

Hiddenline aspect.

Standard_Boolean OpenGl_Workspace::myBackBufferRestored
protected

optimization flag for immediate mode (to render directly to the front buffer)

RaytraceInitStatus OpenGl_Workspace::myComputeInitStatus
protected

Result of shaders initialization.

TelCullMode OpenGl_Workspace::myCullingMode
protected

back face culling mode, applied from face aspect

unsigned int OpenGl_Workspace::myFrameCounter
protected

redraw counter, for debugging

Handle< OpenGl_TextureBufferArb > OpenGl_Workspace::myGeometryNormalTexture
protected

Texture buffer of vertex normals.

Handle< OpenGl_TextureBufferArb > OpenGl_Workspace::myGeometryTexCrdTexture
protected

Texture buffer of vertex UV coords.

Handle< OpenGl_TextureBufferArb > OpenGl_Workspace::myGeometryTriangTexture
protected

Texture buffer of triangle indices.

Handle< OpenGl_TextureBufferArb > OpenGl_Workspace::myGeometryVertexTexture
protected

Texture buffer of vertex coords.

Standard_Boolean OpenGl_Workspace::myIsCullingEnabled
protected

frustum culling flag

Standard_Boolean OpenGl_Workspace::myIsImmediateDrawn
protected

flag indicates that immediate mode buffer contains some data

Standard_Boolean OpenGl_Workspace::myIsRaytraceDataValid
protected

Is geometry data valid?

Standard_Boolean OpenGl_Workspace::myIsRaytraceWarnTextures
protected

Warning about missing extension GL_ARB_bindless_texture has been displayed?

Standard_Size OpenGl_Workspace::myLayersModificationStatus
protected

State of OpenGL layer list.

Handle< OpenGl_LineAttributes > OpenGl_Workspace::myLineAttribs
protected

optimization flag for immediate mode (to render directly to the front buffer)

OpenGl_Material OpenGl_Workspace::myMatBack
protected

current back material state

OpenGl_Material OpenGl_Workspace::myMatFront
protected

current front material state (cached to reduce GL context updates)

OpenGl_Material OpenGl_Workspace::myMatTmp
protected

temporary variable

OpenGl_Matrix OpenGl_Workspace::myModelViewMatrix
protected

Model matrix with applied structure transformations.

Handle< OpenGl_TextureBufferArb > OpenGl_Workspace::myObjectMaxPointTexture
protected

Texture buffer of maximum points of bottom-level BVH nodes.

Handle< OpenGl_TextureBufferArb > OpenGl_Workspace::myObjectMinPointTexture
protected

Texture buffer of minimum points of bottom-level BVH nodes.

Handle< OpenGl_TextureBufferArb > OpenGl_Workspace::myObjectNodeInfoTexture
protected

Texture buffer of data records of bottom-level BVH nodes.

Handle< OpenGl_FrameBuffer > OpenGl_Workspace::myOpenGlFBO
protected

Framebuffer (FBO) for pre-raytrace rendering by OpenGL.

Handle< OpenGl_ShaderProgram > OpenGl_Workspace::myPostFSAAProgram
protected

OpenGL/GLSL adaptive-AA shader program.

Handle< OpenGl_ShaderObject > OpenGl_Workspace::myPostFSAAShader
protected

OpenGL/GLSL adaptive-AA fragment shader.

ShaderSource OpenGl_Workspace::myPostFSAAShaderSource
protected

OpenGL/GLSL source of adaptive-AA fragment shader.

Handle< OpenGl_PrinterContext > OpenGl_Workspace::myPrintContext
protected

optimization flag for immediate mode (to render directly to the front buffer)

Handle< OpenGl_FrameBuffer > OpenGl_Workspace::myRaytraceFBO1
protected

Framebuffer (FBO) to perform adaptive FSAA.

Handle< OpenGl_FrameBuffer > OpenGl_Workspace::myRaytraceFBO2
protected

Framebuffer (FBO) to perform adaptive FSAA.

Handle< OpenGl_RaytraceFilter > OpenGl_Workspace::myRaytraceFilter
protected

Graphical ray-tracing filter to filter out all raytracable structures.

OpenGl_RaytraceGeometry OpenGl_Workspace::myRaytraceGeometry
protected

3D scene geometry data for ray-tracing.

Handle< OpenGl_TextureBufferArb > OpenGl_Workspace::myRaytraceLightSrcTexture
protected

Texture buffer of light source properties.

Handle< OpenGl_TextureBufferArb > OpenGl_Workspace::myRaytraceMaterialTexture
protected

Texture buffer of material properties.

RaytracingParams OpenGl_Workspace::myRaytraceParameters
protected

Compile-time ray-tracing parameters.

Handle< OpenGl_ShaderProgram > OpenGl_Workspace::myRaytraceProgram
protected

OpenGL/GLSL ray-tracing shader program.

Standard_ShortReal OpenGl_Workspace::myRaytraceSceneEpsilon
protected

Scene epsilon to prevent self-intersections.

Standard_ShortReal OpenGl_Workspace::myRaytraceSceneRadius
protected

Radius of bounding sphere of the scene.

OpenGl_VertexBuffer OpenGl_Workspace::myRaytraceScreenQuad
protected

Vertex buffer (VBO) for drawing dummy quad.

Handle< OpenGl_ShaderObject > OpenGl_Workspace::myRaytraceShader
protected

OpenGL/GLSL ray-tracing fragment shader.

ShaderSource OpenGl_Workspace::myRaytraceShaderSource
protected

OpenGL/GLSL source of ray-tracing fragment shader.

Handle< OpenGl_RenderFilter > OpenGl_Workspace::myRenderFilter
protected

currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)

Handle< OpenGl_TextureBufferArb > OpenGl_Workspace::mySceneMaxPointTexture
protected

Texture buffer of maximum points of high-level BVH nodes.

Handle< OpenGl_TextureBufferArb > OpenGl_Workspace::mySceneMinPointTexture
protected

Texture buffer of minimum points of high-level BVH nodes.

Handle< OpenGl_TextureBufferArb > OpenGl_Workspace::mySceneNodeInfoTexture
protected

Texture buffer of data records of high-level BVH nodes.

Handle< OpenGl_TextureBufferArb > OpenGl_Workspace::mySceneTransformTexture
protected

Texture buffer of transformations of high-level BVH nodes.

std::map<const OpenGl_Structure*, Standard_Size> OpenGl_Workspace::myStructureStates
protected

State of OpenGL structures reflected to ray-tracing.

Handle< OpenGl_Texture > OpenGl_Workspace::myTextureBound
protected

currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)

Standard_Boolean OpenGl_Workspace::myToRedrawGL
protected

Redraw the scene using OpenGL rasterization or ray-tracing?

Standard_Boolean OpenGl_Workspace::myTransientDrawToFront
protected

optimization flag for immediate mode (to render directly to the front buffer)

Standard_Integer OpenGl_Workspace::myUniformLocations[2][OpenGl_RT_NbVariables]
protected

Cached locations of frequently used uniform variables.

Standard_Boolean OpenGl_Workspace::myUseDepthTest
protected

optimization flag for immediate mode (to render directly to the front buffer)

Standard_Boolean OpenGl_Workspace::myUseGLLight
protected

optimization flag for immediate mode (to render directly to the front buffer)

Standard_Boolean OpenGl_Workspace::myUseTransparency
protected

optimization flag for immediate mode (to render directly to the front buffer)

Standard_Boolean OpenGl_Workspace::myUseZBuffer
protected

optimization flag for immediate mode (to render directly to the front buffer)

Handle< OpenGl_View > OpenGl_Workspace::myView
protected

optimization flag for immediate mode (to render directly to the front buffer)

Standard_Size OpenGl_Workspace::myViewModificationStatus
protected

State of OpenGL view.

Standard_Integer OpenGl_Workspace::NamedStatus
TEL_POFFSET_PARAM OpenGl_Workspace::PolygonOffset_applied
protected

Currently applied polygon offset.

const OpenGl_Matrix* OpenGl_Workspace::StructureMatrix_applied
protected

currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)

const OpenGl_TextParam * OpenGl_Workspace::TextParam_applied
protected

currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)

const OpenGl_TextParam* OpenGl_Workspace::TextParam_set
protected

currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)

const Standard_Integer OpenGl_Workspace::THE_DEFAULT_NB_BOUNCES = 3
staticprotected

Default ray-tracing depth.

const Standard_Integer OpenGl_Workspace::THE_DEFAULT_STACK_SIZE = 24
staticprotected

Default size of traversal stack.

const OpenGl_Matrix* OpenGl_Workspace::ViewMatrix_applied
protected

currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)


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