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