Open CASCADE Technology
6.9.1
|
#include <OpenGl_View.hxx>
Data Structures | |
struct | RaytracingParams |
Compile-time ray-tracing parameters. More... | |
class | ShaderSource |
Tool class for management of shader sources. More... | |
struct | StructState |
Describes state of OpenGL structure. More... | |
Public Member Functions | |
OpenGl_View (const CALL_DEF_VIEWCONTEXT &AContext, OpenGl_StateCounter *theCounter) | |
virtual | ~OpenGl_View () |
void | ReleaseGlResources (const Handle< OpenGl_Context > &theCtx) |
void | SetTextureEnv (const Handle< OpenGl_Context > &theCtx, const Handle< Graphic3d_TextureEnv > &theTexture) |
void | SetSurfaceDetail (const Visual3d_TypeOfSurfaceDetail AMode) |
void | SetBackfacing (const Standard_Integer AMode) |
void | SetLights (const CALL_DEF_VIEWCONTEXT &AContext) |
void | SetAntiAliasing (const Standard_Boolean AMode) |
void | SetClipPlanes (const Graphic3d_SequenceOfHClipPlane &thePlanes) |
void | SetVisualisation (const CALL_DEF_VIEWCONTEXT &AContext) |
const Handle< Graphic3d_Camera > & | Camera () |
void | SetCamera (const Handle< Graphic3d_Camera > &theCamera) |
void | SetClipLimit (const Graphic3d_CView &theCView) |
void | SetFog (const Graphic3d_CView &theCView, const Standard_Boolean theFlag) |
OpenGl_Trihedron & | ChangeTrihedron () |
void | TriedronDisplay (const Aspect_TypeOfTriedronPosition thePosition, const Quantity_NameOfColor theColor, const Standard_Real theScale, const Standard_Boolean theAsWireframe) |
void | TriedronErase (const Handle< OpenGl_Context > &theCtx) |
OpenGl_GraduatedTrihedron & | ChangeGraduatedTrihedron () |
void | GraduatedTrihedronDisplay (const Handle< OpenGl_Context > &theCtx, const Graphic3d_GraduatedTrihedron &theCubic) |
void | GraduatedTrihedronErase (const Handle< OpenGl_Context > &theCtx) |
Standard_Real | Height () const |
Standard_Real | Width () const |
Standard_Integer | Backfacing () const |
const TEL_TRANSFORM_PERSISTENCE * | BeginTransformPersistence (const Handle< OpenGl_Context > &theCtx, const TEL_TRANSFORM_PERSISTENCE *theTransPers, Standard_Integer theWidth, Standard_Integer theHeight) |
void | EndTransformPersistence (const Handle< OpenGl_Context > &theCtx) |
void | DisplayStructure (const Handle< Graphic3d_Structure > &theStructure, const Standard_Integer thePriority) |
Add structure to display list with specified priority. The structure will be added to associated with it z layer. If the z layer is not presented in the view, the structure will be displayed in default bottom-level z layer. More... | |
void | EraseStructure (const Handle< Graphic3d_Structure > &theStructure) |
Erase structure from display list. More... | |
void | DisplayImmediateStructure (const Handle< Graphic3d_Structure > &theStructure) |
Add structure to the list of immediate structures. More... | |
void | EraseImmediateStructure (const OpenGl_Structure *theStructure) |
Erase structure from display list. More... | |
void | AddZLayer (const Graphic3d_ZLayerId theLayerId) |
Insert a new top-level z layer with ID <theLayerId> More... | |
void | RemoveZLayer (const Graphic3d_ZLayerId theLayerId) |
Remove a z layer with ID <theLayerId> More... | |
void | ChangeZLayer (const OpenGl_Structure *theStructure, const Graphic3d_ZLayerId theNewLayerId) |
Display structure in z layer with ID <theNewLayerId> If the layer with ID <theNewLayerId> is not presented in the view, the structure will be displayed in default bottom-level layer. More... | |
void | SetZLayerSettings (const Graphic3d_ZLayerId theLayerId, const Graphic3d_ZLayerSettings &theSettings) |
Sets the settings for a single Z layer of specified view. More... | |
void | ChangePriority (const OpenGl_Structure *theStructure, const Standard_Integer theNewPriority) |
Changes the priority of a structure within its ZLayer. More... | |
void | CreateBackgroundTexture (const Standard_CString AFileName, const Aspect_FillMethod AFillStyle) |
void | SetBackgroundTextureStyle (const Aspect_FillMethod FillStyle) |
void | SetBackgroundGradient (const Quantity_Color &AColor1, const Quantity_Color &AColor2, const Aspect_GradientFillMethod AType) |
void | SetBackgroundGradientType (const Aspect_GradientFillMethod AType) |
void | Render (const Handle< OpenGl_PrinterContext > &thePrintContext, const Handle< OpenGl_Workspace > &theWorkspace, OpenGl_FrameBuffer *theReadDrawFbo, Graphic3d_Camera::Projection theProjection, const Graphic3d_CView &theCView, const Aspect_CLayer2d &theCUnderLayer, const Aspect_CLayer2d &theCOverLayer, const Standard_Boolean theToDrawImmediate) |
void | DrawBackground (const Handle< OpenGl_Workspace > &theWorkspace) |
const OpenGl_LayerList & | LayerList () const |
Returns list of OpenGL Z-layers. More... | |
const OpenGl_ListOfLight & | LightList () const |
Returns list of openGL light sources. More... | |
const Handle< OpenGl_Texture > & | TextureEnv () const |
Returns OpenGL environment map. More... | |
Visual3d_TypeOfSurfaceDetail | SurfaceDetail () const |
Returns visualization mode for objects in the view. More... | |
OpenGl_BVHTreeSelector & | BVHTreeSelector () |
Returns selector for BVH tree, providing a possibility to store information about current view volume and to detect which objects are overlapping it. More... | |
void | InvalidateBVHData (const Standard_Integer theLayerId) |
Marks BVH tree for given priority list as dirty and marks primitive set for rebuild. More... | |
const OpenGl_IndexedMapOfStructure & | ImmediateStructures () const |
Returns list of immediate structures rendered on top of main presentation. More... | |
bool | HasImmediateStructures () const |
Returns true if there are immediate structures to display. More... | |
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_Transient & | operator= (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... | |
Protected Types | |
typedef std::pair< Standard_Size, Standard_Size > | StateInfo |
Protected Member Functions | |
void | RenderStructs (const Handle< OpenGl_Workspace > &theWorkspace, OpenGl_FrameBuffer *theReadDrawFbo, const Graphic3d_CView &theCView, const Standard_Boolean theToDrawImmediate) |
void | RedrawLayer2d (const Handle< OpenGl_PrinterContext > &thePrintContext, const Handle< OpenGl_Workspace > &theWorkspace, const Graphic3d_CView &theCView, const Aspect_CLayer2d &theCLayer) |
void | RedrawTrihedron (const Handle< OpenGl_Workspace > &theWorkspace) |
void | RedrawScene (const Handle< OpenGl_PrinterContext > &thePrintContext, const Handle< OpenGl_Workspace > &theWorkspace, OpenGl_FrameBuffer *theReadDrawFbo, const Graphic3d_CView &theCView, const Standard_Boolean theToDrawImmediate) |
Redraw contents of model scene: clipping planes, lights, structures. The peculiar properties of "scene" is that it requires empty Z-Buffer and uses projection and orientation matrices supplied by 3d view. More... | |
methods related to ray-tracing | |
Standard_Boolean | updateRaytraceGeometry (const RaytraceUpdateMode theMode, const Standard_Integer theViewId, const Handle< OpenGl_Context > &theGlContext) |
Updates 3D scene geometry for ray-tracing. More... | |
Standard_Boolean | updateRaytraceLightSources (const OpenGl_Mat4 &theInvModelView, const Handle< OpenGl_Context > &theGlContext) |
Updates 3D scene light sources for ray-tracing. More... | |
Standard_Boolean | updateRaytraceEnvironmentMap (const Handle< OpenGl_Context > &theGlContext) |
Updates environment map for ray-tracing. More... | |
Standard_Boolean | toUpdateStructure (const OpenGl_Structure *theStructure) |
Checks to see if the OpenGL structure is modified. More... | |
Standard_Boolean | addRaytraceStructure (const OpenGl_Structure *theStructure, const Handle< OpenGl_Context > &theGlContext) |
Adds OpenGL structure to ray-traced scene geometry. More... | |
Standard_Boolean | addRaytraceGroups (const OpenGl_Structure *theStructure, const Standard_Integer theStructMat, const Standard_ShortReal *theTransform, const Handle< OpenGl_Context > &theGlContext) |
Adds OpenGL groups to ray-traced scene geometry. More... | |
OpenGl_RaytraceMaterial | convertMaterial (const OpenGl_AspectFace *theAspect, const Handle< OpenGl_Context > &theGlContext) |
Creates ray-tracing material properties. More... | |
OpenGl_TriangleSet * | addRaytracePrimitiveArray (const OpenGl_PrimitiveArray *theArray, const Standard_Integer theMatID, const OpenGl_Mat4 *theTrans) |
Adds OpenGL primitive array to ray-traced scene geometry. More... | |
Standard_Boolean | addRaytraceVertexIndices (OpenGl_TriangleSet &theSet, const Standard_Integer theMatID, const Standard_Integer theCount, const Standard_Integer theOffset, const OpenGl_PrimitiveArray &theArray) |
Adds vertex indices from OpenGL primitive array to ray-traced scene geometry. More... | |
Standard_Boolean | addRaytraceTriangleArray (OpenGl_TriangleSet &theSet, const Standard_Integer theMatID, const Standard_Integer theCount, const Standard_Integer theOffset, const Handle< Graphic3d_IndexBuffer > &theIndices) |
Adds OpenGL triangle array to ray-traced scene geometry. More... | |
Standard_Boolean | addRaytraceTriangleFanArray (OpenGl_TriangleSet &theSet, const Standard_Integer theMatID, const Standard_Integer theCount, const Standard_Integer theOffset, const Handle< Graphic3d_IndexBuffer > &theIndices) |
Adds OpenGL triangle fan array to ray-traced scene geometry. More... | |
Standard_Boolean | addRaytraceTriangleStripArray (OpenGl_TriangleSet &theSet, const Standard_Integer theMatID, const Standard_Integer theCount, const Standard_Integer theOffset, const Handle< Graphic3d_IndexBuffer > &theIndices) |
Adds OpenGL triangle strip array to ray-traced scene geometry. More... | |
Standard_Boolean | addRaytraceQuadrangleArray (OpenGl_TriangleSet &theSet, const Standard_Integer theMatID, const Standard_Integer theCount, const Standard_Integer theOffset, const Handle< Graphic3d_IndexBuffer > &theIndices) |
Adds OpenGL quadrangle array to ray-traced scene geometry. More... | |
Standard_Boolean | addRaytraceQuadrangleStripArray (OpenGl_TriangleSet &theSet, const Standard_Integer theMatID, const Standard_Integer theCount, const Standard_Integer theOffset, const Handle< Graphic3d_IndexBuffer > &theIndices) |
Adds OpenGL quadrangle strip array to ray-traced scene geometry. More... | |
Standard_Boolean | addRaytracePolygonArray (OpenGl_TriangleSet &theSet, const Standard_Integer theMatID, const Standard_Integer theCount, const Standard_Integer theOffset, const Handle< Graphic3d_IndexBuffer > &theIndices) |
Adds OpenGL polygon array to ray-traced scene geometry. More... | |
Standard_Boolean | uploadRaytraceData (const Handle< OpenGl_Context > &theGlContext) |
Uploads ray-trace data to the GPU. More... | |
TCollection_AsciiString | generateShaderPrefix (const Handle< OpenGl_Context > &theGlContext) const |
Generates shader prefix based on current ray-tracing options. More... | |
Standard_Boolean | safeFailBack (const TCollection_ExtendedString &theMessage, const Handle< OpenGl_Context > &theGlContext) |
Performs safe exit when shaders initialization fails. More... | |
Handle< OpenGl_ShaderObject > | initShader (const GLenum theType, const ShaderSource &theSource, const Handle< OpenGl_Context > &theGlContext) |
Loads and compiles shader object from specified source. More... | |
Standard_Boolean | initRaytraceResources (const Graphic3d_CView &theCView, const Handle< OpenGl_Context > &theGlContext) |
Initializes OpenGL/GLSL shader programs. More... | |
void | releaseRaytraceResources (const Handle< OpenGl_Context > &theGlContext) |
Releases OpenGL/GLSL shader programs. More... | |
Standard_Boolean | resizeRaytraceBuffers (const Standard_Integer theSizeX, const Standard_Integer theSizeY, const Handle< OpenGl_Context > &theGlContext) |
Resizes OpenGL frame buffers. More... | |
void | updateCamera (const OpenGl_Mat4 &theOrientation, const OpenGl_Mat4 &theViewMapping, OpenGl_Vec3 *theOrigins, OpenGl_Vec3 *theDirects, OpenGl_Mat4 &theUnView) |
Generates viewing rays for corners of screen quad. More... | |
void | bindRaytraceTextures (const Handle< OpenGl_Context > &theGlContext) |
Binds ray-trace textures to corresponding texture units. More... | |
void | unbindRaytraceTextures (const Handle< OpenGl_Context > &theGlContext) |
Unbinds ray-trace textures from corresponding texture unit. More... | |
Standard_Boolean | setUniformState (const Graphic3d_CView &theCView, const OpenGl_Vec3 *theOrigins, const OpenGl_Vec3 *theDirects, const OpenGl_Mat4 &theUnviewMat, const Standard_Integer theProgramId, const Handle< OpenGl_Context > &theGlContext) |
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, const OpenGl_Vec3 *theDirects, const OpenGl_Mat4 &theUnviewMat, OpenGl_FrameBuffer *theReadDrawFbo, const Handle< OpenGl_Context > &theGlContext) |
Runs ray-tracing shader programs. More... | |
Standard_Boolean | raytrace (const Graphic3d_CView &theCView, const Standard_Integer theSizeX, const Standard_Integer theSizeY, OpenGl_FrameBuffer *theReadDrawFbo, const Handle< OpenGl_Context > &theGlContext) |
Redraws the window using OpenGL/GLSL ray-tracing. More... | |
fields related to ray-tracing | |
RaytraceInitStatus | myRaytraceInitStatus |
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... | |
RaytracingParams | myRaytraceParameters |
Compile-time ray-tracing parameters. More... | |
Standard_ShortReal | myRaytraceSceneRadius |
Radius of bounding sphere of the scene. More... | |
Standard_ShortReal | myRaytraceSceneEpsilon |
Scene epsilon to prevent self-intersections. 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_ShaderObject > | myRaytraceShader |
OpenGL/GLSL ray-tracing fragment shader. More... | |
Handle< OpenGl_ShaderObject > | myPostFSAAShader |
OpenGL/GLSL adaptive-AA fragment shader. More... | |
Handle< OpenGl_ShaderProgram > | myRaytraceProgram |
OpenGL/GLSL ray-tracing shader program. More... | |
Handle< OpenGl_ShaderProgram > | myPostFSAAProgram |
OpenGL/GLSL adaptive-AA shader program. More... | |
Handle< OpenGl_TextureBufferArb > | mySceneNodeInfoTexture |
Texture buffer of data records of bottom-level BVH nodes. More... | |
Handle< OpenGl_TextureBufferArb > | mySceneMinPointTexture |
Texture buffer of minimum points of bottom-level BVH nodes. More... | |
Handle< OpenGl_TextureBufferArb > | mySceneMaxPointTexture |
Texture buffer of maximum points of bottom-level BVH nodes. More... | |
Handle< OpenGl_TextureBufferArb > | mySceneTransformTexture |
Texture buffer of transformations of high-level BVH nodes. More... | |
Handle< OpenGl_TextureBufferArb > | myGeometryVertexTexture |
Texture buffer of vertex coords. More... | |
Handle< OpenGl_TextureBufferArb > | myGeometryNormalTexture |
Texture buffer of vertex normals. More... | |
Handle< OpenGl_TextureBufferArb > | myGeometryTexCrdTexture |
Texture buffer of vertex UV coords. More... | |
Handle< OpenGl_TextureBufferArb > | myGeometryTriangTexture |
Texture buffer of triangle indices. More... | |
Handle< OpenGl_TextureBufferArb > | myRaytraceMaterialTexture |
Texture buffer of material properties. More... | |
Handle< OpenGl_TextureBufferArb > | myRaytraceLightSrcTexture |
Texture buffer of light source properties. More... | |
Handle< OpenGl_FrameBuffer > | myRaytraceFBO1 |
1st framebuffer (FBO) to perform adaptive FSAA. More... | |
Handle< OpenGl_FrameBuffer > | myRaytraceFBO2 |
2nd framebuffer (FBO) to perform adaptive FSAA. More... | |
Handle< OpenGl_FrameBuffer > | myOpenGlFBO |
Framebuffer (FBO) for preliminary OpenGL output. More... | |
OpenGl_VertexBuffer | myRaytraceScreenQuad |
Vertex buffer (VBO) for drawing dummy quad. More... | |
Standard_Integer | myUniformLocations [2][OpenGl_RT_NbVariables] |
Cached locations of frequently used uniform variables. More... | |
std::map< const OpenGl_Structure *, StructState > | 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... | |
Handle< OpenGl_RaytraceFilter > | myRaytraceFilter |
Graphical ray-tracing filter to filter out all raytracable structures. More... | |
Standard_Boolean | myToUpdateEnvironmentMap |
Marks if environment map should be updated. More... | |
Standard_Size | myLayersModificationStatus |
State of OpenGL layer list. More... | |
DEFINE_STANDARD_RTTI (OpenGl_View) friend class OpenGl_Workspace | |
Result of shaders initialization. More... | |
|
protected |
|
protected |
|
protected |
|
protected |
Defines texture samplers.
|
protected |
Defines frequently used shader variables.
OpenGl_View::OpenGl_View | ( | const CALL_DEF_VIEWCONTEXT & | AContext, |
OpenGl_StateCounter * | theCounter | ||
) |
|
virtual |
|
protected |
Adds OpenGL groups to ray-traced scene geometry.
|
protected |
Adds OpenGL polygon array to ray-traced scene geometry.
|
protected |
Adds OpenGL primitive array to ray-traced scene geometry.
|
protected |
Adds OpenGL quadrangle array to ray-traced scene geometry.
|
protected |
Adds OpenGL quadrangle strip array to ray-traced scene geometry.
|
protected |
Adds OpenGL structure to ray-traced scene geometry.
|
protected |
Adds OpenGL triangle array to ray-traced scene geometry.
|
protected |
Adds OpenGL triangle fan array to ray-traced scene geometry.
|
protected |
Adds OpenGL triangle strip array to ray-traced scene geometry.
|
protected |
Adds vertex indices from OpenGL primitive array to ray-traced scene geometry.
void OpenGl_View::AddZLayer | ( | const Graphic3d_ZLayerId | theLayerId | ) |
Insert a new top-level z layer with ID <theLayerId>
|
inline |
const TEL_TRANSFORM_PERSISTENCE* OpenGl_View::BeginTransformPersistence | ( | const Handle< OpenGl_Context > & | theCtx, |
const TEL_TRANSFORM_PERSISTENCE * | theTransPers, | ||
Standard_Integer | theWidth, | ||
Standard_Integer | theHeight | ||
) |
|
protected |
Binds ray-trace textures to corresponding texture units.
|
inline |
Returns selector for BVH tree, providing a possibility to store information about current view volume and to detect which objects are overlapping it.
|
inline |
|
inline |
void OpenGl_View::ChangePriority | ( | const OpenGl_Structure * | theStructure, |
const Standard_Integer | theNewPriority | ||
) |
Changes the priority of a structure within its ZLayer.
|
inline |
void OpenGl_View::ChangeZLayer | ( | const OpenGl_Structure * | theStructure, |
const Graphic3d_ZLayerId | theNewLayerId | ||
) |
Display structure in z layer with ID <theNewLayerId> If the layer with ID <theNewLayerId> is not presented in the view, the structure will be displayed in default bottom-level layer.
|
protected |
Creates ray-tracing material properties.
void OpenGl_View::CreateBackgroundTexture | ( | const Standard_CString | AFileName, |
const Aspect_FillMethod | AFillStyle | ||
) |
OpenGl_View::DEFINE_STANDARD_RTTI | ( | OpenGl_View | ) |
Result of shaders initialization.
void OpenGl_View::DisplayImmediateStructure | ( | const Handle< Graphic3d_Structure > & | theStructure | ) |
Add structure to the list of immediate structures.
void OpenGl_View::DisplayStructure | ( | const Handle< Graphic3d_Structure > & | theStructure, |
const Standard_Integer | thePriority | ||
) |
Add structure to display list with specified priority. The structure will be added to associated with it z layer. If the z layer is not presented in the view, the structure will be displayed in default bottom-level z layer.
void OpenGl_View::DrawBackground | ( | const Handle< OpenGl_Workspace > & | theWorkspace | ) |
void OpenGl_View::EndTransformPersistence | ( | const Handle< OpenGl_Context > & | theCtx | ) |
void OpenGl_View::EraseImmediateStructure | ( | const OpenGl_Structure * | theStructure | ) |
Erase structure from display list.
void OpenGl_View::EraseStructure | ( | const Handle< Graphic3d_Structure > & | theStructure | ) |
Erase structure from display list.
|
protected |
Generates shader prefix based on current ray-tracing options.
void OpenGl_View::GraduatedTrihedronDisplay | ( | const Handle< OpenGl_Context > & | theCtx, |
const Graphic3d_GraduatedTrihedron & | theCubic | ||
) |
void OpenGl_View::GraduatedTrihedronErase | ( | const Handle< OpenGl_Context > & | theCtx | ) |
|
inline |
Returns true if there are immediate structures to display.
|
inline |
|
inline |
Returns list of immediate structures rendered on top of main presentation.
|
protected |
Initializes OpenGL/GLSL shader programs.
|
protected |
Loads and compiles shader object from specified source.
void OpenGl_View::InvalidateBVHData | ( | const Standard_Integer | theLayerId | ) |
Marks BVH tree for given priority list as dirty and marks primitive set for rebuild.
|
inline |
Returns list of OpenGL Z-layers.
|
inline |
Returns list of openGL light sources.
|
protected |
Redraws the window using OpenGL/GLSL ray-tracing.
|
protected |
|
protected |
Redraw contents of model scene: clipping planes, lights, structures. The peculiar properties of "scene" is that it requires empty Z-Buffer and uses projection and orientation matrices supplied by 3d view.
|
protected |
void OpenGl_View::ReleaseGlResources | ( | const Handle< OpenGl_Context > & | theCtx | ) |
|
protected |
Releases OpenGL/GLSL shader programs.
void OpenGl_View::RemoveZLayer | ( | const Graphic3d_ZLayerId | theLayerId | ) |
Remove a z layer with ID <theLayerId>
void OpenGl_View::Render | ( | const Handle< OpenGl_PrinterContext > & | thePrintContext, |
const Handle< OpenGl_Workspace > & | theWorkspace, | ||
OpenGl_FrameBuffer * | theReadDrawFbo, | ||
Graphic3d_Camera::Projection | theProjection, | ||
const Graphic3d_CView & | theCView, | ||
const Aspect_CLayer2d & | theCUnderLayer, | ||
const Aspect_CLayer2d & | theCOverLayer, | ||
const Standard_Boolean | theToDrawImmediate | ||
) |
|
protected |
|
protected |
Resizes OpenGL frame buffers.
|
protected |
Runs ray-tracing shader programs.
|
protected |
Performs safe exit when shaders initialization fails.
|
inline |
void OpenGl_View::SetBackfacing | ( | const Standard_Integer | AMode | ) |
void OpenGl_View::SetBackgroundGradient | ( | const Quantity_Color & | AColor1, |
const Quantity_Color & | AColor2, | ||
const Aspect_GradientFillMethod | AType | ||
) |
void OpenGl_View::SetBackgroundGradientType | ( | const Aspect_GradientFillMethod | AType | ) |
void OpenGl_View::SetBackgroundTextureStyle | ( | const Aspect_FillMethod | FillStyle | ) |
|
inline |
void OpenGl_View::SetClipLimit | ( | const Graphic3d_CView & | theCView | ) |
|
inline |
void OpenGl_View::SetFog | ( | const Graphic3d_CView & | theCView, |
const Standard_Boolean | theFlag | ||
) |
void OpenGl_View::SetLights | ( | const CALL_DEF_VIEWCONTEXT & | AContext | ) |
void OpenGl_View::SetSurfaceDetail | ( | const Visual3d_TypeOfSurfaceDetail | AMode | ) |
void OpenGl_View::SetTextureEnv | ( | const Handle< OpenGl_Context > & | theCtx, |
const Handle< Graphic3d_TextureEnv > & | theTexture | ||
) |
|
protected |
Sets uniform state for the given ray-tracing shader program.
void OpenGl_View::SetVisualisation | ( | const CALL_DEF_VIEWCONTEXT & | AContext | ) |
void OpenGl_View::SetZLayerSettings | ( | const Graphic3d_ZLayerId | theLayerId, |
const Graphic3d_ZLayerSettings & | theSettings | ||
) |
Sets the settings for a single Z layer of specified view.
|
inline |
Returns visualization mode for objects in the view.
|
inline |
Returns OpenGL environment map.
|
protected |
Checks to see if the OpenGL structure is modified.
void OpenGl_View::TriedronDisplay | ( | const Aspect_TypeOfTriedronPosition | thePosition, |
const Quantity_NameOfColor | theColor, | ||
const Standard_Real | theScale, | ||
const Standard_Boolean | theAsWireframe | ||
) |
void OpenGl_View::TriedronErase | ( | const Handle< OpenGl_Context > & | theCtx | ) |
|
protected |
Unbinds ray-trace textures from corresponding texture unit.
|
protected |
Generates viewing rays for corners of screen quad.
|
protected |
Updates environment map for ray-tracing.
|
protected |
Updates 3D scene geometry for ray-tracing.
|
protected |
Updates 3D scene light sources for ray-tracing.
|
protected |
Uploads ray-trace data to the GPU.
|
inline |
|
protected |
|
protected |
PrimitiveArray to TriangleSet map for scene partial update.
|
protected |
|
protected |
Primitive array for gradient background.
|
protected |
Primitive array for texture background.
|
protected |
Is needed for selection of overlapping objects and storage of the current view volume.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Texture buffer of vertex normals.
|
protected |
Texture buffer of vertex UV coords.
|
protected |
Texture buffer of triangle indices.
|
protected |
Texture buffer of vertex coords.
|
protected |
|
protected |
list of immediate structures rendered on top of main presentation
|
protected |
Is geometry data valid?
|
protected |
Warning about missing extension GL_ARB_bindless_texture has been displayed?
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
State of OpenGL layer list.
|
protected |
|
protected |
|
protected |
|
protected |
Framebuffer (FBO) for preliminary OpenGL output.
|
protected |
OpenGL/GLSL adaptive-AA shader program.
|
protected |
OpenGL/GLSL adaptive-AA fragment shader.
|
protected |
OpenGL/GLSL source of adaptive-AA fragment shader.
|
protected |
Modification state.
|
protected |
1st framebuffer (FBO) to perform adaptive FSAA.
|
protected |
2nd framebuffer (FBO) to perform adaptive FSAA.
|
protected |
Graphical ray-tracing filter to filter out all raytracable structures.
|
protected |
3D scene geometry data for ray-tracing.
|
protected |
Result of shaders initialization.
|
protected |
Texture buffer of light source properties.
|
protected |
Texture buffer of material properties.
|
protected |
Compile-time ray-tracing parameters.
|
protected |
OpenGL/GLSL ray-tracing shader program.
|
protected |
Scene epsilon to prevent self-intersections.
|
protected |
Radius of bounding sphere of the scene.
|
protected |
Vertex buffer (VBO) for drawing dummy quad.
|
protected |
OpenGL/GLSL ray-tracing fragment shader.
|
protected |
OpenGL/GLSL source of ray-tracing fragment shader.
|
protected |
Texture buffer of maximum points of bottom-level BVH nodes.
|
protected |
Texture buffer of minimum points of bottom-level BVH nodes.
|
protected |
Texture buffer of data records of bottom-level BVH nodes.
|
protected |
Texture buffer of transformations of high-level BVH nodes.
|
protected |
lighting shading model
|
protected |
|
protected |
State of OpenGL structures reflected to ray-tracing.
|
protected |
|
protected |
|
protected |
Stores texture and its parameters for textured background.
|
protected |
|
protected |
|
protected |
Marks if environment map should be updated.
|
protected |
|
protected |
|
protected |
Cached locations of frequently used uniform variables.
|
protected |
|
protected |
|
protected |
main list of displayed structure, sorted by layers
|
staticprotected |
Default ray-tracing depth.
|
staticprotected |
Default size of traversal stack.