//
// This file is part of Open CASCADE Technology software library.
//
-// This library is free software; you can redistribute it and / or modify it
-// under the terms of the GNU Lesser General Public version 2.1 as published
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
{
OpenGl_AspectLine* anAspectLine = new OpenGl_AspectLine();
anAspectLine->SetAspect (theAspect);
- AddElement (TelNil/*TelAspectLine*/, anAspectLine);
+ AddElement (anAspectLine);
}
}
{
OpenGl_AspectFace* anAspectFace = new OpenGl_AspectFace();
anAspectFace->SetAspect (theAspect);
- AddElement (TelNil/*TelAspectFace*/, anAspectFace);
+ AddElement (anAspectFace);
}
#ifdef HAVE_OPENCL
{
OpenGl_AspectMarker* anAspectMarker = new OpenGl_AspectMarker();
anAspectMarker->SetAspect (theAspect);
- AddElement (TelNil/*TelAspectMarker*/, anAspectMarker);
+ AddElement (anAspectMarker);
}
}
{
OpenGl_AspectText* anAspectText = new OpenGl_AspectText();
anAspectText->SetAspect (theAspect);
- AddElement ( TelNil/*TelAspectText*/, anAspectText);
+ AddElement (anAspectText);
}
}
// function : AddElement
// purpose :
// =======================================================================
-void OpenGl_Group::AddElement (const TelType theType, OpenGl_Element *theElem)
+void OpenGl_Group::AddElement (OpenGl_Element* theElem)
{
OpenGl_ElementNode *aNode = new OpenGl_ElementNode();
- aNode->type = theType;
aNode->elem = theElem;
aNode->next = NULL;
(myLast? myLast->next : myFirst) = aNode;
void OpenGl_Group::Render (const Handle(OpenGl_Workspace)& theWorkspace) const
{
// Is rendering in ADD or IMMEDIATE mode?
- const Standard_Boolean isImmediate = (theWorkspace->NamedStatus & (OPENGL_NS_ADD | OPENGL_NS_IMMEDIATE)) != 0;
const Handle(OpenGl_RenderFilter)& aFilter = theWorkspace->GetRenderFilter();
// Setup aspects
// Render group elements
for (OpenGl_ElementNode* aNodeIter = myFirst; aNodeIter != NULL; aNodeIter = aNodeIter->next)
{
- switch (aNodeIter->type)
- {
- case TelMarker:
- case TelMarkerSet:
- case TelText:
- {
- glDisable (GL_LIGHTING);
- if (isImmediate)
- {
- glDepthMask (GL_FALSE);
- }
-
- aNodeIter->elem->RenderFiltered (theWorkspace, aFilter);
- break;
- }
- default:
- {
- aNodeIter->elem->RenderFiltered (theWorkspace, aFilter);
- break;
- }
- }
+ aNodeIter->elem->RenderFiltered (theWorkspace, aFilter);
}
// Restore aspects