1 // Created on: 2011-09-20
2 // Created by: Sergey ZERCHANINOV
3 // Copyright (c) 2011-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _OpenGl_Display_Header
17 #define _OpenGl_Display_Header
19 #include <Handle_OpenGl_Display.hxx>
20 #include <MMgt_TShared.hxx>
22 #include <Aspect_Display.hxx>
23 #include <Aspect_DisplayConnection.hxx>
24 #include <Aspect_TypeOfLine.hxx>
25 #include <Aspect_TypeOfMarker.hxx>
27 #include <Font_FontAspect.hxx>
29 #include <InterfaceGraphic_telem.hxx>
31 #include <Handle_OpenGl_Window.hxx>
33 struct OpenGl_Facilities
45 class OpenGl_Display : public MMgt_TShared
49 OpenGl_Display (const Handle(Aspect_DisplayConnection)& theDisplayConnection);
50 virtual ~OpenGl_Display ();
52 Aspect_Display GetDisplay () const { return myDisplay; }
54 const OpenGl_Facilities & Facilities () const { return myFacilities; }
56 Standard_Boolean DBuffer () const { return myDBuffer; }
57 Standard_Boolean Dither () const { return myDither; }
58 Standard_Boolean BackDither () const { return myBackDither; }
59 Standard_Boolean SymPerspective() const { return mySymPerspective; }
60 Standard_Boolean PolygonOffset (Standard_ShortReal &AFactor, Standard_ShortReal &AUnits) const
62 AFactor = myOffsetFactor;
63 AUnits = myOffsetUnits;
66 Standard_Integer AntiAliasingMode () const { return myAntiAliasingMode; }
70 void InitAttributes();
71 void ReleaseAttributes (const OpenGl_Context* theGlCtx);
73 void SetTypeOfLine (const Aspect_TypeOfLine AType) const;
75 void SetTypeOfHatch (const int AType) const;
77 friend class OpenGl_Window;
81 DEFINE_STANDARD_RTTI(OpenGl_Display)
87 Aspect_Display myDisplay;
88 OpenGl_Facilities myFacilities;
90 Standard_Boolean myDBuffer;
91 Standard_Boolean myDither;
92 Standard_Boolean myBackDither;
93 Standard_Boolean mySymPerspective;
94 Standard_ShortReal myOffsetFactor;
95 Standard_ShortReal myOffsetUnits;
96 Standard_Integer myAntiAliasingMode;
98 unsigned int myLinestyleBase;
99 unsigned int myPatternBase;
102 DEFINE_STANDARD_ALLOC
105 #endif // _OpenGl_Display_Header