SetShadingModel (theOther->ShadingModel());
SetBackfacingModel (theOther->BackfacingModel());
SetCamera (new Graphic3d_Camera (theOther->Camera()));
- SetGLLightEnabled (theOther->IsGLLightEnabled());
SetLights (theOther->Lights());
SetClipPlanes (theOther->ClipPlanes());
}
//! Sets camera used by the view.
virtual void SetCamera (const Handle(Graphic3d_Camera)& theCamera) = 0;
- //! Returns true if GL lighting is enabled.
- virtual Standard_Boolean IsGLLightEnabled() const = 0;
-
- //! Sets GL lighting enabled or disable state.
- virtual void SetGLLightEnabled (const Standard_Boolean theIsEnabled) = 0;
-
//! Returns list of lights of the view.
virtual const Graphic3d_ListOfCLight& Lights() const = 0;
myBackfacing (Graphic3d_TOBM_AUTOMATIC),
myBgColor (Quantity_NOC_BLACK),
myCamera (new Graphic3d_Camera()),
- myUseGLLight (Standard_True),
myToShowGradTrihedron (false),
myStateCounter (theCounter),
myLastLightSourceState (0, 0),
//! Sets camera used by the view.
virtual void SetCamera (const Handle(Graphic3d_Camera)& theCamera) Standard_OVERRIDE { myCamera = theCamera; }
- //! Returns true if GL lighting is enabled.
- virtual Standard_Boolean IsGLLightEnabled() const Standard_OVERRIDE { return myUseGLLight; }
-
- //! Sets GL lighting enabled or disable state.
- virtual void SetGLLightEnabled (const Standard_Boolean theIsEnabled) Standard_OVERRIDE { myUseGLLight = theIsEnabled; }
-
//! Returns list of lights of the view.
virtual const Graphic3d_ListOfCLight& Lights() const Standard_OVERRIDE { return myLights; }
Handle(Graphic3d_SequenceOfHClipPlane) myClipPlanes;
Handle(Graphic3d_Camera) myCamera;
Handle(OpenGl_FrameBuffer) myFBO;
- Standard_Boolean myUseGLLight;
Standard_Boolean myToShowGradTrihedron;
TCollection_AsciiString myBackgroundImagePath;
Handle(Graphic3d_TextureEnv) myTextureEnvData;
myGlContext (!theWindow.IsNull() ? theWindow->GetGlContext() : NULL),
myUseZBuffer (Standard_True),
myUseDepthWrite (Standard_True),
- myUseGLLight (Standard_True),
//
myAspectLineSet (&myDefaultAspectLine),
myAspectFaceSet (&myDefaultAspectFace),
return !myView->GlWindow().IsNull() ? myView->GlWindow()->Height() : 0;
}
-// =======================================================================
-// function : UseGLLight
-// purpose :
-// =======================================================================
-Standard_Boolean OpenGl_Workspace::UseGLLight() const
-{
- return myView->IsGLLightEnabled();
-}
-
// =======================================================================
// function : IsCullingEnabled
// purpose :
//! @return true if depth writing is enabled.
Standard_Boolean& UseDepthWrite() { return myUseDepthWrite; }
- //! @return true if usage of GL light is enabled.
- Standard_EXPORT Standard_Boolean UseGLLight() const;
-
//! @return true if clipping algorithm enabled
Standard_EXPORT Standard_Boolean IsCullingEnabled() const;
Handle(OpenGl_Context) myGlContext;
Standard_Boolean myUseZBuffer;
Standard_Boolean myUseDepthWrite;
- Standard_Boolean myUseGLLight;
Handle(OpenGl_CappingAlgoFilter) myDefaultCappingAlgoFilter;
OpenGl_AspectFace myNoneCulling;
OpenGl_AspectFace myFrontCulling;
V3d_View_2.cxx
V3d_View_3.cxx
V3d_View_4.cxx
-V3d_View_5.cxx
V3d_Viewer.cxx
V3d_Viewer.hxx
V3d_Viewer_3.cxx
{
myView->DiagnosticInformation (theDict, theFlags);
}
+
+//=============================================================================
+//function : RenderingParams
+//purpose :
+//=============================================================================
+const Graphic3d_RenderingParams& V3d_View::RenderingParams() const
+{
+ return myView->RenderingParams();
+}
+
+//=============================================================================
+//function : ChangeRenderingParams
+//purpose :
+//=============================================================================
+Graphic3d_RenderingParams& V3d_View::ChangeRenderingParams()
+{
+ return myView->ChangeRenderingParams();
+}
//! Returns current state of the back faces display
Standard_EXPORT V3d_TypeOfBackfacingModel BackFacingModel() const;
- //! turns on/off opengl lighting, currently used in triedron displaying
- Standard_EXPORT void EnableGLLight (const Standard_Boolean theIsEnabled = Standard_True) const;
-
- //! returns the current state of the gl lighting
- //! currently used in triedron displaying
- Standard_EXPORT Standard_Boolean IsGLLightEnabled() const;
-
//! Adds clip plane to the view. The composition of clip planes truncates the
//! rendering space to convex volume. Number of supported clip planes can be consulted
//! by PlaneLimit method of associated Graphic3d_GraphicDriver.
+++ /dev/null
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-/***********************************************************************
- FONCTION :
- ----------
- Classe V3d_View :
- HISTORIQUE DES MODIFICATIONS :
- --------------------------------
- 22-10-01 : SAV ; Created
-************************************************************************/
-/*----------------------------------------------------------------------*/
-/*
- * Includes
- */
-
-#include <Aspect_GradientBackground.hxx>
-#include <Aspect_Grid.hxx>
-#include <Aspect_Window.hxx>
-#include <Bnd_Box.hxx>
-#include <gp_Ax3.hxx>
-#include <gp_Dir.hxx>
-#include <Graphic3d_Group.hxx>
-#include <Graphic3d_Structure.hxx>
-#include <Graphic3d_TextureEnv.hxx>
-#include <Graphic3d_Vector.hxx>
-#include <Quantity_Color.hxx>
-#include <Standard_MultiplyDefined.hxx>
-#include <Standard_TypeMismatch.hxx>
-#include <V3d_BadValue.hxx>
-#include <V3d_Light.hxx>
-#include <V3d_UnMapped.hxx>
-#include <V3d_View.hxx>
-#include <V3d_Viewer.hxx>
-
-//=============================================================================
-//function : EnableGLLight
-//purpose :
-//=============================================================================
-void V3d_View::EnableGLLight (const Standard_Boolean theIsEnabled) const
-{
- myView->SetGLLightEnabled (theIsEnabled);
-}
-
-//=============================================================================
-//function : IsGLLightEnabled
-//purpose :
-//=============================================================================
-Standard_Boolean V3d_View::IsGLLightEnabled() const
-{
- return myView->IsGLLightEnabled();
-}
-
-//=============================================================================
-//function : RenderingParams
-//purpose :
-//=============================================================================
-const Graphic3d_RenderingParams& V3d_View::RenderingParams() const
-{
- return myView->RenderingParams();
-}
-
-//=============================================================================
-//function : ChangeRenderingParams
-//purpose :
-//=============================================================================
-Graphic3d_RenderingParams& V3d_View::ChangeRenderingParams()
-{
- return myView->ChangeRenderingParams();
-}