#include <gl2ps.h>
#endif
-/*----------------------------------------------------------------------*/
-
-namespace
-{
- static const OPENGL_ZCLIP myDefaultZClip = { { Standard_False, 0.F }, { Standard_False, 1.F } };
- static const OPENGL_FOG myDefaultFog = { Standard_False, 0.F, 1.F, OpenGl_Vec4 (0.0f, 0.0f, 0.0f, 1.0f) };
-}
-
// =======================================================================
// function : Constructor
// purpose :
myCaps (theCaps),
myDeviceLostFlag (theDeviceLostFlag),
myWasRedrawnGL (Standard_False),
- myAntiAliasing (Standard_False),
myCulling (Standard_True),
myShadingModel (Graphic3d_TOSM_FACET),
myBackfacing (Graphic3d_TOBM_AUTOMATIC),
myBgColor (Quantity_NOC_BLACK),
- myFog (myDefaultFog),
- myZClip (myDefaultZClip),
myCamera (new Graphic3d_Camera()),
myUseGLLight (Standard_True),
myToShowTrihedron (false),
{
myWorkspace = new OpenGl_Workspace (this, NULL);
- // AA mode
- const char* anAaEnv = ::getenv ("CALL_OPENGL_ANTIALIASING_MODE");
- if (anAaEnv != NULL)
- {
- int v;
- if (sscanf (anAaEnv, "%d", &v) > 0) myAntiAliasing = v;
- }
-
OpenGl_Light aLight;
aLight.Type = Graphic3d_TOLS_AMBIENT;
aLight.IsHeadlight = Standard_False;
void OpenGl_View::SetBackground (const Aspect_Background& theBackground)
{
myBgColor.SetRGB (theBackground.Color());
- myFog.Color = myBgColor;
}
// =======================================================================