0024785: Visualization - Modifying z-layers concept to gain more control over OpenGl...
[occt.git] / src / Graphic3d / Graphic3d_GraphicDriver.cdl
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 deferred class GraphicDriver from Graphic3d inherits TShared
18
19     ---Version:
20
21     ---Purpose: This class allows the definition of a graphic driver
22     --      (currently only OpenGl driver is used).
23
24     ---Keywords: OpenGl
25
26     ---Warning:
27     ---References:
28
29 uses
30
31     SharedLibrary       from OSD,
32
33     Array1OfInteger     from TColStd,
34     Array1OfReal        from TColStd,
35     Array2OfReal        from TColStd,
36
37     AsciiString         from TCollection,
38     ExtendedString      from TCollection,
39
40     NameOfColor         from Quantity,
41     Color               from Quantity,
42
43     PlaneAngle          from Quantity,
44
45     PixMap              from Image,
46
47     Array1OfEdge        from Aspect,
48     CLayer2d            from Aspect,
49     TypeOfTriedronEcho  from Aspect,
50     TypeOfTriedronPosition  from Aspect,
51     Handle              from Aspect,
52     Display             from Aspect,
53     PrintAlgo           from Aspect,
54     DisplayConnection_Handle from Aspect,
55
56     ZLayerSettings      from Graphic3d,
57
58     AspectLine3d        from Graphic3d,
59     AspectMarker3d      from Graphic3d,
60     AspectText3d        from Graphic3d,
61     AspectFillArea3d    from Graphic3d,
62     HorizontalTextAlignment from Graphic3d,
63     CBitFields20        from Graphic3d,
64     Group               from Graphic3d,
65     CLight              from Graphic3d,
66     CPick               from Graphic3d,
67     CPlane              from Graphic3d,
68     CStructure          from Graphic3d,
69     CStructure_Handle   from Graphic3d,
70     CView               from Graphic3d,
71     BufferType          from Graphic3d,
72     Structure           from Graphic3d,
73     StructureManager    from Graphic3d,
74     TextPath            from Graphic3d,
75     TypeOfComposition   from Graphic3d,
76     TypeOfPrimitive     from Graphic3d,
77     Vector              from Graphic3d,
78     Array1OfVertex      from Graphic3d,
79     Array2OfVertex      from Graphic3d,
80     Vertex              from Graphic3d,
81     VerticalTextAlignment   from Graphic3d,
82     PrimitiveArray      from Graphic3d,
83     PtrFrameBuffer      from Graphic3d,
84     HArray1OfByte       from TColStd,
85     FillMethod          from Aspect,
86     GradientFillMethod  from Aspect,
87     ExportFormat        from Graphic3d,
88     SortType            from Graphic3d,
89     HArray1OfReal       from TColStd,
90     CUserDraw           from Graphic3d,
91     NListOfHAsciiString from Graphic3d,
92     FontAspect          from Font,
93     CGraduatedTrihedron from Graphic3d,
94     ClipPlane           from Graphic3d,
95     Ax2                 from gp
96
97 raises
98
99     TransformError      from Graphic3d
100
101 is
102         Initialize ( AShrName       : CString from Standard )
103                 returns mutable GraphicDriver from Graphic3d;
104         ---Level: Public
105         ---Purpose: Initialises the Driver
106
107     -------------------------
108     -- Category: Init methods
109     -------------------------
110
111     Begin (me: mutable;
112            theDisplayConnection: DisplayConnection_Handle from Aspect)
113        returns Boolean from Standard
114        is deferred;
115     ---Purpose: Starts graphic driver with given connection
116
117     End ( me    : mutable )
118         is deferred;
119     ---Purpose: call_togl_end
120
121     ----------------------------
122     -- Category: Inquire methods
123     ----------------------------
124
125     InquireLightLimit ( me  : mutable )
126         returns Integer from Standard
127         is deferred;
128     ---Purpose: call_togl_inquirelight
129
130     InquirePlaneLimit ( me  : mutable )
131         returns Integer from Standard
132         is deferred;
133     ---Purpose: call_togl_inquireplane
134
135     InquireViewLimit ( me   : mutable )
136         returns Integer from Standard
137         is deferred;
138     ---Purpose: call_togl_inquireview
139
140     -----------------------------------------
141     -- Category: Structure management methods
142     -----------------------------------------
143
144     DisplayStructure ( me            : mutable;
145                        theCView      : CView from Graphic3d;
146                        theCStructure : in out CStructure from Graphic3d;
147                        thePriority   : Integer from Standard )
148         is deferred;
149     ---Purpose: call_togl_displaystructure
150
151     EraseStructure ( me            : mutable;
152                      theCView      : CView from Graphic3d;
153                      theCStructure : in out CStructure from Graphic3d )
154         is deferred;
155     ---Purpose: call_togl_erasestructure
156
157     RemoveStructure ( me            : mutable;
158                       theCStructure : in out CStructure_Handle from Graphic3d )
159         is deferred;
160     ---Purpose: call_togl_removestructure
161
162     Structure (me : mutable;
163                theManager : StructureManager from Graphic3d)
164         returns CStructure_Handle from Graphic3d
165         is deferred;
166     ---Purpose: Creates new empty graphic structure
167
168     ------------------------------------
169     -- Category: Structured mode methods
170     ------------------------------------
171
172     ActivateView ( me       : mutable;
173                    ACView   : CView from Graphic3d )
174         is deferred;
175     ---Purpose: call_togl_activateview
176
177     AntiAliasing ( me       : mutable;
178                    ACView   : CView from Graphic3d;
179                    AFlag    : Boolean from Standard )
180         is deferred;
181     ---Purpose: call_togl_antialiasing
182
183     Background ( me     : mutable;
184                  ACView : CView from Graphic3d )
185         is deferred;
186     ---Purpose: call_togl_background
187
188     GradientBackground ( me     : mutable;
189                          ACView : CView from Graphic3d;
190                          AColor1: Color from Quantity;
191                          AColor2: Color from Quantity;
192                          FillStyle : GradientFillMethod from Aspect
193                        )
194     is deferred;
195     ---Purpose: call_togl_gradient_background
196
197
198     BackgroundImage( me           : mutable;
199                      FileName     : CString from Standard;
200                      ACView       : CView from Graphic3d;
201                      FillStyle    : FillMethod from Aspect )
202     is deferred;
203
204     SetBgImageStyle( me        : mutable;
205                      ACView    : CView from Graphic3d;
206                      FillStyle : FillMethod from Aspect )
207     is deferred;
208
209     SetBgGradientStyle( me        : mutable;
210                         ACView    : CView from Graphic3d;
211                         FillStyle : GradientFillMethod from Aspect )
212     is deferred;
213
214     ClipLimit ( me      : mutable;
215                 ACView  : CView from Graphic3d;
216                 AWait   : Boolean from Standard )
217         is deferred;
218     ---Purpose: call_togl_cliplimit
219
220     DeactivateView ( me     : mutable;
221                      ACView : CView from Graphic3d )
222         is deferred;
223     ---Purpose: call_togl_deactivateview
224
225     DepthCueing ( me        : mutable;
226                   ACView    : CView from Graphic3d;
227                   AFlag     : Boolean from Standard )
228         is deferred;
229     ---Purpose: call_togl_cliplimit
230
231     RatioWindow ( me        : mutable;
232                   ACView    : CView from Graphic3d )
233         is deferred;
234     ---Purpose: call_togl_ratio_window
235
236     Redraw ( me             : mutable;
237              theCView       : CView from Graphic3d;
238              theCUnderLayer : CLayer2d from Aspect;
239              theCOverLayer  : CLayer2d from Aspect;
240              theX           : Integer = 0;
241              theY           : Integer = 0;
242              theWidth       : Integer = 0;
243              theHeight      : Integer = 0 )
244     is deferred;
245     ---Purpose: Redraw content of the view
246
247     RedrawImmediate ( me               : mutable;
248                       theCView         : CView from Graphic3d;
249                       theCUnderLayer   : CLayer2d from Aspect;
250                       theCOverLayer    : CLayer2d from Aspect )
251     is deferred;
252     ---Purpose: Redraw layer of immediate presentations
253
254     Invalidate ( me       : mutable;
255                  theCView : CView from Graphic3d )
256     is deferred;
257     ---Purpose: Invalidates content of the view but does not redraw it
258
259     RemoveView ( me     : mutable;
260                 ACView  : CView from Graphic3d )
261         is deferred;
262     ---Purpose: call_togl_removeview
263
264     SetLight ( me       : mutable;
265            ACView   : CView from Graphic3d )
266         is deferred;
267     ---Purpose: call_togl_setlight
268
269     SetClipPlanes (me : mutable; theCView : CView from Graphic3d) is deferred;
270     ---Purpose: Pass clip planes to the associated graphic driver view.
271
272     SetCamera (me : mutable; theCView : CView from Graphic3d)
273          is deferred;
274     ---Purpose: Inform graphic driver if camera assigned to view changes.
275
276     SetVisualisation ( me       : mutable;
277                        ACView   : CView from Graphic3d )
278         is deferred;
279     ---Purpose: call_togl_setvisualisation
280
281     Transparency ( me       : mutable;
282                    ACView   : CView from Graphic3d;
283                    AFlag    : Boolean from Standard )
284         is deferred;
285     ---Purpose: call_togl_transparency
286
287     View ( me   : mutable;
288            ACView   : in out CView from Graphic3d )
289         returns Boolean from Standard
290         is deferred;
291     ---Purpose: call_togl_view
292
293         Environment ( me        : mutable;
294                       ACView    : CView from Graphic3d )
295         is deferred;
296     ---Purpose:
297
298     ----------------------------------------
299     ---Category: Methods to create Triangle
300     -- for Purpose : see Graphic3d_Group.cdl
301     ----------------------------------------
302
303     EnableVBO( me       : mutable;
304                status   : Boolean from Standard )
305                is deferred;
306     ---Purpose: enables/disables usage of OpenGL vertex buffer arrays while drawing primitiev arrays
307
308     MemoryInfo (me;
309                 theFreeBytes : out Size from Standard;
310                 theInfo      : out AsciiString from TCollection) returns Boolean from Standard is deferred;
311     ---Purpose: Returns information about GPU memory usage.
312
313     ----------------------------------------
314     ---Category: Methods to create Triedron
315     -- for Purpose : see Graphic3d_Group.cdl
316     ----------------------------------------
317
318     ZBufferTriedronSetup ( me          : mutable;
319                            XColor      : NameOfColor from Quantity = Quantity_NOC_RED;
320                            YColor      : NameOfColor from Quantity = Quantity_NOC_GREEN;
321                            ZColor      : NameOfColor from Quantity = Quantity_NOC_BLUE1;
322                            SizeRatio   : Real from Standard = 0.8;
323                            AxisDiametr : Real from Standard = 0.05;
324                            NbFacettes  : Integer from Standard = 12)
325          is deferred;
326         ---Purpose: call_togl_ztriedron_setup
327
328     TriedronDisplay ( me            : mutable;
329                       ACView        : CView from Graphic3d;
330                       APosition     : TypeOfTriedronPosition from Aspect  = Aspect_TOTP_CENTER;
331                       AColor        : NameOfColor from Quantity = Quantity_NOC_WHITE ;
332                       AScale        : Real from Standard  =  0.02;
333                       AsWireframe   : Boolean from Standard = Standard_True )
334         is deferred;
335     ---Purpose: call_togl_triedron_display
336
337
338     TriedronErase ( me      : mutable;
339                   ACView    : CView from Graphic3d)
340         is deferred;
341     ---Purpose: call_togl_triedron_erase
342
343
344     TriedronEcho ( me       : mutable;
345                    ACView   : CView from Graphic3d;
346                    AType    : TypeOfTriedronEcho from Aspect  = Aspect_TOTE_NONE )
347         is deferred;
348     ---Purpose: call_togl_triedron_echo
349
350     ---------------------------------
351     ---Category: Graduated  trihedron
352     ---------------------------------
353
354     GraduatedTrihedronDisplay(me : mutable;
355                               view : CView from Graphic3d;
356                               cubic : CGraduatedTrihedron from Graphic3d)
357     ---Purpose: call_togl_graduatedtrihedron_display
358     is deferred;
359
360     GraduatedTrihedronErase(me : mutable;
361                             view : CView from Graphic3d)
362     ---Purpose: call_togl_graduatedtrihedron_erase
363     is deferred;
364
365     GraduatedTrihedronMinMaxValues(me : mutable;
366                                    xmin : ShortReal from Standard;
367                                    ymin : ShortReal from Standard;
368                                    zmin : ShortReal from Standard;
369                                    xmax : ShortReal from Standard;
370                                    ymax : ShortReal from Standard;
371                                    zmax : ShortReal from Standard)
372     ---Purpose: call_togl_graduatedtrihedron_minmaxvalues
373     is deferred;
374
375     ----------------------------------
376     -- Category: Immediate mode methods
377     ----------------------------------
378
379     SetImmediateModeDrawToFront (me                   : mutable;
380                                  theCView             : CView from Graphic3d;
381                                  theDrawToFrontBuffer : Boolean from Standard)
382     returns Boolean from Standard
383     is deferred;
384     ---Purpose: @param theDrawToFrontBuffer Advanced option to modify rendering mode:
385     -- 1. TRUE.  Drawing immediate mode structures directly to the front buffer over the scene image.
386     --    Fast, so preferred for interactive work (used by default).
387     --    However these extra drawings will be missed in image dump since it is performed from back buffer.
388     --    Notice that since no pre-buffering used the V-Sync will be ignored and rendering could be seen
389     --    in run-time (in case of slow hardware) and/or tearing may appear.
390     --    So this is strongly recommended to draw only simple (fast) structures.
391     -- 2. FALSE. Drawing immediate mode structures to the back buffer.
392     --    The complete scene is redrawn first, so this mode is slower if scene contains complex data and/or V-Sync is turned on.
393     --    But it works in any case and is especially useful for view dump because the dump image is read from the back buffer.
394     -- @return previous mode.
395
396     DisplayImmediateStructure ( me            : mutable;
397                                 theCView      : CView      from Graphic3d;
398                                 theCStructure : CStructure from Graphic3d )
399     is deferred;
400     ---Purpose: Display structure in immediate mode on top of general presentation
401
402     EraseImmediateStructure ( me            : mutable;
403                               theCView      : CView      from Graphic3d;
404                               theCStructure : CStructure from Graphic3d )
405     is deferred;
406     ---Purpose: Erases immediate structure
407
408     -------------------------------
409     -- Category: Layer mode methods
410     -------------------------------
411
412     Layer ( me      : mutable;
413             ACLayer : in out CLayer2d from Aspect )
414         is deferred;
415     ---Purpose: call_togl_layer2d
416
417     RemoveLayer ( me        : mutable;
418                   ACLayer   : CLayer2d from Aspect )
419         is deferred;
420     ---Purpose: call_togl_removelayer2d
421
422     BeginLayer ( me         : mutable;
423                  ACLayer    : CLayer2d from Aspect )
424         is deferred;
425     ---Purpose: call_togl_begin_layer2d
426
427     BeginPolygon2d ( me : mutable )
428         is deferred;
429     ---Purpose: call_togl_begin_polygon2d
430
431     BeginPolyline2d ( me    : mutable )
432         is deferred;
433     ---Purpose: call_togl_begin_polyline2d
434
435     ClearLayer ( me         : mutable;
436                  ACLayer    : CLayer2d from Aspect )
437         is deferred;
438     ---Purpose: call_togl_clear_layer2d
439
440     Draw ( me   : mutable;
441            X    : ShortReal from Standard;
442            Y    : ShortReal from Standard )
443         is deferred;
444     ---Purpose: call_togl_draw2d
445
446     Edge ( me   : mutable;
447            X    : ShortReal from Standard;
448            Y    : ShortReal from Standard )
449         is deferred;
450     ---Purpose: call_togl_edge2d
451
452     EndLayer ( me       : mutable )
453         is deferred;
454     ---Purpose: call_togl_end_layer2d
455
456     EndPolygon2d ( me   : mutable )
457         is deferred;
458     ---Purpose: call_togl_end_polygon2d
459
460     EndPolyline2d ( me  : mutable )
461         is deferred;
462     ---Purpose: call_togl_end_polyline2d
463
464     Move ( me   : mutable;
465            X    : ShortReal from Standard;
466            Y    : ShortReal from Standard )
467         is deferred;
468     ---Purpose: call_togl_move2d
469
470     Rectangle ( me              : mutable;
471                 X, Y            : ShortReal from Standard;
472                 Width, Height   : ShortReal from Standard )
473         is deferred;
474     ---Purpose: call_togl_rectangle2d
475
476     SetColor ( me   : mutable;
477                R    : ShortReal from Standard;
478                G    : ShortReal from Standard;
479                B    : ShortReal from Standard )
480         is deferred;
481     ---Purpose: call_togl_set_color
482
483     SetTransparency ( me    : mutable;
484            ATransparency    : ShortReal from Standard )
485         is deferred;
486     ---Purpose: call_togl_set_transparency
487
488     UnsetTransparency ( me  : mutable )
489         is deferred;
490     ---Purpose: call_togl_unset_transparency
491
492     SetLineAttributes ( me      : mutable;
493                         Type    : Integer from Standard;
494                         Width   : ShortReal from Standard )
495         is deferred;
496     ---Purpose: call_togl_set_line_attributes
497
498
499     SetTextAttributes ( me      : mutable;
500                         Font    : CString from Standard;
501                         Type    : Integer from Standard;
502                         R       : ShortReal from Standard;
503                         G       : ShortReal from Standard;
504                         B       : ShortReal from Standard )
505         is deferred;
506     ---Purpose: Set text attributes for under-/overlayer.
507     -- <Font> argument defines the name of the font to be used,
508     -- <Type> argument defines the display type of the text,
509     -- <R> <G> <B> values define the color of decal or subtitle background.
510     -- To set the color of the text you can use the SetColor method.
511
512     Text ( me       : mutable;
513            AText    : CString from Standard;
514            X, Y     : ShortReal from Standard;
515            AHeight  : ShortReal from Standard )
516         is deferred;
517     ---Purpose: call_togl_text2d
518     -- If AHeight < 0 default text height is used by driver (DefaultTextHeight method)
519
520     DefaultTextHeight( me )
521         returns ShortReal from Standard
522         is deferred;
523
524
525     TextSize( me;
526               AText    : CString from Standard;
527               AHeight  : ShortReal from Standard;
528               AWidth   : in out ShortReal from Standard;
529               AnAscent : in out ShortReal from Standard;
530               ADescent : in out ShortReal from Standard )
531             is deferred;
532     ---Purpose: call_togl_textsize2d
533
534         SetBackFacingModel ( me    : mutable;
535                              aView : CView from Graphic3d )
536             is deferred;
537         ---Purpose: call_togl_backfacing
538
539         SetDepthTestEnabled( me; view : CView from Graphic3d;
540                                  isEnabled : Boolean from Standard )
541     is deferred;
542     ---Purpose: call_togl_depthtest
543
544         IsDepthTestEnabled( me; view : CView from Graphic3d )
545     returns Boolean from Standard is deferred;
546     ---Purpose: call_togl_isdepthtest
547
548         ReadDepths( me;
549                     view          : CView from Graphic3d;
550                     x, y          : Integer;
551                     width, height : Integer;
552                     buffer        : Address )
553     is deferred;
554     ---Purpose: Reads depths of shown pixels of the given
555     --          rectangle (glReadPixels with GL_DEPTH_COMPONENT)
556
557         FBOCreate( me            : mutable;
558                    view          : CView from Graphic3d;
559                    width, height : Integer from Standard )
560                   returns PtrFrameBuffer from Graphic3d
561     is deferred;
562     ---Purpose: Generate offscreen FBO in the graphic library.
563     --          If not supported on hardware returns NULL.
564
565         FBORelease( me            : mutable;
566                     view          : CView from Graphic3d;
567                     fboPtr        : in out PtrFrameBuffer from Graphic3d )
568     is deferred;
569     ---Purpose: Remove offscreen FBO from the graphic library
570
571         FBOGetDimensions( me                  : mutable;
572                           view                : CView from Graphic3d;
573                           fboPtr              : PtrFrameBuffer from Graphic3d;
574                           width, height       : out Integer from Standard;
575                           widthMax, heightMax : out Integer from Standard )
576     is deferred;
577     ---Purpose: Read offscreen FBO configuration.
578
579         FBOChangeViewport( me                  : mutable;
580                            view                : CView from Graphic3d;
581                            fboPtr              : in out PtrFrameBuffer from Graphic3d;
582                            width, height       : Integer from Standard )
583     is deferred;
584     ---Purpose: Change offscreen FBO viewport.
585
586         BufferDump( me            : mutable;
587                     theCView      : CView from Graphic3d;
588                     theImage      : in out PixMap from Image;
589                     theBufferType : BufferType from Graphic3d )
590                    returns Boolean from Standard
591     is deferred;
592     ---Purpose: Dump active rendering buffer into specified memory buffer.
593
594         SetGLLightEnabled( me; view : CView from Graphic3d;
595                                isEnabled : Boolean from Standard )
596     is deferred;
597     ---Purpose: call_togl_gllight
598
599         IsGLLightEnabled( me; view : CView from Graphic3d )
600     returns Boolean from Standard is deferred;
601     ---Purpose: call_togl_isgllight
602
603     Print (me;
604            ACView          : CView from Graphic3d;
605            ACUnderLayer    : CLayer2d from Aspect;
606            ACOverLayer     : CLayer2d from Aspect;
607            hPrnDC          : Handle from Aspect;
608            showBackground  : Boolean;
609            filename        : CString;
610            printAlgorithm  : PrintAlgo from Aspect = Aspect_PA_STRETCH;
611            theScaleFactor  : Real from Standard = 1.0 )
612         returns Boolean from Standard is deferred;
613       ---Level: Internal
614       ---Purpose: print the contents of all layers of the view to the printer.
615     -- <hPrnDC> : Pass the PrinterDeviceContext (HDC),
616     -- <showBackground> : When set to FALSE then print the view without background color
617     -- (background is white)
618       -- else set to TRUE for printing with current background color.
619     -- <filename>: If != NULL, then the view will be printed to a file.
620     -- <printAlgorithm>: Select print algorithm: stretch, tile.   
621     -- <theScaleFactor>: Scaling coefficient, used internally to scale the
622     -- printings accordingly to the scale factor selected in the printer 
623     -- properties dialog.
624     -- Returns Standard_True if the data is passed to the printer, otherwise
625     -- Standard_False if the print operation failed due to the printer errors, 
626     -- or insufficient system memory available.
627     ---Warning: Works only under Windows.
628
629         Export( me: mutable;
630                 theFileName         : CString from Standard;
631                 theFormat           : ExportFormat from Graphic3d;
632                 theSortType         : SortType from Graphic3d;
633                 theWidth, theHeight : Integer from Standard;
634                 theView             : CView from Graphic3d;
635                 theLayerUnder       : CLayer2d from Aspect;
636                 theLayerOver        : CLayer2d from Aspect;
637                 thePrecision        : Real from Standard = 0.005;
638                 theProgressBarFunc  : Address from Standard = NULL;
639                 theProgressObject   : Address from Standard = NULL )
640         returns Boolean from Standard
641         is deferred;
642     ---Purpose:
643     -- Export scene into the one of the Vector graphics formats (SVG, PS, PDF...).
644     -- In contrast to Bitmaps, Vector graphics is scalable (so you may got quality benefits on printing to laser printer).
645     -- Notice however that results may differ a lot and do not contain some elements.
646
647     AddZLayer( me         : mutable;
648                theCView   : CView from Graphic3d;
649                theLayerId : Integer from Standard )
650         is deferred;
651         ---Purpose: Add a new top-level z layer with ID <theLayerId> for
652         -- the view. Z layers allow drawing structures in higher layers
653         -- in foreground of structures in lower layers. To add a structure
654         -- to desired layer on display it is necessary to set the layer
655         -- ID for the structure.
656
657     RemoveZLayer( me         : mutable;
658                   theCView   : CView from Graphic3d;
659                   theLayerId : Integer from Standard )
660         is deferred;
661         ---Purpose: Remove Z layer from the specified view. All structures
662         -- displayed at the moment in layer will be displayed in default layer
663         -- ( the bottom-level z layer ). To unset layer ID from associated
664         -- structures use method UnsetZLayer (...).
665
666     UnsetZLayer( me         : mutable;
667                  theLayerId : Integer from Standard ) 
668         is deferred;
669         ---Purpose: Unset Z layer ID for all structures. The structure
670         -- indexes will be set to default layer ( the bottom-level z layer
671         -- with ID = 0 ).
672
673     ChangeZLayer( me            : mutable;
674                   theCStructure : CStructure from Graphic3d;
675                   theLayerId    : Integer from Standard )
676         is deferred;
677         ---Purpose: Change Z layer of a structure. The new z layer ID will
678         -- be used to define the associated layer for structure on display.
679
680     ChangeZLayer( me            : mutable;
681                   theCStructure : CStructure from Graphic3d;
682                   theCView      : CView from Graphic3d;
683                   theNewLayerId : Integer from Standard )
684         is deferred;
685         ---Purpose: Change Z layer of a structure already presented in view.
686
687     GetZLayer( me;
688                theCStructure : CStructure from Graphic3d )
689         returns Integer from Standard is deferred;
690         ---Purpose: Get Z layer ID of structure. If the structure doesn't
691         -- exists in graphic driver, the method returns -1.
692
693     SetZLayerSettings( me          : mutable;
694                        theCView    : CView from Graphic3d;
695                        theLayerId  : Integer from Standard;
696                        theSettings : ZLayerSettings from Graphic3d)
697         is deferred;
698         ---Purpose:  Sets the settings for a single Z layer of specified view.
699
700     -----------------------------
701     -- Category: Internal methods
702     -----------------------------
703
704     PrintBoolean ( me;
705                    AComment : CString from Standard;
706                    AValue   : Boolean from Standard );
707
708     PrintCLight ( me;
709                   ACLight   : CLight from Graphic3d;
710                   AField    : Integer from Standard );
711
712     PrintCPick ( me;
713                  ACPick    : CPick from Graphic3d;
714                  AField    : Integer from Standard );
715
716     PrintCStructure ( me;
717                       ACStructure   : CStructure from Graphic3d;
718                       AField    : Integer from Standard );
719
720     PrintCView ( me;
721                  ACView : CView from Graphic3d;
722                  AField : Integer from Standard );
723
724     PrintFunction ( me;
725                     AFunc   : CString from Standard );
726
727     PrintInteger ( me;
728                    AComment  : CString from Standard;
729                    AValue    : Integer from Standard );
730
731     PrintIResult ( me;
732                    AFunc    : CString from Standard;
733                    AResult  : Integer from Standard );
734
735     PrintShortReal ( me;
736                      AComment   : CString from Standard;
737                      AValue     : ShortReal from Standard );
738
739     PrintMatrix ( me;
740                   AComment  : CString from Standard;
741                   AMatrix   : Array2OfReal from TColStd )
742         raises TransformError from Graphic3d;
743
744     PrintString ( me;
745                   AComment  : CString from Standard;
746                   AString   : CString from Standard );
747
748     SetTrace ( me       : mutable;
749                ALevel   : Integer from Standard )
750         is static;
751
752     Trace ( me )
753         returns Integer from Standard
754         is static;
755
756     --ListOfAvalableFontNames( me;
757     --           lst: out NListOfHAsciiString from Graphic3d )
758     --           returns Boolean from Standard
759     --           is deferred;
760     --  Purpose:  Initialize list of names of avalable system fonts
761     --            returns Standard_False if fails
762     --  ABD Integration support of system fonts (using FTGL and FreeType)
763
764     GetDisplayConnection (me)
765        returns DisplayConnection_Handle from Aspect;
766     ---C++: return const &
767
768     ---Purpose: returns Handle to display connection
769
770     IsDeviceLost (me)
771       returns Boolean from Standard;
772     -- Purpose: @return Standard_True in cases when the last view has been removed but some objects still present.
773
774     ResetDeviceLostFlag (me: mutable);
775     -- Purpose: Resets DeviceLostFlag to default (Standard_False) state.
776
777 fields
778
779     MyTraceLevel       : Integer from Standard is protected;
780     MySharedLibrary    : SharedLibrary from OSD is protected;
781     myDisplayConnection: DisplayConnection_Handle from Aspect is protected;
782     myDeviceLostFlag   : Boolean from Standard is protected;
783
784 end GraphicDriver from Graphic3d;