mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0024752: Visualization - inherit OpenGl_Group from Graphic3d_Group
Graphic3d_Group is now abstract class and should be instantiated using Graphic3d_Structure::NewGroup() method. Graphic3d_CGroup has been removed. The groups list is no more duplicated within Graphic3d_Structure and OpenGl_Structure. Removed unused/duplicated fields from Graphic3d_Group. Prs3d_Presentation - remove redundnant field myCurrentGroup. PrsMgr_Presentation3d::Erase(), ::Clear() - avoid possible NULL dereference. OpenGl_GraphicDriver/Graphic3d_GraphicDriver - group management methods have been removed (moved to Graphic3d_CStructure and Graphic3d_Group interfaces). Graphic3d_Group::GroupPrimitivesAspect() - copy IsEmission flag Fix wrong iterator Fix compilation issues
This commit is contained in:
@@ -61,28 +61,3 @@ Standard_Boolean OpenGl_GraphicDriver::IsGLLightEnabled( const Graphic3d_CView&
|
||||
return aCView->WS->UseGLLight();
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
void OpenGl_GraphicDriver::PrimitiveArray( const Graphic3d_CGroup& ACGroup,
|
||||
const Graphic3d_PrimitiveArray& parray,
|
||||
const Standard_Boolean /*EvalMinMax*/ )
|
||||
{
|
||||
if ( ACGroup.ptrGroup && parray )
|
||||
{
|
||||
OpenGl_PrimitiveArray *aparray = new OpenGl_PrimitiveArray( (CALL_DEF_PARRAY *) parray );
|
||||
((OpenGl_Group *)ACGroup.ptrGroup)->AddElement (aparray);
|
||||
}
|
||||
}
|
||||
|
||||
void OpenGl_GraphicDriver::UserDraw (const Graphic3d_CGroup& theCGroup,
|
||||
const Graphic3d_CUserDraw& theUserDraw)
|
||||
{
|
||||
if (theCGroup.ptrGroup != NULL
|
||||
&& myUserDrawCallback != NULL)
|
||||
{
|
||||
OpenGl_Element* aUserDraw = myUserDrawCallback(&theUserDraw);
|
||||
if (aUserDraw != NULL)
|
||||
{
|
||||
((OpenGl_Group* )theCGroup.ptrGroup)->AddElement (aUserDraw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user