mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0024224: Suspicious logics in changing clipping planes at OpenGl_Structure
1) Resolved buggy situation of shared clip planes between view and structure; 2) Added clipping plane equation space identification - to be used with shaders; 3) Code refactoring to resolve performance issue reported by 0024189; 4) Attachment of stencil buffer to FBO. Added test case bugs/vis/bug24224
This commit is contained in:
@@ -70,15 +70,11 @@ namespace
|
||||
void OpenGl_CappingAlgo::RenderCapping (const Handle(OpenGl_Workspace)& theWorkspace,
|
||||
const OpenGl_ListOfGroup& theGroups)
|
||||
{
|
||||
// do not draw capping surface for second transparency pass
|
||||
if (theWorkspace->NamedStatus & OPENGL_NS_2NDPASSDO)
|
||||
return;
|
||||
|
||||
const Handle(OpenGl_Context)& aContext = theWorkspace->GetGlContext();
|
||||
|
||||
// check whether algorithm need to be runned
|
||||
// check whether algorithm need to be performed
|
||||
Standard_Boolean isCapping = Standard_False;
|
||||
Graphic3d_SetOfHClipPlane aContextPlanes = aContext->Clipping().Planes();
|
||||
const Graphic3d_SetOfHClipPlane& aContextPlanes = aContext->Clipping().Planes();
|
||||
Graphic3d_SetOfHClipPlane::Iterator aCappingIt (aContextPlanes);
|
||||
for (; aCappingIt.More(); aCappingIt.Next())
|
||||
{
|
||||
@@ -92,7 +88,9 @@ void OpenGl_CappingAlgo::RenderCapping (const Handle(OpenGl_Workspace)& theWorks
|
||||
|
||||
// do not perform algorithm is there is nothing to render
|
||||
if (!isCapping)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// init internal data
|
||||
Init();
|
||||
@@ -146,7 +144,7 @@ void OpenGl_CappingAlgo::RenderCapping (const Handle(OpenGl_Workspace)& theWorks
|
||||
aGroupIt.Value()->Render (theWorkspace);
|
||||
}
|
||||
|
||||
// override material, cull backfaces
|
||||
// override material, cull back faces
|
||||
theWorkspace->SetAspectFace (FrontCulling());
|
||||
theWorkspace->AspectFace (Standard_True);
|
||||
|
||||
|
Reference in New Issue
Block a user