1 // Created on: 2011-09-20
2 // Created by: Sergey ZERCHANINOV
3 // Copyright (c) 2011-2012 OPEN CASCADE SAS
5 // The content of this file is subject to the Open CASCADE Technology Public
6 // License Version 6.5 (the "License"). You may not use the content of this file
7 // except in compliance with the License. Please obtain a copy of the License
8 // at http://www.opencascade.org and read it completely before using this file.
10 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 // The Original Code and all software distributed under the License is
14 // distributed on an "AS IS" basis, without warranty of any kind, and the
15 // Initial Developer hereby disclaims all such warranties, including without
16 // limitation, any warranties of merchantability, fitness for a particular
17 // purpose or non-infringement. Please see the License for the specific terms
18 // and conditions governing the rights and limitations under the License.
20 #ifndef _OpenGl_Display_Header
21 #define _OpenGl_Display_Header
23 #include <Handle_OpenGl_Display.hxx>
24 #include <MMgt_TShared.hxx>
26 #include <Aspect_Display.hxx>
27 #include <Aspect_DisplayConnection.hxx>
28 #include <Aspect_TypeOfLine.hxx>
29 #include <Aspect_TypeOfMarker.hxx>
31 #include <Font_FontAspect.hxx>
33 #include <InterfaceGraphic_telem.hxx>
35 #include <Handle_OpenGl_Window.hxx>
37 struct OpenGl_Facilities
49 class OpenGl_Display : public MMgt_TShared
53 OpenGl_Display (const Handle(Aspect_DisplayConnection)& theDisplayConnection);
54 virtual ~OpenGl_Display ();
56 Aspect_Display GetDisplay () const { return myDisplay; }
58 const OpenGl_Facilities & Facilities () const { return myFacilities; }
60 Standard_Boolean DBuffer () const { return myDBuffer; }
61 Standard_Boolean Dither () const { return myDither; }
62 Standard_Boolean BackDither () const { return myBackDither; }
63 Standard_Boolean Walkthrough () const { return myWalkthrough; }
64 Standard_Boolean SymPerspective() const { return mySymPerspective; }
65 Standard_Boolean PolygonOffset (Standard_ShortReal &AFactor, Standard_ShortReal &AUnits) const
67 AFactor = myOffsetFactor;
68 AUnits = myOffsetUnits;
71 Standard_Integer AntiAliasingMode () const { return myAntiAliasingMode; }
75 void InitAttributes();
76 void ReleaseAttributes (const OpenGl_Context* theGlCtx);
78 void SetTypeOfLine (const Aspect_TypeOfLine AType) const;
80 void SetTypeOfHatch (const int AType) const;
82 friend class OpenGl_Window;
86 DEFINE_STANDARD_RTTI(OpenGl_Display)
92 Aspect_Display myDisplay;
93 OpenGl_Facilities myFacilities;
95 Standard_Boolean myDBuffer;
96 Standard_Boolean myDither;
97 Standard_Boolean myBackDither;
98 Standard_Boolean myWalkthrough;
99 Standard_Boolean mySymPerspective;
100 Standard_ShortReal myOffsetFactor;
101 Standard_ShortReal myOffsetUnits;
102 Standard_Integer myAntiAliasingMode;
104 unsigned int myLinestyleBase;
105 unsigned int myPatternBase;
108 DEFINE_STANDARD_ALLOC
111 #endif // _OpenGl_Display_Header