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