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