42cf5bc1 |
1 | // Created on: 1997-01-28 |
2 | // Created by: CAL |
3 | // Copyright (c) 1997-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _Graphic3d_GraphicDriver_HeaderFile |
18 | #define _Graphic3d_GraphicDriver_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <Standard_Integer.hxx> |
24 | #include <Aspect_DisplayConnection.hxx> |
25 | #include <Standard_Boolean.hxx> |
26 | #include <MMgt_TShared.hxx> |
27 | #include <Graphic3d_CView.hxx> |
28 | #include <Graphic3d_CStructure.hxx> |
29 | #include <Aspect_GradientFillMethod.hxx> |
30 | #include <Standard_CString.hxx> |
31 | #include <Aspect_FillMethod.hxx> |
32 | #include <Aspect_CLayer2d.hxx> |
33 | #include <Standard_Size.hxx> |
34 | #include <Quantity_NameOfColor.hxx> |
35 | #include <Standard_Real.hxx> |
36 | #include <Aspect_TypeOfTriedronPosition.hxx> |
37 | #include <Aspect_TypeOfTriedronEcho.hxx> |
38 | #include <Graphic3d_GraduatedTrihedron.hxx> |
39 | #include <Graphic3d_Vec3.hxx> |
40 | #include <Standard_ShortReal.hxx> |
41 | #include <Standard_Address.hxx> |
42 | #include <Graphic3d_PtrFrameBuffer.hxx> |
43 | #include <Image_PixMap.hxx> |
44 | #include <Graphic3d_BufferType.hxx> |
45 | #include <Aspect_Handle.hxx> |
46 | #include <Aspect_PrintAlgo.hxx> |
47 | #include <Graphic3d_ExportFormat.hxx> |
48 | #include <Graphic3d_SortType.hxx> |
49 | #include <Graphic3d_ZLayerId.hxx> |
50 | #include <Graphic3d_ZLayerSettings.hxx> |
51 | #include <Graphic3d_CLight.hxx> |
52 | #include <TColStd_Array2OfReal.hxx> |
53 | class Graphic3d_TransformError; |
54 | class Graphic3d_Structure; |
55 | class Graphic3d_StructureManager; |
56 | class Quantity_Color; |
57 | class TCollection_AsciiString; |
58 | |
59 | |
60 | class Graphic3d_GraphicDriver; |
61 | DEFINE_STANDARD_HANDLE(Graphic3d_GraphicDriver, MMgt_TShared) |
62 | |
63 | //! This class allows the definition of a graphic driver |
64 | //! for 3d interface (currently only OpenGl driver is used). |
65 | class Graphic3d_GraphicDriver : public MMgt_TShared |
66 | { |
67 | |
68 | public: |
69 | |
70 | |
71 | //! call_togl_inquirelight |
72 | Standard_EXPORT virtual Standard_Integer InquireLightLimit() = 0; |
73 | |
74 | //! call_togl_inquireplane |
75 | Standard_EXPORT virtual Standard_Integer InquirePlaneLimit() = 0; |
76 | |
77 | //! call_togl_inquireview |
78 | Standard_EXPORT virtual Standard_Integer InquireViewLimit() = 0; |
79 | |
80 | //! call_togl_displaystructure |
81 | Standard_EXPORT virtual void DisplayStructure (const Graphic3d_CView& theCView, const Handle(Graphic3d_Structure)& theStructure, const Standard_Integer thePriority) = 0; |
82 | |
83 | //! call_togl_erasestructure |
84 | Standard_EXPORT virtual void EraseStructure (const Graphic3d_CView& theCView, const Handle(Graphic3d_Structure)& theStructure) = 0; |
85 | |
86 | //! call_togl_removestructure |
87 | Standard_EXPORT virtual void RemoveStructure (Handle(Graphic3d_CStructure)& theCStructure) = 0; |
88 | |
89 | //! Creates new empty graphic structure |
90 | Standard_EXPORT virtual Handle(Graphic3d_CStructure) Structure (const Handle(Graphic3d_StructureManager)& theManager) = 0; |
91 | |
92 | //! call_togl_activateview |
93 | Standard_EXPORT virtual void ActivateView (const Graphic3d_CView& ACView) = 0; |
94 | |
95 | //! call_togl_antialiasing |
96 | Standard_EXPORT virtual void AntiAliasing (const Graphic3d_CView& ACView, const Standard_Boolean AFlag) = 0; |
97 | |
98 | //! call_togl_background |
99 | Standard_EXPORT virtual void Background (const Graphic3d_CView& ACView) = 0; |
100 | |
101 | //! call_togl_gradient_background |
102 | Standard_EXPORT virtual void GradientBackground (const Graphic3d_CView& ACView, const Quantity_Color& AColor1, const Quantity_Color& AColor2, const Aspect_GradientFillMethod FillStyle) = 0; |
103 | |
104 | Standard_EXPORT virtual void BackgroundImage (const Standard_CString FileName, const Graphic3d_CView& ACView, const Aspect_FillMethod FillStyle) = 0; |
105 | |
106 | Standard_EXPORT virtual void SetBgImageStyle (const Graphic3d_CView& ACView, const Aspect_FillMethod FillStyle) = 0; |
107 | |
108 | Standard_EXPORT virtual void SetBgGradientStyle (const Graphic3d_CView& ACView, const Aspect_GradientFillMethod FillStyle) = 0; |
109 | |
110 | //! call_togl_cliplimit |
111 | Standard_EXPORT virtual void ClipLimit (const Graphic3d_CView& ACView, const Standard_Boolean AWait) = 0; |
112 | |
113 | //! call_togl_deactivateview |
114 | Standard_EXPORT virtual void DeactivateView (const Graphic3d_CView& ACView) = 0; |
115 | |
116 | //! call_togl_cliplimit |
117 | Standard_EXPORT virtual void DepthCueing (const Graphic3d_CView& ACView, const Standard_Boolean AFlag) = 0; |
118 | |
119 | //! call_togl_ratio_window |
120 | Standard_EXPORT virtual void RatioWindow (const Graphic3d_CView& ACView) = 0; |
121 | |
122 | //! Redraw content of the view |
123 | Standard_EXPORT virtual void Redraw (const Graphic3d_CView& theCView, const Aspect_CLayer2d& theCUnderLayer, const Aspect_CLayer2d& theCOverLayer, const Standard_Integer theX = 0, const Standard_Integer theY = 0, const Standard_Integer theWidth = 0, const Standard_Integer theHeight = 0) = 0; |
124 | |
125 | //! Redraw layer of immediate presentations |
126 | Standard_EXPORT virtual void RedrawImmediate (const Graphic3d_CView& theCView, const Aspect_CLayer2d& theCUnderLayer, const Aspect_CLayer2d& theCOverLayer) = 0; |
127 | |
128 | //! Invalidates content of the view but does not redraw it |
129 | Standard_EXPORT virtual void Invalidate (const Graphic3d_CView& theCView) = 0; |
62e1beed |
130 | |
131 | //! Returns true if cached view content has been invalidated. |
132 | Standard_EXPORT virtual Standard_Boolean IsInvalidated (const Graphic3d_CView& theCView) const = 0; |
133 | |
42cf5bc1 |
134 | //! call_togl_removeview |
135 | Standard_EXPORT virtual void RemoveView (const Graphic3d_CView& ACView) = 0; |
136 | |
137 | //! call_togl_setlight |
138 | Standard_EXPORT virtual void SetLight (const Graphic3d_CView& ACView) = 0; |
139 | |
140 | //! Pass clip planes to the associated graphic driver view. |
141 | Standard_EXPORT virtual void SetClipPlanes (const Graphic3d_CView& theCView) = 0; |
142 | |
143 | //! Inform graphic driver if camera assigned to view changes. |
144 | Standard_EXPORT virtual void SetCamera (const Graphic3d_CView& theCView) = 0; |
145 | |
146 | //! call_togl_setvisualisation |
147 | Standard_EXPORT virtual void SetVisualisation (const Graphic3d_CView& ACView) = 0; |
148 | |
149 | //! call_togl_view |
150 | Standard_EXPORT virtual Standard_Boolean View (Graphic3d_CView& ACView) = 0; |
151 | |
152 | Standard_EXPORT virtual void Environment (const Graphic3d_CView& ACView) = 0; |
153 | |
154 | //! enables/disables usage of OpenGL vertex buffer arrays while drawing primitiev arrays |
155 | Standard_EXPORT virtual void EnableVBO (const Standard_Boolean status) = 0; |
156 | |
157 | //! Returns information about GPU memory usage. |
158 | Standard_EXPORT virtual Standard_Boolean MemoryInfo (Standard_Size& theFreeBytes, TCollection_AsciiString& theInfo) const = 0; |
159 | |
160 | //! call_togl_ztriedron_setup |
161 | Standard_EXPORT virtual void ZBufferTriedronSetup (const Graphic3d_CView& theCView, 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) = 0; |
162 | |
163 | //! call_togl_triedron_display |
164 | Standard_EXPORT virtual 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) = 0; |
165 | |
166 | //! call_togl_triedron_erase |
167 | Standard_EXPORT virtual void TriedronErase (const Graphic3d_CView& ACView) = 0; |
168 | |
169 | //! call_togl_triedron_echo |
170 | Standard_EXPORT virtual void TriedronEcho (const Graphic3d_CView& ACView, const Aspect_TypeOfTriedronEcho AType = Aspect_TOTE_NONE) = 0; |
171 | |
172 | //! call_togl_graduatedtrihedron_display |
173 | Standard_EXPORT virtual void GraduatedTrihedronDisplay (const Graphic3d_CView& theView, const Graphic3d_GraduatedTrihedron& theCubic) = 0; |
174 | |
175 | //! call_togl_graduatedtrihedron_erase |
176 | Standard_EXPORT virtual void GraduatedTrihedronErase (const Graphic3d_CView& theView) = 0; |
177 | |
178 | //! Sets minimum and maximum points of scene bounding box for Graduated Trihedron |
179 | //! stored in graphic view object. |
180 | //! @param theView [in] current graphic view |
181 | //! @param theMin [in] the minimum point of scene. |
182 | //! @param theMax [in] the maximum point of scene. |
183 | Standard_EXPORT virtual void GraduatedTrihedronMinMaxValues (const Graphic3d_CView& theView, const Graphic3d_Vec3 theMin, const Graphic3d_Vec3 theMax) = 0; |
184 | |
185 | //! @param theDrawToFrontBuffer Advanced option to modify rendering mode: |
186 | //! 1. TRUE. Drawing immediate mode structures directly to the front buffer over the scene image. |
187 | //! Fast, so preferred for interactive work (used by default). |
188 | //! However these extra drawings will be missed in image dump since it is performed from back buffer. |
189 | //! Notice that since no pre-buffering used the V-Sync will be ignored and rendering could be seen |
190 | //! in run-time (in case of slow hardware) and/or tearing may appear. |
191 | //! So this is strongly recommended to draw only simple (fast) structures. |
192 | //! 2. FALSE. Drawing immediate mode structures to the back buffer. |
193 | //! The complete scene is redrawn first, so this mode is slower if scene contains complex data and/or V-Sync is turned on. |
194 | //! But it works in any case and is especially useful for view dump because the dump image is read from the back buffer. |
195 | //! @return previous mode. |
196 | Standard_EXPORT virtual Standard_Boolean SetImmediateModeDrawToFront (const Graphic3d_CView& theCView, const Standard_Boolean theDrawToFrontBuffer) = 0; |
42cf5bc1 |
197 | |
42cf5bc1 |
198 | //! call_togl_layer2d |
199 | Standard_EXPORT virtual void Layer (Aspect_CLayer2d& ACLayer) = 0; |
200 | |
201 | //! call_togl_removelayer2d |
202 | Standard_EXPORT virtual void RemoveLayer (const Aspect_CLayer2d& ACLayer) = 0; |
203 | |
204 | //! call_togl_begin_layer2d |
205 | Standard_EXPORT virtual void BeginLayer (const Aspect_CLayer2d& ACLayer) = 0; |
206 | |
207 | //! call_togl_begin_polygon2d |
208 | Standard_EXPORT virtual void BeginPolygon2d() = 0; |
209 | |
210 | //! call_togl_begin_polyline2d |
211 | Standard_EXPORT virtual void BeginPolyline2d() = 0; |
212 | |
213 | //! call_togl_clear_layer2d |
214 | Standard_EXPORT virtual void ClearLayer (const Aspect_CLayer2d& ACLayer) = 0; |
215 | |
216 | //! call_togl_draw2d |
217 | Standard_EXPORT virtual void Draw (const Standard_ShortReal X, const Standard_ShortReal Y) = 0; |
218 | |
219 | //! call_togl_edge2d |
220 | Standard_EXPORT virtual void Edge (const Standard_ShortReal X, const Standard_ShortReal Y) = 0; |
221 | |
222 | //! call_togl_end_layer2d |
223 | Standard_EXPORT virtual void EndLayer() = 0; |
224 | |
225 | //! call_togl_end_polygon2d |
226 | Standard_EXPORT virtual void EndPolygon2d() = 0; |
227 | |
228 | //! call_togl_end_polyline2d |
229 | Standard_EXPORT virtual void EndPolyline2d() = 0; |
230 | |
231 | //! call_togl_move2d |
232 | Standard_EXPORT virtual void Move (const Standard_ShortReal X, const Standard_ShortReal Y) = 0; |
233 | |
234 | //! call_togl_rectangle2d |
235 | Standard_EXPORT virtual void Rectangle (const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal Width, const Standard_ShortReal Height) = 0; |
236 | |
237 | //! call_togl_set_color |
238 | Standard_EXPORT virtual void SetColor (const Standard_ShortReal R, const Standard_ShortReal G, const Standard_ShortReal B) = 0; |
239 | |
240 | //! call_togl_set_transparency |
241 | Standard_EXPORT virtual void SetTransparency (const Standard_ShortReal ATransparency) = 0; |
242 | |
243 | //! call_togl_unset_transparency |
244 | Standard_EXPORT virtual void UnsetTransparency() = 0; |
245 | |
246 | //! call_togl_set_line_attributes |
247 | Standard_EXPORT virtual void SetLineAttributes (const Standard_Integer Type, const Standard_ShortReal Width) = 0; |
248 | |
249 | //! Set text attributes for under-/overlayer. |
250 | //! <Font> argument defines the name of the font to be used, |
251 | //! <Type> argument defines the display type of the text, |
252 | //! <R> <G> <B> values define the color of decal or subtitle background. |
253 | //! To set the color of the text you can use the SetColor method. |
254 | Standard_EXPORT virtual void SetTextAttributes (const Standard_CString Font, const Standard_Integer Type, const Standard_ShortReal R, const Standard_ShortReal G, const Standard_ShortReal B) = 0; |
255 | |
256 | //! call_togl_text2d |
257 | //! If AHeight < 0 default text height is used by driver (DefaultTextHeight method) |
258 | Standard_EXPORT virtual void Text (const Standard_CString AText, const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal AHeight) = 0; |
259 | |
260 | Standard_EXPORT virtual Standard_ShortReal DefaultTextHeight() const = 0; |
261 | |
262 | //! call_togl_textsize2d |
263 | Standard_EXPORT virtual void TextSize (const Standard_CString AText, const Standard_ShortReal AHeight, Standard_ShortReal& AWidth, Standard_ShortReal& AnAscent, Standard_ShortReal& ADescent) const = 0; |
264 | |
265 | //! call_togl_backfacing |
266 | Standard_EXPORT virtual void SetBackFacingModel (const Graphic3d_CView& aView) = 0; |
267 | |
268 | //! Reads depths of shown pixels of the given |
269 | //! rectangle (glReadPixels with GL_DEPTH_COMPONENT) |
270 | Standard_EXPORT virtual 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 = 0; |
271 | |
272 | //! Generate offscreen FBO in the graphic library. |
273 | //! If not supported on hardware returns NULL. |
274 | Standard_EXPORT virtual Graphic3d_PtrFrameBuffer FBOCreate (const Graphic3d_CView& view, const Standard_Integer width, const Standard_Integer height) = 0; |
275 | |
276 | //! Remove offscreen FBO from the graphic library |
277 | Standard_EXPORT virtual void FBORelease (const Graphic3d_CView& view, Graphic3d_PtrFrameBuffer& fboPtr) = 0; |
278 | |
279 | //! Read offscreen FBO configuration. |
280 | Standard_EXPORT virtual void FBOGetDimensions (const Graphic3d_CView& view, const Graphic3d_PtrFrameBuffer fboPtr, Standard_Integer& width, Standard_Integer& height, Standard_Integer& widthMax, Standard_Integer& heightMax) = 0; |
281 | |
282 | //! Change offscreen FBO viewport. |
283 | Standard_EXPORT virtual void FBOChangeViewport (const Graphic3d_CView& view, Graphic3d_PtrFrameBuffer& fboPtr, const Standard_Integer width, const Standard_Integer height) = 0; |
284 | |
285 | //! Dump active rendering buffer into specified memory buffer. |
286 | Standard_EXPORT virtual Standard_Boolean BufferDump (const Graphic3d_CView& theCView, Image_PixMap& theImage, const Graphic3d_BufferType& theBufferType) = 0; |
287 | |
288 | //! call_togl_gllight |
289 | Standard_EXPORT virtual void SetGLLightEnabled (const Graphic3d_CView& view, const Standard_Boolean isEnabled) const = 0; |
290 | |
291 | //! call_togl_isgllight |
292 | Standard_EXPORT virtual Standard_Boolean IsGLLightEnabled (const Graphic3d_CView& view) const = 0; |
293 | |
294 | //! print the contents of all layers of the view to the printer. |
295 | //! <hPrnDC> : Pass the PrinterDeviceContext (HDC), |
296 | //! <showBackground> : When set to FALSE then print the view without background color |
297 | //! (background is white) |
298 | //! else set to TRUE for printing with current background color. |
299 | //! <filename>: If != NULL, then the view will be printed to a file. |
300 | //! <printAlgorithm>: Select print algorithm: stretch, tile. |
301 | //! <theScaleFactor>: Scaling coefficient, used internally to scale the |
302 | //! printings accordingly to the scale factor selected in the printer |
303 | //! properties dialog. |
304 | //! Returns Standard_True if the data is passed to the printer, otherwise |
305 | //! Standard_False if the print operation failed due to the printer errors, |
306 | //! or insufficient system memory available. |
307 | Standard_EXPORT virtual Standard_Boolean Print (const Graphic3d_CView& ACView, const Aspect_CLayer2d& ACUnderLayer, const Aspect_CLayer2d& ACOverLayer, const Aspect_Handle hPrnDC, const Standard_Boolean showBackground, const Standard_CString filename, const Aspect_PrintAlgo printAlgorithm = Aspect_PA_STRETCH, const Standard_Real theScaleFactor = 1.0) const = 0; |
308 | |
309 | |
310 | //! Export scene into the one of the Vector graphics formats (SVG, PS, PDF...). |
311 | //! In contrast to Bitmaps, Vector graphics is scalable (so you may got quality benefits on printing to laser printer). |
312 | //! Notice however that results may differ a lot and do not contain some elements. |
313 | Standard_EXPORT virtual 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) = 0; |
314 | |
315 | |
316 | //! Marks BVH tree and the set of BVH primitives of correspondent priority list with id theLayerId as outdated. |
317 | Standard_EXPORT virtual void InvalidateBVHData (Graphic3d_CView& theCView, const Standard_Integer theLayerId) = 0; |
318 | |
319 | //! Add a new top-level z layer with ID <theLayerId> for |
320 | //! the view. Z layers allow drawing structures in higher layers |
321 | //! in foreground of structures in lower layers. To add a structure |
322 | //! to desired layer on display it is necessary to set the layer |
323 | //! ID for the structure. |
324 | Standard_EXPORT virtual void AddZLayer (const Graphic3d_CView& theCView, const Graphic3d_ZLayerId theLayerId) = 0; |
325 | |
326 | //! Remove Z layer from the specified view. All structures |
327 | //! displayed at the moment in layer will be displayed in default layer |
328 | //! ( the bottom-level z layer ). To unset layer ID from associated |
329 | //! structures use method UnsetZLayer (...). |
330 | Standard_EXPORT virtual void RemoveZLayer (const Graphic3d_CView& theCView, const Graphic3d_ZLayerId theLayerId) = 0; |
331 | |
332 | //! Unset Z layer ID for all structures. The structure |
333 | //! indexes will be set to default layer ( the bottom-level z layer |
334 | //! with ID = 0 ). |
335 | Standard_EXPORT virtual void UnsetZLayer (const Graphic3d_ZLayerId theLayerId) = 0; |
336 | |
337 | //! Change Z layer of a structure already presented in view. |
338 | Standard_EXPORT virtual void ChangeZLayer (const Graphic3d_CStructure& theCStructure, const Graphic3d_CView& theCView, const Graphic3d_ZLayerId theNewLayerId) = 0; |
339 | |
340 | //! Sets the settings for a single Z layer of specified view. |
341 | Standard_EXPORT virtual void SetZLayerSettings (const Graphic3d_CView& theCView, const Graphic3d_ZLayerId theLayerId, const Graphic3d_ZLayerSettings& theSettings) = 0; |
342 | |
343 | //! Changes the priority of a structure within its Z layer in the specified view. |
344 | Standard_EXPORT virtual void ChangePriority (const Graphic3d_CStructure& theCStructure, const Graphic3d_CView& theCView, const Standard_Integer theNewPriority) = 0; |
345 | |
346 | Standard_EXPORT void PrintBoolean (const Standard_CString AComment, const Standard_Boolean AValue) const; |
347 | |
348 | Standard_EXPORT void PrintCLight (const Graphic3d_CLight& ACLight, const Standard_Integer AField) const; |
349 | |
350 | Standard_EXPORT void PrintCStructure (const Graphic3d_CStructure& ACStructure, const Standard_Integer AField) const; |
351 | |
352 | Standard_EXPORT void PrintCView (const Graphic3d_CView& ACView, const Standard_Integer AField) const; |
353 | |
354 | Standard_EXPORT void PrintFunction (const Standard_CString AFunc) const; |
355 | |
356 | Standard_EXPORT void PrintInteger (const Standard_CString AComment, const Standard_Integer AValue) const; |
357 | |
358 | Standard_EXPORT void PrintIResult (const Standard_CString AFunc, const Standard_Integer AResult) const; |
359 | |
360 | Standard_EXPORT void PrintShortReal (const Standard_CString AComment, const Standard_ShortReal AValue) const; |
361 | |
362 | Standard_EXPORT void PrintMatrix (const Standard_CString AComment, const TColStd_Array2OfReal& AMatrix) const; |
363 | |
364 | Standard_EXPORT void PrintString (const Standard_CString AComment, const Standard_CString AString) const; |
365 | |
366 | Standard_EXPORT void SetTrace (const Standard_Integer ALevel); |
367 | |
368 | Standard_EXPORT Standard_Integer Trace() const; |
369 | |
370 | //! returns Handle to display connection |
371 | Standard_EXPORT const Handle(Aspect_DisplayConnection)& GetDisplayConnection() const; |
372 | |
373 | Standard_EXPORT Standard_Boolean IsDeviceLost() const; |
374 | |
375 | Standard_EXPORT void ResetDeviceLostFlag(); |
376 | |
377 | |
378 | |
379 | |
380 | DEFINE_STANDARD_RTTI(Graphic3d_GraphicDriver,MMgt_TShared) |
381 | |
382 | protected: |
383 | |
384 | |
385 | //! Initialises the Driver |
386 | Standard_EXPORT Graphic3d_GraphicDriver(const Handle(Aspect_DisplayConnection)& theDisp); |
387 | |
388 | Standard_Integer MyTraceLevel; |
389 | Handle(Aspect_DisplayConnection) myDisplayConnection; |
390 | Standard_Boolean myDeviceLostFlag; |
391 | |
392 | |
393 | private: |
394 | |
395 | |
396 | |
397 | |
398 | }; |
399 | |
400 | |
401 | |
402 | |
403 | |
404 | |
405 | |
406 | #endif // _Graphic3d_GraphicDriver_HeaderFile |