bc3fbec022b43b168ceb776cbd9e179c16d29bff
[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-2012 OPEN CASCADE SAS
5 --
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
10 --
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 --
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
20
21 deferred class GraphicDriver from Graphic3d inherits TShared
22
23     ---Version:
24
25     ---Purpose: This class allows the definition of a graphic driver
26     --      (currently only OpenGl driver is used).
27
28     ---Keywords: OpenGl
29
30     ---Warning:
31     ---References:
32
33 uses
34
35     SharedLibrary       from OSD,
36
37     Array1OfInteger     from TColStd,
38     Array1OfReal        from TColStd,
39     Array2OfReal        from TColStd,
40
41     AsciiString         from TCollection,
42     ExtendedString      from TCollection,
43
44     NameOfColor         from Quantity,
45     Color               from Quantity,
46
47     PlaneAngle          from Quantity,
48
49     PixMap              from Image,
50
51     Array1OfEdge        from Aspect,
52     CLayer2d            from Aspect,
53     TypeOfTriedronEcho  from Aspect,
54     TypeOfTriedronPosition  from Aspect,
55     Handle              from Aspect,
56     Display             from Aspect,
57     PrintAlgo           from Aspect,
58     DisplayConnection_Handle from Aspect,
59
60     AspectLine3d        from Graphic3d,
61     AspectMarker3d      from Graphic3d,
62     AspectText3d        from Graphic3d,
63     AspectFillArea3d    from Graphic3d,
64     HorizontalTextAlignment from Graphic3d,
65     CBitFields20        from Graphic3d,
66     CGroup              from Graphic3d,
67     CLight              from Graphic3d,
68     CPick               from Graphic3d,
69     CPlane              from Graphic3d,
70     CStructure          from Graphic3d,
71     CView               from Graphic3d,
72     BufferType          from Graphic3d,
73     Structure           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
96 raises
97
98     TransformError      from Graphic3d
99
100 is
101         Initialize ( AShrName       : CString from Standard )
102                 returns mutable GraphicDriver from Graphic3d;
103         ---Level: Public
104         ---Purpose: Initialises the Driver
105
106     -------------------------
107     -- Category: Init methods
108     -------------------------
109
110     Begin (me: mutable;
111            theDisplayConnection: DisplayConnection_Handle from Aspect)
112        returns Boolean from Standard
113        is deferred;
114     ---Purpose: Starts graphic driver with given connection
115
116     End ( me    : mutable )
117         is deferred;
118     ---Purpose: call_togl_end
119
120     ----------------------------
121     -- Category: Inquire methods
122     ----------------------------
123
124     InquireLightLimit ( me  : mutable )
125         returns Integer from Standard
126         is deferred;
127     ---Purpose: call_togl_inquirelight
128
129     InquireMat ( me     : mutable;
130                  ACView : CView from Graphic3d;
131                  AMatO  : out Array2OfReal from TColStd;
132                  AMatM  : out Array2OfReal from TColStd )
133         is deferred;
134     ---Purpose: call_togl_inquiremat
135
136     InquirePlaneLimit ( me  : mutable )
137         returns Integer from Standard
138         is deferred;
139     ---Purpose: call_togl_inquireplane
140
141     InquireViewLimit ( me   : mutable )
142         returns Integer from Standard
143         is deferred;
144     ---Purpose: call_togl_inquireview
145
146     ------------------------------
147     -- Category: Highlight methods
148     ------------------------------
149
150     Blink ( me          : mutable;
151             ACStructure : CStructure from Graphic3d;
152             Create      : Boolean from Standard )
153         is deferred;
154     ---Purpose: call_togl_blink
155
156     BoundaryBox ( me            : mutable;
157                   ACStructure   : CStructure from Graphic3d;
158                   Create        : Boolean from Standard )
159         is deferred;
160     ---Purpose: call_togl_boundarybox
161
162     HighlightColor ( me             : mutable;
163                      ACStructure    : CStructure from Graphic3d;
164                      R              : ShortReal from Standard;
165                      G              : ShortReal from Standard;
166                      B              : ShortReal from Standard;
167                      Create         : Boolean from Standard )
168         is deferred;
169     ---Purpose: call_togl_highlightcolor
170
171     NameSetStructure ( me       : mutable;
172                ACStructure  : CStructure from Graphic3d )
173         is deferred;
174     ---Purpose: call_togl_namesetstructure
175
176     -------------------------------------
177     -- Category: Group management methods
178     -------------------------------------
179
180     ClearGroup ( me     : mutable;
181              ACGroup    : CGroup from Graphic3d )
182         is deferred;
183     ---Purpose: call_togl_cleargroup
184
185     FaceContextGroup ( me       : mutable;
186                        ACGroup  : CGroup from Graphic3d;
187                        NoInsert : Integer from Standard )
188         is deferred;
189     ---Purpose: call_togl_facecontextgroup
190
191     Group ( me  : mutable;
192         ACGroup : in out CGroup from Graphic3d )
193         is deferred;
194     ---Purpose: call_togl_group
195
196     LineContextGroup ( me       : mutable;
197                        ACGroup  : CGroup from Graphic3d;
198                        NoInsert : Integer from Standard )
199         is deferred;
200     ---Purpose: call_togl_linecontextgroup
201
202     MarkerContextGroup ( me         : mutable;
203                          ACGroup    : CGroup from Graphic3d;
204                          NoInsert   : Integer from Standard )
205         is deferred;
206     ---Purpose: call_togl_markercontextgroup
207
208     MarkerContextGroup ( me         : mutable;
209                          ACGroup    : CGroup from Graphic3d;
210                          NoInsert   : Integer from Standard;
211                          AMarkWidth : Integer from Standard;
212                          AMarkHeight: Integer from Standard;
213                          ATexture   : HArray1OfByte from TColStd )
214                 is deferred;
215     ---Purpose: call_togl_markercontextgroup
216
217     RemoveGroup ( me        : mutable;
218                   ACGroup   : CGroup from Graphic3d )
219         is deferred;
220     ---Purpose: call_togl_removegroup
221
222     TextContextGroup ( me       : mutable;
223                        ACGroup  : CGroup from Graphic3d;
224                        NoInsert : Integer from Standard )
225         is deferred;
226     ---Purpose: call_togl_textcontextgroup
227
228     -----------------------------------------
229     -- Category: Structure management methods
230     -----------------------------------------
231
232     ClearStructure ( me             : mutable;
233                      ACStructure    : CStructure from Graphic3d )
234         is deferred;
235     ---Purpose: call_togl_clearstructure
236
237     Connect ( me        : mutable;
238               AFather   : CStructure from Graphic3d;
239               ASon      : CStructure from Graphic3d )
240         is deferred;
241     ---Purpose: call_togl_connect
242
243     ContextStructure ( me           : mutable;
244                        ACStructure  : CStructure from Graphic3d )
245         is deferred;
246     ---Purpose: call_togl_contextstructure
247
248     Disconnect ( me         : mutable;
249                  AFather    : CStructure from Graphic3d;
250                  ASon       : CStructure from Graphic3d )
251         is deferred;
252     ---Purpose: call_togl_disconnect
253
254     DisplayStructure ( me           : mutable;
255                        ACView       : CView from Graphic3d;
256                        ACStructure  : CStructure from Graphic3d;
257                        APriority    : Integer from Standard )
258         is deferred;
259     ---Purpose: call_togl_displaystructure
260
261     EraseStructure ( me             : mutable;
262                      ACView         : CView from Graphic3d;
263                      ACStructure    : CStructure from Graphic3d )
264         is deferred;
265     ---Purpose: call_togl_erasestructure
266
267     RemoveStructure ( me            : mutable;
268                       ACStructure   : CStructure from Graphic3d )
269         is deferred;
270     ---Purpose: call_togl_removestructure
271
272     Structure ( me          : mutable;
273                 ACStructure : in out CStructure from Graphic3d )
274         is deferred;
275     ---Purpose: call_togl_structure
276
277     ------------------------------------
278     -- Category: Structured mode methods
279     ------------------------------------
280
281     ActivateView ( me       : mutable;
282                    ACView   : CView from Graphic3d )
283         is deferred;
284     ---Purpose: call_togl_activateview
285
286     AntiAliasing ( me       : mutable;
287                    ACView   : CView from Graphic3d;
288                    AFlag    : Boolean from Standard )
289         is deferred;
290     ---Purpose: call_togl_antialiasing
291
292     Background ( me     : mutable;
293                  ACView : CView from Graphic3d )
294         is deferred;
295     ---Purpose: call_togl_background
296
297     GradientBackground ( me     : mutable;
298                          ACView : CView from Graphic3d;
299                          AColor1: Color from Quantity;
300                          AColor2: Color from Quantity;
301                          FillStyle : GradientFillMethod from Aspect
302                        )
303     is deferred;
304     ---Purpose: call_togl_gradient_background
305
306
307     BackgroundImage( me           : mutable;
308                      FileName     : CString from Standard;
309                      ACView       : CView from Graphic3d;
310                      FillStyle    : FillMethod from Aspect )
311     is deferred;
312
313     SetBgImageStyle( me        : mutable;
314                      ACView    : CView from Graphic3d;
315                      FillStyle : FillMethod from Aspect )
316     is deferred;
317
318     SetBgGradientStyle( me        : mutable;
319                         ACView    : CView from Graphic3d;
320                         FillStyle : GradientFillMethod from Aspect )
321     is deferred;
322
323     ClipLimit ( me      : mutable;
324                 ACView  : CView from Graphic3d;
325                 AWait   : Boolean from Standard )
326         is deferred;
327     ---Purpose: call_togl_cliplimit
328
329     DeactivateView ( me     : mutable;
330                      ACView : CView from Graphic3d )
331         is deferred;
332     ---Purpose: call_togl_deactivateview
333
334     DepthCueing ( me        : mutable;
335                   ACView    : CView from Graphic3d;
336                   AFlag     : Boolean from Standard )
337         is deferred;
338     ---Purpose: call_togl_cliplimit
339
340     ProjectRaster ( me      : mutable;
341                     ACView  : CView from Graphic3d;
342                     AX      : ShortReal from Standard;
343                     AY      : ShortReal from Standard;
344                     AZ      : ShortReal from Standard;
345                     AU      : out Integer from Standard;
346                     AV      : out Integer from Standard )
347         returns Boolean from Standard
348         is deferred;
349     ---Purpose: call_togl_unproject_raster
350
351     UnProjectRaster ( me        : mutable;
352                       ACView    : CView from Graphic3d;
353                       Axm       : Integer from Standard;
354                       Aym       : Integer from Standard;
355                       AXM       : Integer from Standard;
356                       AYM       : Integer from Standard;
357                       AU        : Integer from Standard;
358                       AV        : Integer from Standard;
359                       AX        : out ShortReal from Standard;
360                       AY        : out ShortReal from Standard;
361                       AZ        : out ShortReal from Standard )
362         returns Boolean from Standard
363         is deferred;
364     ---Purpose: call_togl_unproject_raster
365
366     UnProjectRasterWithRay ( me        : mutable;
367                              ACView    : CView from Graphic3d;
368                              Axm       : Integer from Standard;
369                              Aym       : Integer from Standard;
370                              AXM       : Integer from Standard;
371                              AYM       : Integer from Standard;
372                              AU        : Integer from Standard;
373                              AV        : Integer from Standard;
374                              AX        : out ShortReal from Standard;
375                              AY        : out ShortReal from Standard;
376                              AZ        : out ShortReal from Standard;
377                              DX        : out ShortReal from Standard;
378                              DY        : out ShortReal from Standard;
379                              DZ        : out ShortReal from Standard )
380         returns Boolean from Standard
381         is deferred;
382     ---Purpose: call_togl_unproject_raster_with_ray
383
384     RatioWindow ( me        : mutable;
385                   ACView    : CView from Graphic3d )
386         is deferred;
387     ---Purpose: call_togl_ratio_window
388
389     Redraw ( me             : mutable;
390              ACView         : CView from Graphic3d;
391              ACUnderLayer   : CLayer2d from Aspect;
392              ACOverLayer    : CLayer2d from Aspect;
393              x              : Integer = 0;
394              y              : Integer = 0;
395              width              : Integer = 0;
396              height     : Integer = 0 )
397         is deferred;
398     ---Purpose: call_togl_redraw
399     --  Warning: when the redraw area has a null size, the full view is redrawn
400
401     RemoveView ( me     : mutable;
402                 ACView  : CView from Graphic3d )
403         is deferred;
404     ---Purpose: call_togl_removeview
405
406     SetLight ( me       : mutable;
407            ACView   : CView from Graphic3d )
408         is deferred;
409     ---Purpose: call_togl_setlight
410
411     SetClipPlanes (me : mutable; theCView : CView from Graphic3d) is deferred;
412     ---Purpose: Pass clip planes to the associated graphic driver view.
413
414     SetClipPlanes (me : mutable; theCStructure : CStructure from Graphic3d) is deferred;
415     ---Purpose: Pass clip planes to the associated graphic driver structure.
416
417     SetVisualisation ( me       : mutable;
418                        ACView   : CView from Graphic3d )
419         is deferred;
420     ---Purpose: call_togl_setvisualisation
421
422     TransformStructure ( me             : mutable;
423                          ACStructure    : CStructure from Graphic3d )
424         is deferred;
425     ---Purpose: call_togl_transformstructure
426
427     Transparency ( me       : mutable;
428                    ACView   : CView from Graphic3d;
429                    AFlag    : Boolean from Standard )
430         is deferred;
431     ---Purpose: call_togl_transparency
432
433     Update ( me             : mutable;
434              ACView         : CView from Graphic3d;
435              ACUnderLayer   : CLayer2d from Aspect;
436              ACOverLayer    : CLayer2d from Aspect )
437             is deferred;
438     ---Purpose: call_togl_update
439
440     View ( me   : mutable;
441            ACView   : in out CView from Graphic3d )
442         returns Boolean from Standard
443         is deferred;
444     ---Purpose: call_togl_view
445
446     ViewMapping ( me        : mutable;
447                   ACView    : CView from Graphic3d;
448                   AWait : Boolean from Standard )
449         is deferred;
450     ---Purpose: call_togl_viewmapping
451
452     ViewOrientation ( me        : mutable;
453                       ACView    : CView from Graphic3d;
454                       AWait     : Boolean from Standard )
455         is deferred;
456     ---Purpose: call_togl_vieworientation
457
458         Environment ( me        : mutable;
459                       ACView    : CView from Graphic3d )
460         is deferred;
461     ---Purpose:
462
463     ----------------------------------------
464     -- Category: Methods to create Text
465     -- for Purpose : see Graphic3d_Group.cdl
466     ----------------------------------------
467
468     Text ( me   : mutable;
469            ACGroup  : CGroup from Graphic3d;
470            AText    : CString from Standard;
471            APoint   : Vertex from Graphic3d;
472            AHeight  : Real from Standard;
473            AAngle   : PlaneAngle from Quantity;
474            ATp  : TextPath from Graphic3d;
475            AHta : HorizontalTextAlignment from Graphic3d;
476            AVta : VerticalTextAlignment from Graphic3d;
477            EvalMinMax   : Boolean from Standard = Standard_True )
478         is deferred;
479     ---Purpose: call_togl_text
480
481     Text ( me   : mutable;
482            ACGroup  : CGroup from Graphic3d;
483            AText    : CString from Standard;
484            APoint   : Vertex from Graphic3d;
485            AHeight  : Real from Standard;
486            EvalMinMax   : Boolean from Standard = Standard_True )
487         is deferred;
488     ---Purpose: call_togl_text
489
490     Text ( me   : mutable;
491            ACGroup  : CGroup from Graphic3d;
492            AText    : ExtendedString from TCollection;
493            APoint   : Vertex from Graphic3d;
494            AHeight  : Real from Standard;
495            AAngle   : PlaneAngle from Quantity;
496            ATp  : TextPath from Graphic3d;
497            AHta : HorizontalTextAlignment from Graphic3d;
498            AVta : VerticalTextAlignment from Graphic3d;
499            EvalMinMax   : Boolean from Standard = Standard_True )
500         is deferred;
501     ---Purpose: call_togl_text
502
503     Text ( me   : mutable;
504            ACGroup  : CGroup from Graphic3d;
505            AText    : ExtendedString from TCollection;
506            APoint   : Vertex from Graphic3d;
507            AHeight  : Real from Standard;
508            EvalMinMax   : Boolean from Standard = Standard_True )
509         is deferred;
510     ---Purpose: call_togl_text
511
512     ----------------------------------------
513     ---Category: Methods to create Triangle
514     -- for Purpose : see Graphic3d_Group.cdl
515     ----------------------------------------
516
517     PrimitiveArray( me          : mutable;
518                     ACGroup     : CGroup from Graphic3d;
519                     parray      : PrimitiveArray from Graphic3d;
520                     EvalMinMax  : Boolean from Standard = Standard_True )
521         is deferred;
522         ---Purpose: call_togl_parray
523
524     UserDraw( me          : mutable;
525               ACGroup     : CGroup from Graphic3d;
526               AUserDraw   : CUserDraw from Graphic3d )
527         is deferred;
528         ---Purpose: call_togl_userdraw
529
530     EnableVBO( me       : mutable;
531                status   : Boolean from Standard )
532                is deferred;
533     ---Purpose: enables/disables usage of OpenGL vertex buffer arrays while drawing primitiev arrays
534
535     MemoryInfo (me;
536                 theFreeBytes : out Size from Standard;
537                 theInfo      : out AsciiString from TCollection) returns Boolean from Standard is deferred;
538     ---Purpose: Returns information about GPU memory usage.
539
540     ----------------------------------------
541     ---Category: Methods to create Triedron
542     -- for Purpose : see Graphic3d_Group.cdl
543     ----------------------------------------
544
545     ZBufferTriedronSetup ( me          : mutable;
546                            XColor      : NameOfColor from Quantity = Quantity_NOC_RED;
547                            YColor      : NameOfColor from Quantity = Quantity_NOC_GREEN;
548                            ZColor      : NameOfColor from Quantity = Quantity_NOC_BLUE1;
549                            SizeRatio   : Real from Standard = 0.8;
550                            AxisDiametr : Real from Standard = 0.05;
551                            NbFacettes  : Integer from Standard = 12)
552          is deferred;
553         ---Purpose: call_togl_ztriedron_setup
554
555     TriedronDisplay ( me            : mutable;
556                       ACView        : CView from Graphic3d;
557                       APosition     : TypeOfTriedronPosition from Aspect  = Aspect_TOTP_CENTER;
558                       AColor        : NameOfColor from Quantity = Quantity_NOC_WHITE ;
559                       AScale        : Real from Standard  =  0.02;
560                       AsWireframe   : Boolean from Standard = Standard_True )
561         is deferred;
562     ---Purpose: call_togl_triedron_display
563
564
565     TriedronErase ( me      : mutable;
566                   ACView    : CView from Graphic3d)
567         is deferred;
568     ---Purpose: call_togl_triedron_erase
569
570
571     TriedronEcho ( me       : mutable;
572                    ACView   : CView from Graphic3d;
573                    AType    : TypeOfTriedronEcho from Aspect  = Aspect_TOTE_NONE )
574         is deferred;
575     ---Purpose: call_togl_triedron_echo
576
577     ---------------------------------
578     ---Category: Graduated  trihedron
579     ---------------------------------
580
581     GraduatedTrihedronDisplay(me : mutable;
582                               view : CView from Graphic3d;
583                               cubic : CGraduatedTrihedron from Graphic3d)
584     ---Purpose: call_togl_graduatedtrihedron_display
585     is deferred;
586
587     GraduatedTrihedronErase(me : mutable;
588                             view : CView from Graphic3d)
589     ---Purpose: call_togl_graduatedtrihedron_erase
590     is deferred;
591
592     GraduatedTrihedronMinMaxValues(me : mutable;
593                                    xmin : ShortReal from Standard;
594                                    ymin : ShortReal from Standard;
595                                    zmin : ShortReal from Standard;
596                                    xmax : ShortReal from Standard;
597                                    ymax : ShortReal from Standard;
598                                    zmax : ShortReal from Standard)
599     ---Purpose: call_togl_graduatedtrihedron_minmaxvalues
600     is deferred;
601
602     ----------------------------------
603     -- Category: Ajout mode methods
604     ----------------------------------
605
606     BeginAddMode ( me   : mutable;
607                 ACView      : CView from Graphic3d)
608         returns Boolean from Standard
609         is deferred;
610     ---Purpose: call_togl_begin_ajout_mode
611
612     EndAddMode ( me     : mutable)
613         is deferred;
614     ---Purpose: call_togl_end_ajout_mode
615
616     ----------------------------------
617     -- Category: Immediat mode methods
618     ----------------------------------
619
620     SetImmediateModeDrawToFront (me                   : mutable;
621                                  theCView             : CView from Graphic3d;
622                                  theDrawToFrontBuffer : Boolean from Standard)
623     returns Boolean from Standard
624     is deferred;
625     ---Purpose: @param theDrawToFrontBuffer Advanced option to modify rendering mode:
626     -- 1. TRUE.  Drawing immediate mode structures directly to the front buffer over the scene image.
627     --    Fast, so preferred for interactive work (used by default).
628     --    However these extra drawings will be missed in image dump since it is performed from back buffer.
629     --    Notice that since no pre-buffering used the V-Sync will be ignored and rendering could be seen
630     --    in run-time (in case of slow hardware) and/or tearing may appear.
631     --    So this is strongly recommended to draw only simple (fast) structures.
632     -- 2. FALSE. Drawing immediate mode structures to the back buffer.
633     --    The complete scene is redrawn first, so this mode is slower if scene contains complex data and/or V-Sync is turned on.
634     --    But it works in any case and is especially useful for view dump because the dump image is read from the back buffer.
635     -- @return previous mode.
636
637     BeginImmediatMode ( me              : mutable;
638                         ACView          : CView from Graphic3d;
639                         ACUnderLayer    : CLayer2d from Aspect;
640                         ACOverLayer     : CLayer2d from Aspect;
641                         DoubleBuffer    : Boolean from Standard;
642                         RetainMode      : Boolean from Standard)
643         returns Boolean from Standard
644         is deferred;
645     ---Purpose: call_togl_begin_immediat_mode
646
647     ClearImmediatMode ( me  : mutable; ACView       : CView from Graphic3d;
648                   aFlush        : Boolean from Standard = Standard_True)
649         is deferred;
650     ---Purpose: call_togl_clear_immediat_mode
651
652     DrawStructure ( me          : mutable;
653                     ACStructure : CStructure from Graphic3d )
654         is deferred;
655     ---Purpose: call_togl_draw_structure
656
657     EndImmediatMode ( me            : mutable;
658                       Synchronize   : Integer from Standard )
659         is deferred;
660     ---Purpose: call_togl_end_immediat_mode
661
662     -------------------------------
663     -- Category: Layer mode methods
664     -------------------------------
665
666     Layer ( me      : mutable;
667             ACLayer : in out CLayer2d from Aspect )
668         is deferred;
669     ---Purpose: call_togl_layer2d
670
671     RemoveLayer ( me        : mutable;
672                   ACLayer   : CLayer2d from Aspect )
673         is deferred;
674     ---Purpose: call_togl_removelayer2d
675
676     BeginLayer ( me         : mutable;
677                  ACLayer    : CLayer2d from Aspect )
678         is deferred;
679     ---Purpose: call_togl_begin_layer2d
680
681     BeginPolygon2d ( me : mutable )
682         is deferred;
683     ---Purpose: call_togl_begin_polygon2d
684
685     BeginPolyline2d ( me    : mutable )
686         is deferred;
687     ---Purpose: call_togl_begin_polyline2d
688
689     ClearLayer ( me         : mutable;
690                  ACLayer    : CLayer2d from Aspect )
691         is deferred;
692     ---Purpose: call_togl_clear_layer2d
693
694     Draw ( me   : mutable;
695            X    : ShortReal from Standard;
696            Y    : ShortReal from Standard )
697         is deferred;
698     ---Purpose: call_togl_draw2d
699
700     Edge ( me   : mutable;
701            X    : ShortReal from Standard;
702            Y    : ShortReal from Standard )
703         is deferred;
704     ---Purpose: call_togl_edge2d
705
706     EndLayer ( me       : mutable )
707         is deferred;
708     ---Purpose: call_togl_end_layer2d
709
710     EndPolygon2d ( me   : mutable )
711         is deferred;
712     ---Purpose: call_togl_end_polygon2d
713
714     EndPolyline2d ( me  : mutable )
715         is deferred;
716     ---Purpose: call_togl_end_polyline2d
717
718     Move ( me   : mutable;
719            X    : ShortReal from Standard;
720            Y    : ShortReal from Standard )
721         is deferred;
722     ---Purpose: call_togl_move2d
723
724     Rectangle ( me              : mutable;
725                 X, Y            : ShortReal from Standard;
726                 Width, Height   : ShortReal from Standard )
727         is deferred;
728     ---Purpose: call_togl_rectangle2d
729
730     SetColor ( me   : mutable;
731                R    : ShortReal from Standard;
732                G    : ShortReal from Standard;
733                B    : ShortReal from Standard )
734         is deferred;
735     ---Purpose: call_togl_set_color
736
737     SetTransparency ( me    : mutable;
738            ATransparency    : ShortReal from Standard )
739         is deferred;
740     ---Purpose: call_togl_set_transparency
741
742     UnsetTransparency ( me  : mutable )
743         is deferred;
744     ---Purpose: call_togl_unset_transparency
745
746     SetLineAttributes ( me      : mutable;
747                         Type    : Integer from Standard;
748                         Width   : ShortReal from Standard )
749         is deferred;
750     ---Purpose: call_togl_set_line_attributes
751
752
753     SetTextAttributes ( me      : mutable;
754                         Font    : CString from Standard;
755                         Type    : Integer from Standard;
756                         R       : ShortReal from Standard;
757                         G       : ShortReal from Standard;
758                         B       : ShortReal from Standard )
759         is deferred;
760     ---Purpose: Set text attributes for under-/overlayer.
761     -- <Font> argument defines the name of the font to be used,
762     -- <Type> argument defines the display type of the text,
763     -- <R> <G> <B> values define the color of decal or subtitle background.
764     -- To set the color of the text you can use the SetColor method.
765
766     Text ( me       : mutable;
767            AText    : CString from Standard;
768            X, Y     : ShortReal from Standard;
769            AHeight  : ShortReal from Standard )
770         is deferred;
771     ---Purpose: call_togl_text2d
772     -- If AHeight < 0 default text height is used by driver (DefaultTextHeight method)
773
774     DefaultTextHeight( me )
775         returns ShortReal from Standard
776         is deferred;
777
778
779     TextSize( me;
780               AText    : CString from Standard;
781               AHeight  : ShortReal from Standard;
782               AWidth   : in out ShortReal from Standard;
783               AnAscent : in out ShortReal from Standard;
784               ADescent : in out ShortReal from Standard )
785             is deferred;
786     ---Purpose: call_togl_textsize2d
787
788         SetBackFacingModel ( me    : mutable;
789                              aView : CView from Graphic3d )
790             is deferred;
791         ---Purpose: call_togl_backfacing
792
793         SetDepthTestEnabled( me; view : CView from Graphic3d;
794                                  isEnabled : Boolean from Standard )
795     is deferred;
796     ---Purpose: call_togl_depthtest
797
798         IsDepthTestEnabled( me; view : CView from Graphic3d )
799     returns Boolean from Standard is deferred;
800     ---Purpose: call_togl_isdepthtest
801
802         ReadDepths( me;
803                     view          : CView from Graphic3d;
804                     x, y          : Integer;
805                     width, height : Integer;
806                     buffer        : Address )
807     is deferred;
808     ---Purpose: Reads depths of shown pixels of the given
809     --          rectangle (glReadPixels with GL_DEPTH_COMPONENT)
810
811         FBOCreate( me            : mutable;
812                    view          : CView from Graphic3d;
813                    width, height : Integer from Standard )
814                   returns PtrFrameBuffer from Graphic3d
815     is deferred;
816     ---Purpose: Generate offscreen FBO in the graphic library.
817     --          If not supported on hardware returns NULL.
818
819         FBORelease( me            : mutable;
820                     view          : CView from Graphic3d;
821                     fboPtr        : in out PtrFrameBuffer from Graphic3d )
822     is deferred;
823     ---Purpose: Remove offscreen FBO from the graphic library
824
825         FBOGetDimensions( me                  : mutable;
826                           view                : CView from Graphic3d;
827                           fboPtr              : PtrFrameBuffer from Graphic3d;
828                           width, height       : out Integer from Standard;
829                           widthMax, heightMax : out Integer from Standard )
830     is deferred;
831     ---Purpose: Read offscreen FBO configuration.
832
833         FBOChangeViewport( me                  : mutable;
834                            view                : CView from Graphic3d;
835                            fboPtr              : in out PtrFrameBuffer from Graphic3d;
836                            width, height       : Integer from Standard )
837     is deferred;
838     ---Purpose: Change offscreen FBO viewport.
839
840         BufferDump( me            : mutable;
841                     theCView      : CView from Graphic3d;
842                     theImage      : in out PixMap from Image;
843                     theBufferType : BufferType from Graphic3d )
844                    returns Boolean from Standard
845     is deferred;
846     ---Purpose: Dump active rendering buffer into specified memory buffer.
847
848         SetGLLightEnabled( me; view : CView from Graphic3d;
849                                isEnabled : Boolean from Standard )
850     is deferred;
851     ---Purpose: call_togl_gllight
852
853         IsGLLightEnabled( me; view : CView from Graphic3d )
854     returns Boolean from Standard is deferred;
855     ---Purpose: call_togl_isgllight
856
857     Print (me;
858            ACView          : CView from Graphic3d;
859            ACUnderLayer    : CLayer2d from Aspect;
860            ACOverLayer     : CLayer2d from Aspect;
861            hPrnDC          : Handle from Aspect;
862            showBackground  : Boolean;
863            filename        : CString;
864            printAlgorithm  : PrintAlgo from Aspect = Aspect_PA_STRETCH;
865            theScaleFactor  : Real from Standard = 1.0 )
866         returns Boolean from Standard is deferred;
867       ---Level: Internal
868       ---Purpose: print the contents of all layers of the view to the printer.
869     -- <hPrnDC> : Pass the PrinterDeviceContext (HDC),
870     -- <showBackground> : When set to FALSE then print the view without background color
871     -- (background is white)
872       -- else set to TRUE for printing with current background color.
873     -- <filename>: If != NULL, then the view will be printed to a file.
874     -- <printAlgorithm>: Select print algorithm: stretch, tile.   
875     -- <theScaleFactor>: Scaling coefficient, used internally to scale the
876     -- printings accordingly to the scale factor selected in the printer 
877     -- properties dialog.
878     -- Returns Standard_True if the data is passed to the printer, otherwise
879     -- Standard_False if the print operation failed due to the printer errors, 
880     -- or insufficient system memory available.
881     ---Warning: Works only under Windows.
882
883         Export( me: mutable;
884                 theFileName         : CString from Standard;
885                 theFormat           : ExportFormat from Graphic3d;
886                 theSortType         : SortType from Graphic3d;
887                 theWidth, theHeight : Integer from Standard;
888                 theView             : CView from Graphic3d;
889                 theLayerUnder       : CLayer2d from Aspect;
890                 theLayerOver        : CLayer2d from Aspect;
891                 thePrecision        : Real from Standard = 0.005;
892                 theProgressBarFunc  : Address from Standard = NULL;
893                 theProgressObject   : Address from Standard = NULL )
894         returns Boolean from Standard
895         is deferred;
896     ---Purpose:
897     -- Export scene into the one of the Vector graphics formats (SVG, PS, PDF...).
898     -- In contrast to Bitmaps, Vector graphics is scalable (so you may got quality benefits on printing to laser printer).
899     -- Notice however that results may differ a lot and do not contain some elements.
900
901     AddZLayer( me         : mutable;
902                theCView   : CView from Graphic3d;
903                theLayerId : Integer from Standard )
904         is deferred;
905         ---Purpose: Add a new top-level z layer with ID <theLayerId> for
906         -- the view. Z layers allow drawing structures in higher layers
907         -- in foreground of structures in lower layers. To add a structure
908         -- to desired layer on display it is necessary to set the layer
909         -- ID for the structure.
910
911     RemoveZLayer( me         : mutable;
912                   theCView   : CView from Graphic3d;
913                   theLayerId : Integer from Standard )
914         is deferred;
915         ---Purpose: Remove Z layer from the specified view. All structures
916         -- displayed at the moment in layer will be displayed in default layer
917         -- ( the bottom-level z layer ). To unset layer ID from associated
918         -- structures use method UnsetZLayer (...).
919
920     UnsetZLayer( me         : mutable;
921                  theLayerId : Integer from Standard ) 
922         is deferred;
923         ---Purpose: Unset Z layer ID for all structures. The structure
924         -- indexes will be set to default layer ( the bottom-level z layer
925         -- with ID = 0 ).
926
927     ChangeZLayer( me            : mutable;
928                   theCStructure : CStructure from Graphic3d;
929                   theLayerId    : Integer from Standard )
930         is deferred;
931         ---Purpose: Change Z layer of a structure. The new z layer ID will
932         -- be used to define the associated layer for structure on display.
933
934     ChangeZLayer( me            : mutable;
935                   theCStructure : CStructure from Graphic3d;
936                   theCView      : CView from Graphic3d;
937                   theNewLayerId : Integer from Standard )
938         is deferred;
939         ---Purpose: Change Z layer of a structure already presented in view.
940
941     GetZLayer( me;
942                theCStructure : CStructure from Graphic3d )
943         returns Integer from Standard is deferred;
944         ---Purpose: Get Z layer ID of structure. If the structure doesn't
945         -- exists in graphic driver, the method returns -1.
946
947     --------------------------
948     -- Category: Class methods
949     --------------------------
950
951     Light ( myclass;
952         ACLight : CLight from Graphic3d;
953         Update  : Boolean from Standard )
954         returns Integer from Standard;
955     ---Purpose: call_togl_light
956
957     -----------------------------
958     -- Category: Internal methods
959     -----------------------------
960
961     PrintBoolean ( me;
962                    AComment : CString from Standard;
963                    AValue   : Boolean from Standard );
964
965     PrintCGroup ( me;
966                   ACGroup   : CGroup from Graphic3d;
967                   AField    : Integer from Standard );
968
969     PrintCLight ( me;
970                   ACLight   : CLight from Graphic3d;
971                   AField    : Integer from Standard );
972
973     PrintCPick ( me;
974                  ACPick    : CPick from Graphic3d;
975                  AField    : Integer from Standard );
976
977     PrintCStructure ( me;
978                       ACStructure   : CStructure from Graphic3d;
979                       AField    : Integer from Standard );
980
981     PrintCView ( me;
982                  ACView : CView from Graphic3d;
983                  AField : Integer from Standard );
984
985     PrintFunction ( me;
986                     AFunc   : CString from Standard );
987
988     PrintInteger ( me;
989                    AComment  : CString from Standard;
990                    AValue    : Integer from Standard );
991
992     PrintIResult ( me;
993                    AFunc    : CString from Standard;
994                    AResult  : Integer from Standard );
995
996     PrintShortReal ( me;
997                      AComment   : CString from Standard;
998                      AValue     : ShortReal from Standard );
999
1000     PrintMatrix ( me;
1001                   AComment  : CString from Standard;
1002                   AMatrix   : Array2OfReal from TColStd )
1003         raises TransformError from Graphic3d;
1004
1005     PrintString ( me;
1006                   AComment  : CString from Standard;
1007                   AString   : CString from Standard );
1008
1009     SetTrace ( me       : mutable;
1010                ALevel   : Integer from Standard )
1011         is static;
1012
1013     Trace ( me )
1014         returns Integer from Standard
1015         is static;
1016
1017     --ListOfAvalableFontNames( me;
1018     --           lst: out NListOfHAsciiString from Graphic3d )
1019     --           returns Boolean from Standard
1020     --           is deferred;
1021     --  Purpose:  Initialize list of names of avalable system fonts
1022     --            returns Standard_False if fails
1023     --  ABD Integration support of system fonts (using FTGL and FreeType)
1024
1025     GetDisplayConnection (me)
1026        returns DisplayConnection_Handle from Aspect;
1027     ---C++: return const &
1028
1029     ---Purpose: returns Handle to display connection
1030
1031 fields
1032
1033     MyTraceLevel       : Integer from Standard is protected;
1034     MySharedLibrary    : SharedLibrary from OSD is protected;
1035     myDisplayConnection: DisplayConnection_Handle from Aspect is protected;
1036
1037 end GraphicDriver from Graphic3d;