eaac1479636b2636a3b810390be9338a28b970fb
[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 -- Modified:    01/08/97 ; PCT : ajout texture mapping
22 --              07/08/97 ; PCT : ajout texture environnante
23 --              27/08/97 ; PCT : ajout coordonnee texture
24 --              00/11/97 ; CAL : retrait de la dependance avec math
25 --              00/11/97 ; CAL : ajout polyline par 2 points
26 --      16-09-98 ; BGN : Points d'entree du Triedre (S3819, Phase 1)
27 --              22-09-98 ; BGN : S3989 (anciennement S3819)
28 --                               TypeOfTriedron* from Aspect(et pas Graphic3d)
29 --              03-11-98 ; CAL : Introduction de Visual3d_LayerManager.
30 --              07-10-99 : EUG : Degeneration support (G003)
31 --               Add DegenerateStructure() and
32 --                   SetBackFacingModel() methods.
33 --      10-11-99 ; GG  : PRO19603 Change Redraw( ) method
34 --      16-06-2000 : ATS,GG : G005 - method PrimitiveArray, which are interface of OpenGl
35 --                            package, and used to initialize internal fields
36 --                            of primitives (Convert high level data to internal presentation).
37 --      17/08/00 ; THA ; Thomas HARTL <t-hartl@muenchen.matra-dtv.fr>
38 --              -> Add Print methods (works only under Windows).
39 --      27/03/02 ; GG  ; RIC120302 Add new method Begin(Aspect_Display)
40 --              28/05/02 ; VSV : New trihedron
41 --      23/12/02 ; SAV : Added methods to set background image and its
42 --                       appearence style
43 --              20/01/09 ; ABD : Integration support of system fonts (using FTGL and FreeType)
44
45 deferred class GraphicDriver from Graphic3d inherits GraphicDriver from Aspect
46
47     ---Version:
48
49     ---Purpose: This class allows the definition of a graphic driver
50     --      (currently only OpenGl driver is used).
51
52     ---Keywords: OpenGl
53
54     ---Warning:
55     ---References:
56
57 uses
58
59     SharedLibrary       from OSD,
60
61     Array1OfInteger     from TColStd,
62     Array1OfReal        from TColStd,
63     Array2OfReal        from TColStd,
64
65     ExtendedString      from TCollection,
66
67     NameOfColor         from Quantity,
68     Color               from Quantity,
69
70     PlaneAngle          from Quantity,
71
72     AlienImage          from AlienImage,
73
74     Array1OfEdge        from Aspect,
75     CLayer2d            from Aspect,
76     GraphicDriver       from Aspect,
77     TypeOfTriedronEcho  from Aspect,
78     TypeOfTriedronPosition  from Aspect,
79     Handle              from Aspect,
80     Display             from Aspect,
81     PrintAlgo           from Aspect,
82
83     AspectLine3d        from Graphic3d,
84     AspectMarker3d      from Graphic3d,
85     AspectText3d        from Graphic3d,
86     AspectFillArea3d    from Graphic3d,
87     HorizontalTextAlignment from Graphic3d,
88     CBitFields20        from Graphic3d,
89     CGroup              from Graphic3d,
90     CLight              from Graphic3d,
91     CPick               from Graphic3d,
92     CPlane              from Graphic3d,
93     CStructure          from Graphic3d,
94     CView               from Graphic3d,
95     CRawBufferData      from Image,
96     Structure           from Graphic3d,
97     TextPath            from Graphic3d,
98     TypeOfComposition   from Graphic3d,
99     TypeOfPolygon       from Graphic3d,
100     TypeOfPrimitive     from Graphic3d,
101     Vector              from Graphic3d,
102     Array1OfVertex      from Graphic3d,
103     Array2OfVertex      from Graphic3d,
104     Vertex              from Graphic3d,
105     Array1OfVertexC     from Graphic3d,
106     Array2OfVertexC     from Graphic3d,
107     VertexC             from Graphic3d,
108     Array1OfVertexN     from Graphic3d,
109     Array2OfVertexN     from Graphic3d,
110     VertexN             from Graphic3d,
111     Array1OfVertexNC    from Graphic3d,
112     Array2OfVertexNC    from Graphic3d,
113     VertexNC            from Graphic3d,
114     VerticalTextAlignment   from Graphic3d,
115     CInitTexture        from Graphic3d,
116     TypeOfTexture       from Graphic3d,
117     VertexNT            from Graphic3d,
118     Array1OfVertexNT    from Graphic3d,
119     Array2OfVertexNT    from Graphic3d,
120     PrimitiveArray      from Graphic3d,
121     PtrFrameBuffer      from Graphic3d,
122     HArray1OfByte       from TColStd,
123     FillMethod          from Aspect,
124     GradientFillMethod  from Aspect,
125     ExportFormat        from Graphic3d,
126     SortType            from Graphic3d,
127     HArray1OfReal       from TColStd,
128     CUserDraw           from Graphic3d,
129     NListOfHAsciiString from Graphic3d,
130     FontAspect          from OSD,
131     CGraduatedTrihedron from Graphic3d
132
133 raises
134
135     TransformError      from Graphic3d
136
137 is
138         Initialize ( AShrName       : CString from Standard )
139                 returns mutable GraphicDriver from Graphic3d;
140         ---Level: Public
141         ---Purpose: Initialises the Driver
142
143     -------------------------
144     -- Category: Init methods
145     -------------------------
146
147     Begin ( me          : mutable;
148             ADisplay    : CString from Standard )
149         returns Boolean from Standard
150         is deferred;
151     ---Purpose: call_togl_begin
152
153         Begin ( me              : mutable;
154                 ADisplay        : Display from Aspect )
155                 returns Boolean from Standard
156                 is deferred;
157         ---Purpose: call_togl_begin_display
158
159     End ( me    : mutable )
160         is deferred;
161     ---Purpose: call_togl_end
162
163     ----------------------------
164     -- Category: Inquire methods
165     ----------------------------
166
167     InquireLightLimit ( me  : mutable )
168         returns Integer from Standard
169         is deferred;
170     ---Purpose: call_togl_inquirelight
171
172     InquireMat ( me     : mutable;
173                  ACView : CView from Graphic3d;
174                  AMatO  : out Array2OfReal from TColStd;
175                  AMatM  : out Array2OfReal from TColStd )
176         is deferred;
177     ---Purpose: call_togl_inquiremat
178
179     InquirePlaneLimit ( me  : mutable )
180         returns Integer from Standard
181         is deferred;
182     ---Purpose: call_togl_inquireplane
183
184     InquireViewLimit ( me   : mutable )
185         returns Integer from Standard
186         is deferred;
187     ---Purpose: call_togl_inquireview
188
189     InquireTextureAvailable ( me    : mutable )
190         returns Boolean from Standard
191         is deferred;
192     ---Purpose: Returns Standard_True if texture is
193     --      supported by the graphic driver
194
195     ------------------------------
196     -- Category: Highlight methods
197     ------------------------------
198
199     Blink ( me          : mutable;
200             ACStructure : CStructure from Graphic3d;
201             Create      : Boolean from Standard )
202         is deferred;
203     ---Purpose: call_togl_blink
204
205     BoundaryBox ( me            : mutable;
206                   ACStructure   : CStructure from Graphic3d;
207                   Create        : Boolean from Standard )
208         is deferred;
209     ---Purpose: call_togl_boundarybox
210
211     HighlightColor ( me             : mutable;
212                      ACStructure    : CStructure from Graphic3d;
213                      R              : ShortReal from Standard;
214                      G              : ShortReal from Standard;
215                      B              : ShortReal from Standard;
216                      Create         : Boolean from Standard )
217         is deferred;
218     ---Purpose: call_togl_highlightcolor
219
220     NameSetStructure ( me       : mutable;
221                ACStructure  : CStructure from Graphic3d )
222         is deferred;
223     ---Purpose: call_togl_namesetstructure
224
225     -------------------------------------
226     -- Category: Group management methods
227     -------------------------------------
228
229     ClearGroup ( me     : mutable;
230              ACGroup    : CGroup from Graphic3d )
231         is deferred;
232     ---Purpose: call_togl_cleargroup
233
234     CloseGroup ( me     : mutable;
235              ACGroup    : CGroup from Graphic3d )
236         is deferred;
237     ---Purpose: call_togl_closegroup
238
239     FaceContextGroup ( me       : mutable;
240                        ACGroup  : CGroup from Graphic3d;
241                        NoInsert : Integer from Standard )
242         is deferred;
243     ---Purpose: call_togl_facecontextgroup
244
245     Group ( me  : mutable;
246         ACGroup : in out CGroup from Graphic3d )
247         is deferred;
248     ---Purpose: call_togl_group
249
250     LineContextGroup ( me       : mutable;
251                        ACGroup  : CGroup from Graphic3d;
252                        NoInsert : Integer from Standard )
253         is deferred;
254     ---Purpose: call_togl_linecontextgroup
255
256     MarkerContextGroup ( me         : mutable;
257                          ACGroup    : CGroup from Graphic3d;
258                          NoInsert   : Integer from Standard )
259         is deferred;
260     ---Purpose: call_togl_markercontextgroup
261
262     MarkerContextGroup ( me         : mutable;
263                          ACGroup    : CGroup from Graphic3d;
264                          NoInsert   : Integer from Standard;
265                          AMarkWidth : Integer from Standard;
266                          AMarkHeight: Integer from Standard;
267                          ATexture   : HArray1OfByte from TColStd )
268                 is deferred;
269     ---Purpose: call_togl_markercontextgroup
270
271     OpenGroup ( me      : mutable;
272                 ACGroup : CGroup from Graphic3d )
273         is deferred;
274     ---Purpose: call_togl_opengroup
275
276     RemoveGroup ( me        : mutable;
277                   ACGroup   : CGroup from Graphic3d )
278         is deferred;
279     ---Purpose: call_togl_removegroup
280
281     TextContextGroup ( me       : mutable;
282                        ACGroup  : CGroup from Graphic3d;
283                        NoInsert : Integer from Standard )
284         is deferred;
285     ---Purpose: call_togl_textcontextgroup
286
287     -----------------------------------------
288     -- Category: Structure management methods
289     -----------------------------------------
290
291     ClearStructure ( me             : mutable;
292                      ACStructure    : CStructure from Graphic3d )
293         is deferred;
294     ---Purpose: call_togl_clearstructure
295
296     Connect ( me        : mutable;
297               AFather   : CStructure from Graphic3d;
298               ASon      : CStructure from Graphic3d )
299         is deferred;
300     ---Purpose: call_togl_connect
301
302     ContextStructure ( me           : mutable;
303                        ACStructure  : CStructure from Graphic3d )
304         is deferred;
305     ---Purpose: call_togl_contextstructure
306
307     Disconnect ( me         : mutable;
308                  AFather    : CStructure from Graphic3d;
309                  ASon       : CStructure from Graphic3d )
310         is deferred;
311     ---Purpose: call_togl_disconnect
312
313     DisplayStructure ( me           : mutable;
314                        ACView       : CView from Graphic3d;
315                        ACStructure  : CStructure from Graphic3d;
316                        APriority    : Integer from Standard )
317         is deferred;
318     ---Purpose: call_togl_displaystructure
319
320     EraseStructure ( me             : mutable;
321                      ACView         : CView from Graphic3d;
322                      ACStructure    : CStructure from Graphic3d )
323         is deferred;
324     ---Purpose: call_togl_erasestructure
325
326     RemoveStructure ( me            : mutable;
327                       ACStructure   : CStructure from Graphic3d )
328         is deferred;
329     ---Purpose: call_togl_removestructure
330
331     Structure ( me          : mutable;
332                 ACStructure : in out CStructure from Graphic3d )
333         is deferred;
334     ---Purpose: call_togl_structure
335
336     ------------------------------------
337     -- Category: Structured mode methods
338     ------------------------------------
339
340     ActivateView ( me       : mutable;
341                    ACView   : CView from Graphic3d )
342         is deferred;
343     ---Purpose: call_togl_activateview
344
345     AntiAliasing ( me       : mutable;
346                    ACView   : CView from Graphic3d;
347                    AFlag    : Boolean from Standard )
348         is deferred;
349     ---Purpose: call_togl_antialiasing
350
351     Background ( me     : mutable;
352                  ACView : CView from Graphic3d )
353         is deferred;
354     ---Purpose: call_togl_background
355
356     GradientBackground ( me     : mutable;
357                          ACView : CView from Graphic3d;
358                          AColor1: Color from Quantity;
359                          AColor2: Color from Quantity;
360                          FillStyle : GradientFillMethod from Aspect
361                        )
362     is deferred;
363     ---Purpose: call_togl_gradient_background
364
365
366     BackgroundImage( me           : mutable;
367                      FileName     : CString from Standard;
368                      ACView       : CView from Graphic3d;
369                      FillStyle    : FillMethod from Aspect )
370     is deferred;
371
372     SetBgImageStyle( me        : mutable;
373                      ACView    : CView from Graphic3d;
374                      FillStyle : FillMethod from Aspect )
375     is deferred;
376
377     SetBgGradientStyle( me        : mutable;
378                         ACView    : CView from Graphic3d;
379                         FillStyle : GradientFillMethod from Aspect )
380     is deferred;
381
382     ClipLimit ( me      : mutable;
383                 ACView  : CView from Graphic3d;
384                 AWait   : Boolean from Standard )
385         is deferred;
386     ---Purpose: call_togl_cliplimit
387
388     DeactivateView ( me     : mutable;
389                      ACView : CView from Graphic3d )
390         is deferred;
391     ---Purpose: call_togl_deactivateview
392
393     DepthCueing ( me        : mutable;
394                   ACView    : CView from Graphic3d;
395                   AFlag     : Boolean from Standard )
396         is deferred;
397     ---Purpose: call_togl_cliplimit
398
399     ProjectRaster ( me      : mutable;
400                     ACView  : CView from Graphic3d;
401                     AX      : ShortReal from Standard;
402                     AY      : ShortReal from Standard;
403                     AZ      : ShortReal from Standard;
404                     AU      : out Integer from Standard;
405                     AV      : out Integer from Standard )
406         returns Boolean from Standard
407         is deferred;
408     ---Purpose: call_togl_unproject_raster
409
410     UnProjectRaster ( me        : mutable;
411                       ACView    : CView from Graphic3d;
412                       Axm       : Integer from Standard;
413                       Aym       : Integer from Standard;
414                       AXM       : Integer from Standard;
415                       AYM       : Integer from Standard;
416                       AU        : Integer from Standard;
417                       AV        : Integer from Standard;
418                       AX        : out ShortReal from Standard;
419                       AY        : out ShortReal from Standard;
420                       AZ        : out ShortReal from Standard )
421         returns Boolean from Standard
422         is deferred;
423     ---Purpose: call_togl_unproject_raster
424
425     UnProjectRasterWithRay ( me        : mutable;
426                              ACView    : CView from Graphic3d;
427                              Axm       : Integer from Standard;
428                              Aym       : Integer from Standard;
429                              AXM       : Integer from Standard;
430                              AYM       : Integer from Standard;
431                              AU        : Integer from Standard;
432                              AV        : Integer from Standard;
433                              AX        : out ShortReal from Standard;
434                              AY        : out ShortReal from Standard;
435                              AZ        : out ShortReal from Standard;
436                              DX        : out ShortReal from Standard;
437                              DY        : out ShortReal from Standard;
438                              DZ        : out ShortReal from Standard )
439         returns Boolean from Standard
440         is deferred;
441     ---Purpose: call_togl_unproject_raster_with_ray
442
443     RatioWindow ( me        : mutable;
444                   ACView    : CView from Graphic3d )
445         is deferred;
446     ---Purpose: call_togl_ratio_window
447
448     Redraw ( me             : mutable;
449              ACView         : CView from Graphic3d;
450              ACUnderLayer   : CLayer2d from Aspect;
451              ACOverLayer    : CLayer2d from Aspect;
452              x              : Integer = 0;
453              y              : Integer = 0;
454              width              : Integer = 0;
455              height     : Integer = 0 )
456         is deferred;
457     ---Purpose: call_togl_redraw
458     --  Warning: when the redraw area has a null size, the full view is redrawn
459
460     RemoveView ( me     : mutable;
461                 ACView  : CView from Graphic3d )
462         is deferred;
463     ---Purpose: call_togl_removeview
464
465     SetLight ( me       : mutable;
466            ACView   : CView from Graphic3d )
467         is deferred;
468     ---Purpose: call_togl_setlight
469
470     SetPlane ( me       : mutable;
471                ACView   : CView from Graphic3d )
472         is deferred;
473     ---Purpose: call_togl_setplane
474
475     SetVisualisation ( me       : mutable;
476                        ACView   : CView from Graphic3d )
477         is deferred;
478     ---Purpose: call_togl_setvisualisation
479
480     TransformStructure ( me             : mutable;
481                          ACStructure    : CStructure from Graphic3d )
482         is deferred;
483     ---Purpose: call_togl_transformstructure
484
485         DegenerateStructure ( me                        : mutable;
486                               ACStructure       : CStructure from Graphic3d )
487                 is deferred;
488         ---Purpose: call_togl_degeneratestructure
489
490     Transparency ( me       : mutable;
491                    ACView   : CView from Graphic3d;
492                    AFlag    : Boolean from Standard )
493         is deferred;
494     ---Purpose: call_togl_transparency
495
496     Update ( me             : mutable;
497              ACView         : CView from Graphic3d;
498              ACUnderLayer   : CLayer2d from Aspect;
499              ACOverLayer    : CLayer2d from Aspect )
500             is deferred;
501     ---Purpose: call_togl_update
502
503     View ( me   : mutable;
504            ACView   : in out CView from Graphic3d )
505         returns Boolean from Standard
506         is deferred;
507     ---Purpose: call_togl_view
508
509     ViewMapping ( me        : mutable;
510                   ACView    : CView from Graphic3d;
511                   AWait : Boolean from Standard )
512         is deferred;
513     ---Purpose: call_togl_viewmapping
514
515     ViewOrientation ( me        : mutable;
516                       ACView    : CView from Graphic3d;
517                       AWait     : Boolean from Standard )
518         is deferred;
519     ---Purpose: call_togl_vieworientation
520
521         Environment ( me        : mutable;
522                       ACView    : CView from Graphic3d )
523         is deferred;
524     ---Purpose:
525
526     ----------------------------------------
527     -- Category: Methods to create Marker
528     -- for Purpose : see Graphic3d_Group.cdl
529     ----------------------------------------
530
531     Marker ( me         : mutable;
532              ACGroup    : CGroup from Graphic3d;
533              APoint     : Vertex from Graphic3d;
534              EvalMinMax : Boolean from Standard = Standard_True )
535         is deferred;
536
537     MarkerSet ( me          : mutable;
538                 ACGroup     : CGroup from Graphic3d;
539                 ListVertex  : Array1OfVertex from Graphic3d;
540                 EvalMinMax  : Boolean from Standard = Standard_True )
541         is deferred;
542
543     ----------------------------------------
544     -- Category: Methods to create Polygon
545     -- for Purpose : see Graphic3d_Group.cdl
546     ----------------------------------------
547
548     Polygon ( me            : mutable;
549               ACGroup       : CGroup from Graphic3d;
550               ListVertex    : Array1OfVertex from Graphic3d;
551               AType         : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
552               EvalMinMax    : Boolean from Standard = Standard_True )
553         is deferred;
554     ---Purpose: call_togl_polygon
555
556     ----------------------------------------
557     -- Category: Methods to create Text
558     -- for Purpose : see Graphic3d_Group.cdl
559     ----------------------------------------
560
561     Text ( me   : mutable;
562            ACGroup  : CGroup from Graphic3d;
563            AText    : CString from Standard;
564            APoint   : Vertex from Graphic3d;
565            AHeight  : Real from Standard;
566            AAngle   : PlaneAngle from Quantity;
567            ATp  : TextPath from Graphic3d;
568            AHta : HorizontalTextAlignment from Graphic3d;
569            AVta : VerticalTextAlignment from Graphic3d;
570            EvalMinMax   : Boolean from Standard = Standard_True )
571         is deferred;
572     ---Purpose: call_togl_text
573
574     Text ( me   : mutable;
575            ACGroup  : CGroup from Graphic3d;
576            AText    : CString from Standard;
577            APoint   : Vertex from Graphic3d;
578            AHeight  : Real from Standard;
579            EvalMinMax   : Boolean from Standard = Standard_True )
580         is deferred;
581     ---Purpose: call_togl_text
582
583     Text ( me   : mutable;
584            ACGroup  : CGroup from Graphic3d;
585            AText    : ExtendedString from TCollection;
586            APoint   : Vertex from Graphic3d;
587            AHeight  : Real from Standard;
588            AAngle   : PlaneAngle from Quantity;
589            ATp  : TextPath from Graphic3d;
590            AHta : HorizontalTextAlignment from Graphic3d;
591            AVta : VerticalTextAlignment from Graphic3d;
592            EvalMinMax   : Boolean from Standard = Standard_True )
593         is deferred;
594     ---Purpose: call_togl_text
595
596     Text ( me   : mutable;
597            ACGroup  : CGroup from Graphic3d;
598            AText    : ExtendedString from TCollection;
599            APoint   : Vertex from Graphic3d;
600            AHeight  : Real from Standard;
601            EvalMinMax   : Boolean from Standard = Standard_True )
602         is deferred;
603     ---Purpose: call_togl_text
604
605     ----------------------------------------
606     ---Category: Methods to create Triangle
607     -- for Purpose : see Graphic3d_Group.cdl
608     ----------------------------------------
609
610     PrimitiveArray( me          : mutable;
611                     ACGroup     : CGroup from Graphic3d;
612                     parray      : PrimitiveArray from Graphic3d;
613                     EvalMinMax  : Boolean from Standard = Standard_True )
614         is deferred;
615         ---Purpose: call_togl_parray
616
617     UserDraw( me          : mutable;
618               ACGroup     : CGroup from Graphic3d;
619               AUserDraw   : CUserDraw from Graphic3d )
620         is deferred;
621         ---Purpose: call_togl_userdraw
622
623     EnableVBO( me       : mutable;
624                status   : Boolean from Standard )
625                is deferred;
626     ---Purpose: enables/disables usage of OpenGL vertex buffer arrays while drawing primitiev arrays
627
628     ----------------------------------------
629     ---Category: Methods to create Triedron
630     -- for Purpose : see Graphic3d_Group.cdl
631     ----------------------------------------
632
633     ZBufferTriedronSetup ( me          : mutable;
634                            XColor      : NameOfColor from Quantity = Quantity_NOC_RED;
635                            YColor      : NameOfColor from Quantity = Quantity_NOC_GREEN;
636                            ZColor      : NameOfColor from Quantity = Quantity_NOC_BLUE1;
637                            SizeRatio   : Real from Standard = 0.8;
638                            AxisDiametr : Real from Standard = 0.05;
639                            NbFacettes  : Integer from Standard = 12)
640          is deferred;
641         ---Purpose: call_togl_ztriedron_setup
642
643     TriedronDisplay ( me            : mutable;
644                       ACView        : CView from Graphic3d;
645                       APosition     : TypeOfTriedronPosition from Aspect  = Aspect_TOTP_CENTER;
646                       AColor        : NameOfColor from Quantity = Quantity_NOC_WHITE ;
647                       AScale        : Real from Standard  =  0.02;
648                       AsWireframe   : Boolean from Standard = Standard_True )
649         is deferred;
650     ---Purpose: call_togl_triedron_display
651
652
653     TriedronErase ( me      : mutable;
654                   ACView    : CView from Graphic3d)
655         is deferred;
656     ---Purpose: call_togl_triedron_erase
657
658
659     TriedronEcho ( me       : mutable;
660                    ACView   : CView from Graphic3d;
661                    AType    : TypeOfTriedronEcho from Aspect  = Aspect_TOTE_NONE )
662         is deferred;
663     ---Purpose: call_togl_triedron_echo
664
665     ---------------------------------
666     ---Category: Graduated  trihedron
667     ---------------------------------
668
669     GraduatedTrihedronDisplay(me : mutable;
670                               view : CView from Graphic3d;
671                               cubic : CGraduatedTrihedron from Graphic3d)
672     ---Purpose: call_togl_graduatedtrihedron_display
673     is deferred;
674
675     GraduatedTrihedronErase(me : mutable;
676                             view : CView from Graphic3d)
677     ---Purpose: call_togl_graduatedtrihedron_erase
678     is deferred;
679
680     GraduatedTrihedronMinMaxValues(me : mutable;
681                                    xmin : ShortReal from Standard;
682                                    ymin : ShortReal from Standard;
683                                    zmin : ShortReal from Standard;
684                                    xmax : ShortReal from Standard;
685                                    ymax : ShortReal from Standard;
686                                    zmax : ShortReal from Standard)
687     ---Purpose: call_togl_graduatedtrihedron_minmaxvalues
688     is deferred;
689
690     ---------------------------
691     -- Category: Animation mode
692     ---------------------------
693
694     BeginAnimation ( me : mutable;
695              ACView : CView from Graphic3d)
696         is deferred;
697     ---Purpose: call_togl_begin_animation
698
699     EndAnimation ( me   : mutable;
700                ACView   : CView from Graphic3d)
701         is deferred;
702     ---Purpose: call_togl_end_animation
703
704     ----------------------------------
705     -- Category: Ajout mode methods
706     ----------------------------------
707
708     BeginAddMode ( me   : mutable;
709                 ACView      : CView from Graphic3d)
710         returns Boolean from Standard
711         is deferred;
712     ---Purpose: call_togl_begin_ajout_mode
713
714     EndAddMode ( me     : mutable)
715         is deferred;
716     ---Purpose: call_togl_end_ajout_mode
717
718     ----------------------------------
719     -- Category: Immediat mode methods
720     ----------------------------------
721
722     BeginImmediatMode ( me              : mutable;
723                         ACView          : CView from Graphic3d;
724                         ACUnderLayer    : CLayer2d from Aspect;
725                         ACOverLayer     : CLayer2d from Aspect;
726                         DoubleBuffer    : Boolean from Standard;
727                         RetainMode      : Boolean from Standard)
728         returns Boolean from Standard
729         is deferred;
730     ---Purpose: call_togl_begin_immediat_mode
731
732     BeginPolyline ( me  : mutable )
733         is deferred;
734     ---Purpose: call_togl_begin_polyline
735
736     ClearImmediatMode ( me  : mutable; ACView       : CView from Graphic3d;
737                   aFlush        : Boolean from Standard = Standard_True)
738         is deferred;
739     ---Purpose: call_togl_clear_immediat_mode
740
741     Draw ( me   : mutable;
742            X    : ShortReal from Standard;
743            Y    : ShortReal from Standard;
744            Z    : ShortReal from Standard )
745         is deferred;
746     ---Purpose: call_togl_draw
747
748     DrawStructure ( me          : mutable;
749                     ACStructure : CStructure from Graphic3d )
750         is deferred;
751     ---Purpose: call_togl_draw_structure
752
753     EndImmediatMode ( me            : mutable;
754                       Synchronize   : Integer from Standard )
755         is deferred;
756     ---Purpose: call_togl_end_immediat_mode
757
758     EndPolyline ( me    : mutable )
759         is deferred;
760     ---Purpose: call_togl_end_polyline
761
762     Move ( me   : mutable;
763            X    : ShortReal from Standard;
764            Y    : ShortReal from Standard;
765            Z    : ShortReal from Standard )
766         is deferred;
767     ---Purpose: call_togl_move
768
769     SetLineColor ( me   : mutable;
770                    R    : ShortReal from Standard;
771                    G    : ShortReal from Standard;
772                    B    : ShortReal from Standard )
773         is deferred;
774     ---Purpose: call_togl_set_linecolor
775
776     SetLineType ( me    : mutable;
777                   Type  : Integer from Standard )
778         is deferred;
779     ---Purpose: call_togl_set_linetype
780
781     SetLineWidth ( me   : mutable;
782                Width    : ShortReal from Standard )
783         is deferred;
784     ---Purpose: call_togl_set_linewidth
785
786     SetMinMax ( me  : mutable;
787                 X1  : ShortReal from Standard;
788                 Y1  : ShortReal from Standard;
789                 Z1  : ShortReal from Standard;
790                 X2  : ShortReal from Standard;
791                 Y2  : ShortReal from Standard;
792                 Z2  : ShortReal from Standard )
793         is deferred;
794     ---Purpose: call_togl_set_minmax
795
796     Transform ( me      : mutable;
797                 AMatrix : Array2OfReal from TColStd;
798                 AType   : TypeOfComposition from Graphic3d )
799         is deferred;
800     ---Purpose: call_togl_transform
801
802     -----------------------------
803     -- Category: Textures methods
804     -----------------------------
805
806         CreateTexture ( me;
807                         Type            : TypeOfTexture from Graphic3d;
808                         Image           : AlienImage from AlienImage;
809                         FileName        : CString from Standard;
810                         TexUpperBounds  : HArray1OfReal from TColStd )
811         returns Integer from Standard
812         is deferred;
813     ---Purpose:
814
815     DestroyTexture ( me;
816                      TexId  : Integer from Standard )
817         is deferred;
818     ---Purpose:
819
820     ModifyTexture ( me;
821                     TexId   : Integer from Standard;
822                     AValue  : CInitTexture from Graphic3d )
823         is deferred;
824     ---Purpose:
825
826     -------------------------------
827     -- Category: Layer mode methods
828     -------------------------------
829
830     Layer ( me      : mutable;
831             ACLayer : in out CLayer2d from Aspect )
832         is deferred;
833     ---Purpose: call_togl_layer2d
834
835     RemoveLayer ( me        : mutable;
836                   ACLayer   : CLayer2d from Aspect )
837         is deferred;
838     ---Purpose: call_togl_removelayer2d
839
840     BeginLayer ( me         : mutable;
841                  ACLayer    : CLayer2d from Aspect )
842         is deferred;
843     ---Purpose: call_togl_begin_layer2d
844
845     BeginPolygon2d ( me : mutable )
846         is deferred;
847     ---Purpose: call_togl_begin_polygon2d
848
849     BeginPolyline2d ( me    : mutable )
850         is deferred;
851     ---Purpose: call_togl_begin_polyline2d
852
853     ClearLayer ( me         : mutable;
854                  ACLayer    : CLayer2d from Aspect )
855         is deferred;
856     ---Purpose: call_togl_clear_layer2d
857
858     Draw ( me   : mutable;
859            X    : ShortReal from Standard;
860            Y    : ShortReal from Standard )
861         is deferred;
862     ---Purpose: call_togl_draw2d
863
864     Edge ( me   : mutable;
865            X    : ShortReal from Standard;
866            Y    : ShortReal from Standard )
867         is deferred;
868     ---Purpose: call_togl_edge2d
869
870     EndLayer ( me       : mutable )
871         is deferred;
872     ---Purpose: call_togl_end_layer2d
873
874     EndPolygon2d ( me   : mutable )
875         is deferred;
876     ---Purpose: call_togl_end_polygon2d
877
878     EndPolyline2d ( me  : mutable )
879         is deferred;
880     ---Purpose: call_togl_end_polyline2d
881
882     Move ( me   : mutable;
883            X    : ShortReal from Standard;
884            Y    : ShortReal from Standard )
885         is deferred;
886     ---Purpose: call_togl_move2d
887
888     Rectangle ( me              : mutable;
889                 X, Y            : ShortReal from Standard;
890                 Width, Height   : ShortReal from Standard )
891         is deferred;
892     ---Purpose: call_togl_rectangle2d
893
894     SetColor ( me   : mutable;
895                R    : ShortReal from Standard;
896                G    : ShortReal from Standard;
897                B    : ShortReal from Standard )
898         is deferred;
899     ---Purpose: call_togl_set_color
900
901     SetTransparency ( me    : mutable;
902            ATransparency    : ShortReal from Standard )
903         is deferred;
904     ---Purpose: call_togl_set_transparency
905
906     UnsetTransparency ( me  : mutable )
907         is deferred;
908     ---Purpose: call_togl_unset_transparency
909
910     SetLineAttributes ( me      : mutable;
911                         Type    : Integer from Standard;
912                         Width   : ShortReal from Standard )
913         is deferred;
914     ---Purpose: call_togl_set_line_attributes
915
916
917     SetTextAttributes ( me      : mutable;
918                         Font    : CString from Standard;
919                         Type    : Integer from Standard;
920                         R       : ShortReal from Standard;
921                         G       : ShortReal from Standard;
922                         B       : ShortReal from Standard )
923         is deferred;
924     ---Purpose: Set text attributes for under-/overlayer.
925     -- <Font> argument defines the name of the font to be used,
926     -- <Type> argument defines the display type of the text,
927     -- <R> <G> <B> values define the color of decal or subtitle background.
928     -- To set the color of the text you can use the SetColor method.
929
930     Text ( me       : mutable;
931            AText    : CString from Standard;
932            X, Y     : ShortReal from Standard;
933            AHeight  : ShortReal from Standard )
934         is deferred;
935     ---Purpose: call_togl_text2d
936     -- If AHeight < 0 default text height is used by driver (DefaultTextHeight method)
937
938     DefaultTextHeight( me )
939         returns ShortReal from Standard
940         is deferred;
941
942
943     TextSize( me;
944               AText    : CString from Standard;
945               AHeight  : ShortReal from Standard;
946               AWidth   : in out ShortReal from Standard;
947               AnAscent : in out ShortReal from Standard;
948               ADescent : in out ShortReal from Standard )
949             is deferred;
950     ---Purpose: call_togl_textsize2d
951
952         SetBackFacingModel ( me    : mutable;
953                              aView : CView from Graphic3d )
954             is deferred;
955         ---Purpose: call_togl_backfacing
956
957         SetDepthTestEnabled( me; view : CView from Graphic3d;
958                                  isEnabled : Boolean from Standard )
959     is deferred;
960     ---Purpose: call_togl_depthtest
961
962         IsDepthTestEnabled( me; view : CView from Graphic3d )
963     returns Boolean from Standard is deferred;
964     ---Purpose: call_togl_isdepthtest
965
966         ReadDepths( me;
967                     view          : CView from Graphic3d;
968                     x, y          : Integer;
969                     width, height : Integer;
970                     buffer        : Address )
971     is deferred;
972     ---Purpose: Reads depths of shown pixels of the given
973     --          rectangle (glReadPixels with GL_DEPTH_COMPONENT)
974
975         FBOCreate( me            : mutable;
976                    view          : CView from Graphic3d;
977                    width, height : Integer from Standard )
978                   returns PtrFrameBuffer from Graphic3d
979     is deferred;
980     ---Purpose: Generate offscreen FBO in the graphic library.
981     --          If not supported on hardware returns NULL.
982
983         FBORelease( me            : mutable;
984                     view          : CView from Graphic3d;
985                     fboPtr        : in out PtrFrameBuffer from Graphic3d )
986     is deferred;
987     ---Purpose: Remove offscreen FBO from the graphic library
988
989         FBOGetDimensions( me                  : mutable;
990                           view                : CView from Graphic3d;
991                           fboPtr              : PtrFrameBuffer from Graphic3d;
992                           width, height       : out Integer from Standard;
993                           widthMax, heightMax : out Integer from Standard )
994     is deferred;
995     ---Purpose: Read offscreen FBO configuration.
996
997         FBOChangeViewport( me                  : mutable;
998                            view                : CView from Graphic3d;
999                            fboPtr              : in out PtrFrameBuffer from Graphic3d;
1000                            width, height       : Integer from Standard )
1001     is deferred;
1002     ---Purpose: Change offscreen FBO viewport.
1003
1004         BufferDump( me            : mutable;
1005                     view          : CView from Graphic3d;
1006                     buffer        : in out CRawBufferData from Image )
1007                    returns Boolean from Standard
1008     is deferred;
1009     ---Purpose: Dump active rendering buffer into specified memory buffer.
1010
1011         SetGLLightEnabled( me; view : CView from Graphic3d;
1012                                isEnabled : Boolean from Standard )
1013     is deferred;
1014     ---Purpose: call_togl_gllight
1015
1016         IsGLLightEnabled( me; view : CView from Graphic3d )
1017     returns Boolean from Standard is deferred;
1018     ---Purpose: call_togl_isgllight
1019
1020     Print (me;
1021            ACView          : CView from Graphic3d;
1022            ACUnderLayer    : CLayer2d from Aspect;
1023            ACOverLayer     : CLayer2d from Aspect;
1024            hPrnDC          : Handle from Aspect;
1025            showBackground  : Boolean;
1026            filename        : CString;
1027            printAlgorithm  : PrintAlgo from Aspect = Aspect_PA_STRETCH;
1028            theScaleFactor  : Real from Standard = 1.0 )
1029         returns Boolean from Standard is deferred;
1030       ---Level: Internal
1031       ---Purpose: print the contents of all layers of the view to the printer.
1032     -- <hPrnDC> : Pass the PrinterDeviceContext (HDC),
1033     -- <showBackground> : When set to FALSE then print the view without background color
1034     -- (background is white)
1035       -- else set to TRUE for printing with current background color.
1036     -- <filename>: If != NULL, then the view will be printed to a file.
1037     -- <printAlgorithm>: Select print algorithm: stretch, tile.   
1038     -- <theScaleFactor>: Scaling coefficient, used internally to scale the
1039     -- printings accordingly to the scale factor selected in the printer 
1040     -- properties dialog.
1041     -- Returns Standard_True if the data is passed to the printer, otherwise
1042     -- Standard_False if the print operation failed due to the printer errors, 
1043     -- or insufficient system memory available.
1044     ---Warning: Works only under Windows.
1045
1046         Export( me: mutable;
1047                 theFileName         : CString from Standard;
1048                 theFormat           : ExportFormat from Graphic3d;
1049                 theSortType         : SortType from Graphic3d;
1050                 theWidth, theHeight : Integer from Standard;
1051                 theView             : CView from Graphic3d;
1052                 theLayerUnder       : CLayer2d from Aspect;
1053                 theLayerOver        : CLayer2d from Aspect;
1054                 thePrecision        : Real from Standard = 0.005;
1055                 theProgressBarFunc  : Address from Standard = NULL;
1056                 theProgressObject   : Address from Standard = NULL )
1057         returns Boolean from Standard
1058         is deferred;
1059     ---Purpose:
1060     -- Export scene into the one of the Vector graphics formats (SVG, PS, PDF...).
1061     -- In contrast to Bitmaps, Vector graphics is scalable (so you may got quality benefits on printing to laser printer).
1062     -- Notice however that results may differ a lot and do not contain some elements.
1063
1064     RemovePrimitiveArray( me        : mutable;
1065                           theCGroup : CGroup from Graphic3d;
1066                           thePArray : PrimitiveArray from Graphic3d )
1067         is deferred;
1068         ---Purpose: Clear visualization data in graphical driver and
1069         -- stop displaying the primitives array of the graphical group
1070         -- <theCGroup>. This method is internal and should be used
1071         -- by Graphic3d_Group only.
1072
1073     AddZLayer( me         : mutable;
1074                theCView   : CView from Graphic3d;
1075                theLayerId : Integer from Standard )
1076         is deferred;
1077         ---Purpose: Add a new top-level z layer with ID <theLayerId> for
1078         -- the view. Z layers allow drawing structures in higher layers
1079         -- in foreground of structures in lower layers. To add a structure
1080         -- to desired layer on display it is necessary to set the layer
1081         -- ID for the structure.
1082
1083     RemoveZLayer( me         : mutable;
1084                   theCView   : CView from Graphic3d;
1085                   theLayerId : Integer from Standard )
1086         is deferred;
1087         ---Purpose: Remove Z layer from the specified view. All structures
1088         -- displayed at the moment in layer will be displayed in default layer
1089         -- ( the bottom-level z layer ). To unset layer ID from associated
1090         -- structures use method UnsetZLayer (...).
1091
1092     UnsetZLayer( me         : mutable;
1093                  theLayerId : Integer from Standard ) 
1094         is deferred;
1095         ---Purpose: Unset Z layer ID for all structures. The structure
1096         -- indexes will be set to default layer ( the bottom-level z layer
1097         -- with ID = 0 ).
1098
1099     ChangeZLayer( me            : mutable;
1100                   theCStructure : CStructure from Graphic3d;
1101                   theLayerId    : Integer from Standard )
1102         is deferred;
1103         ---Purpose: Change Z layer of a structure. The new z layer ID will
1104         -- be used to define the associated layer for structure on display.
1105
1106     ChangeZLayer( me            : mutable;
1107                   theCStructure : CStructure from Graphic3d;
1108                   theCView      : CView from Graphic3d;
1109                   theNewLayerId : Integer from Standard )
1110         is deferred;
1111         ---Purpose: Change Z layer of a structure already presented in view.
1112
1113     GetZLayer( me;
1114                theCStructure : CStructure from Graphic3d )
1115         returns Integer from Standard is deferred;
1116         ---Purpose: Get Z layer ID of structure. If the structure doesn't
1117         -- exists in graphic driver, the method returns -1.
1118
1119     --------------------------
1120     -- Category: Class methods
1121     --------------------------
1122
1123     Light ( myclass;
1124         ACLight : CLight from Graphic3d;
1125         Update  : Boolean from Standard )
1126         returns Integer from Standard;
1127     ---Purpose: call_togl_light
1128
1129     Plane ( myclass;
1130         ACPlane : CPlane from Graphic3d;
1131         Update  : Boolean from Standard )
1132         returns Integer from Standard;
1133     ---Purpose: call_togl_plane
1134
1135     -----------------------------
1136     -- Category: Internal methods
1137     -----------------------------
1138
1139     PrintBoolean ( me;
1140                    AComment : CString from Standard;
1141                    AValue   : Boolean from Standard );
1142
1143     PrintCGroup ( me;
1144                   ACGroup   : CGroup from Graphic3d;
1145                   AField    : Integer from Standard );
1146
1147     PrintCLight ( me;
1148                   ACLight   : CLight from Graphic3d;
1149                   AField    : Integer from Standard );
1150
1151     PrintCPick ( me;
1152                  ACPick    : CPick from Graphic3d;
1153                  AField    : Integer from Standard );
1154
1155     PrintCPlane ( me;
1156                   ACPlane   : CPlane from Graphic3d;
1157                   AField    : Integer from Standard );
1158
1159     PrintCStructure ( me;
1160                       ACStructure   : CStructure from Graphic3d;
1161                       AField    : Integer from Standard );
1162
1163     PrintCView ( me;
1164                  ACView : CView from Graphic3d;
1165                  AField : Integer from Standard );
1166
1167     PrintFunction ( me;
1168                     AFunc   : CString from Standard );
1169
1170     PrintInteger ( me;
1171                    AComment  : CString from Standard;
1172                    AValue    : Integer from Standard );
1173
1174     PrintIResult ( me;
1175                    AFunc    : CString from Standard;
1176                    AResult  : Integer from Standard );
1177
1178     PrintShortReal ( me;
1179                      AComment   : CString from Standard;
1180                      AValue     : ShortReal from Standard );
1181
1182     PrintMatrix ( me;
1183                   AComment  : CString from Standard;
1184                   AMatrix   : Array2OfReal from TColStd )
1185         raises TransformError from Graphic3d;
1186
1187     PrintString ( me;
1188                   AComment  : CString from Standard;
1189                   AString   : CString from Standard );
1190
1191     SetTrace ( me       : mutable;
1192                ALevel   : Integer from Standard )
1193         is static;
1194
1195     Trace ( me )
1196         returns Integer from Standard
1197         is static;
1198
1199     --ListOfAvalableFontNames( me;
1200     --           lst: out NListOfHAsciiString from Graphic3d )
1201     --           returns Boolean from Standard
1202     --           is deferred;
1203     --  Purpose:  Initialize list of names of avalable system fonts
1204     --            returns Standard_False if fails
1205     --  ABD Integration support of system fonts (using FTGL and FreeType)
1206
1207 fields
1208
1209     MyTraceLevel    : Integer from Standard is protected;
1210     MySharedLibrary : SharedLibrary from OSD is protected;
1211
1212 end GraphicDriver from Graphic3d;