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