Commit | Line | Data |
---|---|---|
b311480e | 1 | // Created on: 2011-10-20 |
2 | // Created by: Sergey ZERCHANINOV | |
973c2be1 | 3 | // Copyright (c) 2011-2014 OPEN CASCADE SAS |
b311480e | 4 | // |
973c2be1 | 5 | // This file is part of Open CASCADE Technology software library. |
b311480e | 6 | // |
d5f74e42 | 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 | |
973c2be1 | 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. | |
b311480e | 12 | // |
973c2be1 | 13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. | |
b311480e | 15 | |
2166f0fa SK |
16 | #ifndef _OpenGl_GraphicDriver_HeaderFile |
17 | #define _OpenGl_GraphicDriver_HeaderFile | |
18 | ||
19 | #include <Graphic3d_GraphicDriver.hxx> | |
20 | #include <Handle_OpenGl_GraphicDriver.hxx> | |
5e27df78 | 21 | #include <OpenGl_Context.hxx> |
a174a3c5 | 22 | #include <OpenGl_PrinterContext.hxx> |
2166f0fa SK |
23 | |
24 | #include <Standard_CString.hxx> | |
25 | ||
26 | #include <Handle_TColStd_HArray1OfByte.hxx> | |
27 | #include <Handle_TColStd_HArray1OfReal.hxx> | |
28 | #include <Quantity_PlaneAngle.hxx> | |
29 | #include <Quantity_NameOfColor.hxx> | |
bf75be98 | 30 | #include <Handle_OpenGl_View.hxx> |
1981cb22 | 31 | #include <Handle_OpenGl_Workspace.hxx> |
2166f0fa SK |
32 | |
33 | #include <Aspect_Display.hxx> | |
dc3fe572 | 34 | #include <Aspect_DisplayConnection.hxx> |
2166f0fa SK |
35 | #include <Aspect_GradientFillMethod.hxx> |
36 | #include <Aspect_FillMethod.hxx> | |
37 | #include <Aspect_CLayer2d.hxx> | |
38 | #include <Aspect_TypeOfTriedronPosition.hxx> | |
39 | #include <Aspect_TypeOfTriedronEcho.hxx> | |
40 | #include <Aspect_Handle.hxx> | |
41 | #include <Aspect_PrintAlgo.hxx> | |
938d4544 | 42 | #include <gp_Ax2.hxx> |
2166f0fa SK |
43 | #include <Graphic3d_CView.hxx> |
44 | #include <Graphic3d_CStructure.hxx> | |
2166f0fa | 45 | #include <Graphic3d_CPick.hxx> |
2166f0fa SK |
46 | #include <Graphic3d_TextPath.hxx> |
47 | #include <Graphic3d_HorizontalTextAlignment.hxx> | |
48 | #include <Graphic3d_VerticalTextAlignment.hxx> | |
2166f0fa SK |
49 | #include <Graphic3d_CUserDraw.hxx> |
50 | #include <Graphic3d_CGraduatedTrihedron.hxx> | |
51 | #include <Graphic3d_TypeOfComposition.hxx> | |
2166f0fa SK |
52 | #include <Graphic3d_ExportFormat.hxx> |
53 | #include <Graphic3d_SortType.hxx> | |
54 | #include <Graphic3d_PtrFrameBuffer.hxx> | |
55 | #include <Graphic3d_Array1OfVertex.hxx> | |
2166f0fa | 56 | #include <Graphic3d_Array2OfVertex.hxx> |
692613e5 | 57 | #include <Graphic3d_BufferType.hxx> |
2166f0fa SK |
58 | #include <NCollection_DataMap.hxx> |
59 | ||
60 | class TColStd_Array1OfInteger; | |
61 | class TColStd_Array1OfReal; | |
62 | class TColStd_Array2OfReal; | |
63 | class TColStd_HArray1OfByte; | |
2166f0fa SK |
64 | class Graphic3d_Vector; |
65 | class Quantity_Color; | |
66 | class Graphic3d_Vertex; | |
67 | class Aspect_Array1OfEdge; | |
68 | class TCollection_ExtendedString; | |
692613e5 | 69 | class Image_PixMap; |
2166f0fa | 70 | class TColStd_HArray1OfReal; |
2166f0fa | 71 | class Handle(OpenGl_Workspace); |
5e27df78 | 72 | class OpenGl_Element; |
2166f0fa | 73 | class OpenGl_Structure; |
a174a3c5 | 74 | class OpenGl_Text; |
2166f0fa | 75 | |
392ac980 | 76 | //! Tool class to implement consistent state counter |
77 | //! for objects inside the same driver instance. | |
78 | class OpenGl_StateCounter | |
79 | { | |
80 | public: | |
81 | ||
82 | OpenGl_StateCounter() : myCounter (0) { } | |
83 | ||
84 | Standard_Size Increment() { return ++myCounter; } | |
85 | ||
86 | private: | |
87 | ||
88 | Standard_Size myCounter; | |
89 | }; | |
90 | ||
ebc93ae7 | 91 | //! This class defines an OpenGl graphic driver |
2166f0fa SK |
92 | class OpenGl_GraphicDriver : public Graphic3d_GraphicDriver |
93 | { | |
bf75be98 | 94 | public: |
2166f0fa SK |
95 | |
96 | //! Constructor | |
65993a95 | 97 | Standard_EXPORT OpenGl_GraphicDriver (const Handle(Aspect_DisplayConnection)& theDisplayConnection); |
2166f0fa | 98 | |
65993a95 | 99 | //! Constructor |
100 | Standard_EXPORT OpenGl_GraphicDriver (const Standard_CString theShrName = "TKOpenGl"); | |
dc3fe572 | 101 | Standard_EXPORT Standard_Boolean Begin (const Handle(Aspect_DisplayConnection)& theDisplayConnection); |
2166f0fa | 102 | Standard_EXPORT void End (); |
65993a95 | 103 | |
2166f0fa | 104 | Standard_EXPORT Standard_Integer InquireLightLimit (); |
2166f0fa | 105 | Standard_EXPORT Standard_Integer InquireViewLimit (); |
2166f0fa | 106 | |
2166f0fa SK |
107 | public: // Methods for graphical structures |
108 | ||
63bcc448 | 109 | Standard_EXPORT void DisplayStructure (const Graphic3d_CView& theCView, |
110 | Graphic3d_CStructure& theCStructure, | |
111 | const Standard_Integer thePriority); | |
112 | Standard_EXPORT void EraseStructure (const Graphic3d_CView& theCView, | |
113 | Graphic3d_CStructure& theCStructure); | |
114 | Standard_EXPORT void RemoveStructure (Handle(Graphic3d_CStructure)& theCStructure); | |
115 | Standard_EXPORT Handle(Graphic3d_CStructure) Structure (const Handle(Graphic3d_StructureManager)& theManager); | |
2166f0fa | 116 | |
679ecdee | 117 | Standard_EXPORT Standard_Boolean SetImmediateModeDrawToFront (const Graphic3d_CView& theCView, |
118 | const Standard_Boolean theDrawToFrontBuffer); | |
119 | Standard_EXPORT void DisplayImmediateStructure (const Graphic3d_CView& theCView, | |
120 | const Graphic3d_CStructure& theCStructure); | |
121 | Standard_EXPORT void EraseImmediateStructure (const Graphic3d_CView& theCView, | |
122 | const Graphic3d_CStructure& theCStructure); | |
123 | ||
2166f0fa SK |
124 | public: |
125 | ||
2166f0fa SK |
126 | Standard_EXPORT void ActivateView (const Graphic3d_CView& ACView); |
127 | Standard_EXPORT void AntiAliasing (const Graphic3d_CView& ACView, const Standard_Boolean AFlag); | |
128 | Standard_EXPORT void Background (const Graphic3d_CView& ACView); | |
129 | Standard_EXPORT void GradientBackground (const Graphic3d_CView& ACView, const Quantity_Color& AColor1, const Quantity_Color& AColor2, const Aspect_GradientFillMethod FillStyle); | |
130 | Standard_EXPORT void BackgroundImage (const Standard_CString FileName, const Graphic3d_CView& ACView, const Aspect_FillMethod FillStyle); | |
131 | Standard_EXPORT void SetBgImageStyle (const Graphic3d_CView& ACView, const Aspect_FillMethod FillStyle); | |
132 | Standard_EXPORT void SetBgGradientStyle (const Graphic3d_CView& ACView, const Aspect_GradientFillMethod FillStyle); | |
133 | Standard_EXPORT void ClipLimit (const Graphic3d_CView& ACView, const Standard_Boolean AWait); | |
134 | Standard_EXPORT void DeactivateView (const Graphic3d_CView& ACView); | |
135 | Standard_EXPORT void DepthCueing (const Graphic3d_CView& ACView, const Standard_Boolean AFlag); | |
2166f0fa | 136 | Standard_EXPORT void RatioWindow (const Graphic3d_CView& ACView); |
679ecdee | 137 | Standard_EXPORT void Redraw (const Graphic3d_CView& theCView, |
138 | const Aspect_CLayer2d& theCUnderLayer, | |
139 | const Aspect_CLayer2d& theCOverLayer, | |
140 | const Standard_Integer theX = 0, | |
141 | const Standard_Integer theY = 0, | |
142 | const Standard_Integer theWidth = 0, | |
143 | const Standard_Integer theHeight = 0); | |
144 | Standard_EXPORT void RedrawImmediate (const Graphic3d_CView& theCView, | |
145 | const Aspect_CLayer2d& theCUnderLayer, | |
146 | const Aspect_CLayer2d& theCOverLayer); | |
147 | Standard_EXPORT void Invalidate (const Graphic3d_CView& theCView); | |
2166f0fa SK |
148 | Standard_EXPORT void RemoveView (const Graphic3d_CView& ACView); |
149 | Standard_EXPORT void SetLight (const Graphic3d_CView& ACView); | |
4269bd1b | 150 | Standard_EXPORT void SetClipPlanes (const Graphic3d_CView& theCView); |
b5ac8292 | 151 | Standard_EXPORT void SetCamera (const Graphic3d_CView& theCView); |
2166f0fa | 152 | Standard_EXPORT void SetVisualisation (const Graphic3d_CView& ACView); |
2166f0fa | 153 | Standard_EXPORT void Transparency (const Graphic3d_CView& ACView, const Standard_Boolean AFlag); |
2166f0fa | 154 | Standard_EXPORT Standard_Boolean View (Graphic3d_CView& ACView); |
2166f0fa | 155 | Standard_EXPORT void Environment (const Graphic3d_CView& ACView); |
2166f0fa SK |
156 | Standard_EXPORT void ZBufferTriedronSetup (const Quantity_NameOfColor XColor = Quantity_NOC_RED, const Quantity_NameOfColor YColor = Quantity_NOC_GREEN, const Quantity_NameOfColor ZColor = Quantity_NOC_BLUE1, const Standard_Real SizeRatio = 0.8, const Standard_Real AxisDiametr = 0.05, const Standard_Integer NbFacettes = 12); |
157 | Standard_EXPORT void TriedronDisplay (const Graphic3d_CView& ACView, const Aspect_TypeOfTriedronPosition APosition = Aspect_TOTP_CENTER, const Quantity_NameOfColor AColor = Quantity_NOC_WHITE, const Standard_Real AScale = 0.02, const Standard_Boolean AsWireframe = Standard_True); | |
158 | Standard_EXPORT void TriedronErase (const Graphic3d_CView& ACView); | |
159 | Standard_EXPORT void TriedronEcho (const Graphic3d_CView& ACView, const Aspect_TypeOfTriedronEcho AType = Aspect_TOTE_NONE); | |
160 | Standard_EXPORT void GraduatedTrihedronDisplay (const Graphic3d_CView& view, const Graphic3d_CGraduatedTrihedron& cubic); | |
161 | Standard_EXPORT void GraduatedTrihedronErase (const Graphic3d_CView& view); | |
162 | Standard_EXPORT void GraduatedTrihedronMinMaxValues (const Standard_ShortReal xmin, const Standard_ShortReal ymin, const Standard_ShortReal zmin, const Standard_ShortReal xmax, const Standard_ShortReal ymax, const Standard_ShortReal zmax); | |
2166f0fa SK |
163 | Standard_EXPORT void Layer (Aspect_CLayer2d& ACLayer); |
164 | Standard_EXPORT void RemoveLayer (const Aspect_CLayer2d& ACLayer); | |
165 | Standard_EXPORT void BeginLayer (const Aspect_CLayer2d& ACLayer); | |
166 | Standard_EXPORT void BeginPolygon2d (); | |
167 | Standard_EXPORT void BeginPolyline2d (); | |
168 | Standard_EXPORT void ClearLayer (const Aspect_CLayer2d& ACLayer); | |
169 | Standard_EXPORT void Draw (const Standard_ShortReal X,const Standard_ShortReal Y); | |
170 | Standard_EXPORT void Edge (const Standard_ShortReal X,const Standard_ShortReal Y); | |
171 | Standard_EXPORT void EndLayer (); | |
172 | Standard_EXPORT void EndPolygon2d (); | |
173 | Standard_EXPORT void EndPolyline2d (); | |
174 | Standard_EXPORT void Move (const Standard_ShortReal X,const Standard_ShortReal Y); | |
175 | Standard_EXPORT void Rectangle (const Standard_ShortReal X,const Standard_ShortReal Y,const Standard_ShortReal Width,const Standard_ShortReal Height); | |
176 | Standard_EXPORT void SetColor (const Standard_ShortReal R,const Standard_ShortReal G,const Standard_ShortReal B); | |
177 | Standard_EXPORT void SetTransparency (const Standard_ShortReal ATransparency); | |
178 | Standard_EXPORT void UnsetTransparency (); | |
179 | Standard_EXPORT void SetLineAttributes (const Standard_Integer Type,const Standard_ShortReal Width); | |
25289ec1 | 180 | |
ebc93ae7 | 181 | //! Set text attributes for under-/overlayer. |
182 | //! @param theFontName the name of the font to be used | |
183 | //! @param theType the display type of the text | |
184 | //! theR theG theB values define the color of decal or subtitle background | |
185 | //! To set the color of the text you can use the SetColor method. | |
186 | Standard_EXPORT void SetTextAttributes (const Standard_CString theFontName, | |
187 | const Standard_Integer theType, | |
188 | const Standard_ShortReal theR, | |
189 | const Standard_ShortReal theG, | |
190 | const Standard_ShortReal theB); | |
2166f0fa SK |
191 | Standard_EXPORT void Text (const Standard_CString AText,const Standard_ShortReal X,const Standard_ShortReal Y,const Standard_ShortReal AHeight); |
192 | Standard_EXPORT void TextSize (const Standard_CString AText,const Standard_ShortReal AHeight,Standard_ShortReal& AWidth,Standard_ShortReal& AnAscent,Standard_ShortReal& ADescent) const; | |
193 | Standard_EXPORT void SetBackFacingModel (const Graphic3d_CView& aView); | |
ebc93ae7 | 194 | |
195 | //! Print the contents of all layers of the view to the printer. | |
196 | //! @param thePrinterDC pass the PrinterDeviceContext (HDC) | |
197 | //! @param theToShowBackground when set to FALSE then print the view without background color (background is white) else set to TRUE for printing with current background color | |
198 | //! @param theFileName if != NULL, then the view will be printed to a file | |
199 | //! @param thePrintAlgorithm select print algorithm: stretch, tile | |
200 | //! @param theScaleFactor scaling coefficient, used internally to scale the printings accordingly to the scale factor selected in the printer properties dialog | |
201 | //! @return Standard_True if the data is passed to the printer, otherwise Standard_False if the print operation failed due to the printer errors, | |
202 | //! or lack of system memory. This might be related to insufficient memory or some internal errors. | |
203 | //! All this errors are indicated by the message boxes (on level of OpenGl_GraphicDriver). | |
204 | //! Warning: This function can reuse FBO assigned to the view, please take it into account if you use it for your purposes. | |
205 | Standard_EXPORT Standard_Boolean Print (const Graphic3d_CView& theCView, | |
206 | const Aspect_CLayer2d& theCUnderLayer, | |
207 | const Aspect_CLayer2d& theCOverLayer, | |
208 | const Aspect_Handle thePrinterDC, | |
209 | const Standard_Boolean theToShowBackground, | |
210 | const Standard_CString theFileName, | |
211 | const Aspect_PrintAlgo thePrintAlgorithm = Aspect_PA_STRETCH, | |
212 | const Standard_Real theScaleFactor = 1.0) const; | |
2166f0fa SK |
213 | Standard_EXPORT void SetDepthTestEnabled (const Graphic3d_CView& view,const Standard_Boolean isEnabled) const; |
214 | Standard_EXPORT Standard_Boolean IsDepthTestEnabled (const Graphic3d_CView& view) const; | |
ebc93ae7 | 215 | |
216 | //! Reads depths of shown pixels of the given rectangle (glReadPixels with GL_DEPTH_COMPONENT) | |
2166f0fa | 217 | Standard_EXPORT void ReadDepths (const Graphic3d_CView& view,const Standard_Integer x,const Standard_Integer y,const Standard_Integer width,const Standard_Integer height,const Standard_Address buffer) const; |
ebc93ae7 | 218 | |
219 | //! Generate offscreen FBO (needs OpenGL2+ hardware). | |
220 | //! If not supported on hardware returns NULL. | |
2166f0fa | 221 | Standard_EXPORT Graphic3d_PtrFrameBuffer FBOCreate (const Graphic3d_CView& view, const Standard_Integer width, const Standard_Integer height); |
ebc93ae7 | 222 | |
223 | //! Remove offscreen FBO | |
2166f0fa | 224 | Standard_EXPORT void FBORelease (const Graphic3d_CView& view, Graphic3d_PtrFrameBuffer& fboPtr); |
ebc93ae7 | 225 | |
226 | //! Dump active rendering buffer into specified memory buffer. | |
692613e5 | 227 | Standard_EXPORT Standard_Boolean BufferDump (const Graphic3d_CView& theCView, |
228 | Image_PixMap& theImage, | |
229 | const Graphic3d_BufferType& theBufferType); | |
ebc93ae7 | 230 | |
2166f0fa | 231 | Standard_EXPORT void SetGLLightEnabled (const Graphic3d_CView& view,const Standard_Boolean isEnabled) const; |
ebc93ae7 | 232 | |
2166f0fa | 233 | Standard_EXPORT Standard_Boolean IsGLLightEnabled (const Graphic3d_CView& view) const; |
ebc93ae7 | 234 | |
2166f0fa | 235 | Standard_EXPORT Standard_Integer InquirePlaneLimit(); |
ebc93ae7 | 236 | |
2166f0fa | 237 | Standard_EXPORT Standard_ShortReal DefaultTextHeight() const; |
ebc93ae7 | 238 | |
2166f0fa | 239 | Standard_EXPORT void FBOGetDimensions(const Graphic3d_CView& view,const Graphic3d_PtrFrameBuffer fboPtr,Standard_Integer& width,Standard_Integer& height,Standard_Integer& widthMax,Standard_Integer& heightMax); |
ebc93ae7 | 240 | |
2166f0fa | 241 | Standard_EXPORT void FBOChangeViewport(const Graphic3d_CView& view,Graphic3d_PtrFrameBuffer& fboPtr,const Standard_Integer width,const Standard_Integer height); |
ebc93ae7 | 242 | |
2166f0fa | 243 | Standard_EXPORT Standard_Boolean Export(const Standard_CString theFileName,const Graphic3d_ExportFormat theFormat,const Graphic3d_SortType theSortType,const Standard_Integer theWidth,const Standard_Integer theHeight,const Graphic3d_CView& theView,const Aspect_CLayer2d& theLayerUnder,const Aspect_CLayer2d& theLayerOver,const Standard_Real thePrecision = 0.005,const Standard_Address theProgressBarFunc = NULL,const Standard_Address theProgressObject = NULL); |
3c3131a0 | 244 | |
ebc93ae7 | 245 | //! Add a new top-level z layer with ID theLayerId for the view. Z layers allow drawing structures in higher layers in foreground of structures in lower layers. |
246 | //! To add a structure to desired layer on display it is necessary to set the layer index for the structure. | |
247 | Standard_EXPORT void AddZLayer (const Graphic3d_CView& theCView, | |
248 | const Standard_Integer theLayerId); | |
249 | ||
250 | //! Remove Z layer from the specified view. | |
251 | //! All structures displayed at the moment in layer will be displayed in default layer (the bottom-level z layer). | |
252 | //! To unset layer index from associated structures use method UnsetZLayer (...). | |
253 | Standard_EXPORT void RemoveZLayer (const Graphic3d_CView& theCView, | |
254 | const Standard_Integer theLayerId); | |
255 | ||
256 | //! Unset Z layer ID for all structures. | |
257 | //! The structure indexes will be set to default layer (the bottom-level z layer with ID = 0). | |
258 | Standard_EXPORT void UnsetZLayer (const Standard_Integer theLayerId); | |
259 | ||
260 | //! Change Z layer of a structure. | |
261 | //! The new z layer ID will be used to define the associated layer for structure on display. | |
262 | //! It is recommended to take care of redisplaying the structures already presented in view with previously set layer index. | |
263 | //! This is usually done by viewer manager. Z layers allow drawing structures in higher layers in foreground of structures in lower layers. | |
264 | Standard_EXPORT void ChangeZLayer (const Graphic3d_CStructure& theCStructure, | |
265 | const Standard_Integer theLayerId); | |
266 | ||
267 | //! Change Z layer of a structure already presented in view. | |
268 | //! It is recommended to update z layer of already displayed structures with this method before setting new z layer index to the structure. | |
269 | //! This is usually done by viewer manager. | |
270 | Standard_EXPORT void ChangeZLayer (const Graphic3d_CStructure& theCStructure, | |
271 | const Graphic3d_CView& theCView, | |
272 | const Standard_Integer theNewLayerId); | |
273 | ||
274 | //! Get Z layer ID of the structure. If the structure doesn't exists in graphic driver, the method returns -1. | |
275 | Standard_EXPORT Standard_Integer GetZLayer (const Graphic3d_CStructure& theCStructure) const; | |
2166f0fa | 276 | |
c5751993 | 277 | //! Sets the settings for a single Z layer of specified view. |
278 | Standard_EXPORT void SetZLayerSettings (const Graphic3d_CView& theCView, | |
279 | const Standard_Integer theLayerId, | |
280 | const Graphic3d_ZLayerSettings& theSettings); | |
281 | ||
2166f0fa SK |
282 | public: |
283 | ||
58655684 | 284 | //! @return the visualization options |
285 | inline const OpenGl_Caps& Options() const | |
286 | { | |
287 | return *myCaps.operator->(); | |
288 | } | |
289 | ||
290 | //! @return the visualization options | |
291 | inline OpenGl_Caps& ChangeOptions() | |
292 | { | |
293 | return *myCaps.operator->(); | |
294 | } | |
2166f0fa SK |
295 | |
296 | //! VBO usage can be forbidden by this method even if it is supported by GL driver. | |
297 | //! Notice that disabling of VBO will cause rendering performance degradation. | |
298 | //! Warning! This method should be called only before any primitives are displayed in GL scene! | |
299 | Standard_EXPORT void EnableVBO (const Standard_Boolean theToTurnOn); | |
300 | ||
f0430952 | 301 | //! Returns information about GPU memory usage. |
302 | //! Please read OpenGl_Context::MemoryInfo() for more description. | |
303 | Standard_EXPORT Standard_Boolean MemoryInfo (Standard_Size& theFreeBytes, | |
304 | TCollection_AsciiString& theInfo) const; | |
305 | ||
5e27df78 | 306 | //! UserDraw function prototype |
307 | typedef OpenGl_Element* (*OpenGl_UserDrawCallback_t )(const CALL_DEF_USERDRAW* ); | |
2166f0fa | 308 | |
5e27df78 | 309 | //! Method to setup UserDraw callback |
310 | Standard_EXPORT OpenGl_UserDrawCallback_t& UserDrawCallback(); | |
2166f0fa | 311 | |
e276548b | 312 | public: |
e276548b | 313 | |
5e27df78 | 314 | //! Method to retrieve valid GL context. |
315 | //! Could return NULL-handle if no window created by this driver. | |
316 | Standard_EXPORT const Handle(OpenGl_Context)& GetSharedContext() const; | |
2166f0fa | 317 | |
2166f0fa SK |
318 | public: |
319 | ||
320 | DEFINE_STANDARD_RTTI(OpenGl_GraphicDriver) | |
5e27df78 | 321 | |
322 | private: | |
323 | ||
58655684 | 324 | Handle(OpenGl_Caps) myCaps; |
5e27df78 | 325 | NCollection_DataMap<Standard_Integer, Handle(OpenGl_View)> myMapOfView; |
326 | NCollection_DataMap<Standard_Integer, Handle(OpenGl_Workspace)> myMapOfWS; | |
327 | NCollection_DataMap<Standard_Integer, OpenGl_Structure*> myMapOfStructure; | |
a174a3c5 | 328 | mutable Handle(OpenGl_PrinterContext) myPrintContext; |
5e27df78 | 329 | OpenGl_UserDrawCallback_t myUserDrawCallback; |
a174a3c5 | 330 | OpenGl_Text* myTempText; //!< variable for compatibility (drawing text in layers) |
5e27df78 | 331 | |
392ac980 | 332 | public: |
333 | ||
334 | OpenGl_StateCounter* GetStateCounter() const { return &myStateCounter; } | |
335 | ||
336 | private: | |
337 | ||
338 | mutable OpenGl_StateCounter myStateCounter; | |
339 | ||
2166f0fa SK |
340 | }; |
341 | ||
342 | #endif //_OpenGl_GraphicDriver_HeaderFile |