mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
0023363: [Regression] Lost gradient background when switching to the hollow interior style
Calling glPolygonMode() to ensure filled polygon rendering when drawing the view background Revert "Calling glPolygonMode() to ensure filled polygon rendering when drawing" This reverts commit 41d41ab23cb81acb3bcf7e6ad5d10ea0097eecdd. OpenGl_Workspace::ResetAppliedAspect() method improved in order to reset GL parameters to default values specified in default aspects. This method is now called twice during scene rendering: - At the very beginning by OpenGl_Workspace::Activate() - After all structures has been drawn but before the auxiliary stuff (like trihedrons, overlayer, display callbacks)
This commit is contained in:
@@ -128,24 +128,14 @@ Standard_Boolean OpenGl_Workspace::Activate()
|
||||
if (!OpenGl_Window::Activate())
|
||||
return Standard_False;
|
||||
|
||||
NamedStatus = IsTextureEnabled() ? OPENGL_NS_TEXTURE : 0;
|
||||
DegenerateModel = 0;
|
||||
SkipRatio = 0.0f;
|
||||
HighlightColor = &myDefaultHighlightColor;
|
||||
AspectLine_set = &myDefaultAspectLine;
|
||||
AspectLine_applied = NULL;
|
||||
AspectFace_set = &myDefaultAspectFace;
|
||||
AspectFace_applied = NULL;
|
||||
AspectMarker_set = &myDefaultAspectMarker;
|
||||
AspectMarker_applied = NULL;
|
||||
AspectText_set = &myDefaultAspectText;
|
||||
AspectText_applied = NULL;
|
||||
TextParam_set = &myDefaultTextParam;
|
||||
TextParam_applied = NULL;
|
||||
ViewMatrix_applied = &myDefaultMatrix;
|
||||
StructureMatrix_applied = &myDefaultMatrix;
|
||||
PolygonOffset_applied = NULL;
|
||||
return Standard_True;
|
||||
|
||||
ResetAppliedAspect();
|
||||
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
@@ -160,3 +150,29 @@ void OpenGl_Workspace::UseTransparency (const Standard_Boolean theFlag)
|
||||
EraseAnimation();
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ResetAppliedAspect
|
||||
//purpose : Sets default values of GL parameters in accordance with default aspects
|
||||
//=======================================================================
|
||||
void OpenGl_Workspace::ResetAppliedAspect()
|
||||
{
|
||||
NamedStatus = IsTextureEnabled() ? OPENGL_NS_TEXTURE : 0;
|
||||
HighlightColor = &myDefaultHighlightColor;
|
||||
AspectLine_set = &myDefaultAspectLine;
|
||||
AspectLine_applied = NULL;
|
||||
AspectFace_set = &myDefaultAspectFace;
|
||||
AspectFace_applied = NULL;
|
||||
AspectMarker_set = &myDefaultAspectMarker;
|
||||
AspectMarker_applied = NULL;
|
||||
AspectText_set = &myDefaultAspectText;
|
||||
AspectText_applied = NULL;
|
||||
TextParam_set = &myDefaultTextParam;
|
||||
TextParam_applied = NULL;
|
||||
PolygonOffset_applied = NULL;
|
||||
|
||||
AspectLine(Standard_True);
|
||||
AspectFace(Standard_True);
|
||||
AspectMarker(Standard_True);
|
||||
AspectText(Standard_True);
|
||||
}
|
||||
|
Reference in New Issue
Block a user