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