1 -- Created on: 1997-01-28
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
21 deferred class GraphicDriver from Graphic3d inherits TShared
25 ---Purpose: This class allows the definition of a graphic driver
26 -- (currently only OpenGl driver is used).
35 SharedLibrary from OSD,
37 Array1OfInteger from TColStd,
38 Array1OfReal from TColStd,
39 Array2OfReal from TColStd,
41 AsciiString from TCollection,
42 ExtendedString from TCollection,
44 NameOfColor from Quantity,
47 PlaneAngle from Quantity,
51 Array1OfEdge from Aspect,
53 TypeOfTriedronEcho from Aspect,
54 TypeOfTriedronPosition from Aspect,
57 PrintAlgo from Aspect,
58 DisplayConnection_Handle from Aspect,
60 AspectLine3d from Graphic3d,
61 AspectMarker3d from Graphic3d,
62 AspectText3d from Graphic3d,
63 AspectFillArea3d from Graphic3d,
64 HorizontalTextAlignment from Graphic3d,
65 CBitFields20 from Graphic3d,
66 CGroup from Graphic3d,
67 CLight from Graphic3d,
69 CPlane from Graphic3d,
70 CStructure from Graphic3d,
72 BufferType from Graphic3d,
73 Structure from Graphic3d,
74 TextPath from Graphic3d,
75 TypeOfComposition from Graphic3d,
76 TypeOfPrimitive from Graphic3d,
77 Vector from Graphic3d,
78 Array1OfVertex from Graphic3d,
79 Array2OfVertex from Graphic3d,
80 Vertex from Graphic3d,
81 VerticalTextAlignment from Graphic3d,
82 PrimitiveArray from Graphic3d,
83 PtrFrameBuffer from Graphic3d,
84 HArray1OfByte from TColStd,
85 FillMethod from Aspect,
86 GradientFillMethod from Aspect,
87 ExportFormat from Graphic3d,
88 SortType from Graphic3d,
89 HArray1OfReal from TColStd,
90 CUserDraw from Graphic3d,
91 NListOfHAsciiString from Graphic3d,
93 CGraduatedTrihedron from Graphic3d,
94 ClipPlane from Graphic3d
98 TransformError from Graphic3d
101 Initialize ( AShrName : CString from Standard )
102 returns mutable GraphicDriver from Graphic3d;
104 ---Purpose: Initialises the Driver
106 -------------------------
107 -- Category: Init methods
108 -------------------------
111 theDisplayConnection: DisplayConnection_Handle from Aspect)
112 returns Boolean from Standard
114 ---Purpose: Starts graphic driver with given connection
118 ---Purpose: call_togl_end
120 ----------------------------
121 -- Category: Inquire methods
122 ----------------------------
124 InquireLightLimit ( me : mutable )
125 returns Integer from Standard
127 ---Purpose: call_togl_inquirelight
129 InquireMat ( me : mutable;
130 ACView : CView from Graphic3d;
131 AMatO : out Array2OfReal from TColStd;
132 AMatM : out Array2OfReal from TColStd )
134 ---Purpose: call_togl_inquiremat
136 InquirePlaneLimit ( me : mutable )
137 returns Integer from Standard
139 ---Purpose: call_togl_inquireplane
141 InquireViewLimit ( me : mutable )
142 returns Integer from Standard
144 ---Purpose: call_togl_inquireview
146 ------------------------------
147 -- Category: Highlight methods
148 ------------------------------
150 Blink ( me : mutable;
151 ACStructure : CStructure from Graphic3d;
152 Create : Boolean from Standard )
154 ---Purpose: call_togl_blink
156 BoundaryBox ( me : mutable;
157 ACStructure : CStructure from Graphic3d;
158 Create : Boolean from Standard )
160 ---Purpose: call_togl_boundarybox
162 HighlightColor ( me : mutable;
163 ACStructure : CStructure from Graphic3d;
164 R : ShortReal from Standard;
165 G : ShortReal from Standard;
166 B : ShortReal from Standard;
167 Create : Boolean from Standard )
169 ---Purpose: call_togl_highlightcolor
171 NameSetStructure ( me : mutable;
172 ACStructure : CStructure from Graphic3d )
174 ---Purpose: call_togl_namesetstructure
176 -------------------------------------
177 -- Category: Group management methods
178 -------------------------------------
180 ClearGroup ( me : mutable;
181 ACGroup : CGroup from Graphic3d )
183 ---Purpose: call_togl_cleargroup
185 FaceContextGroup ( me : mutable;
186 ACGroup : CGroup from Graphic3d;
187 NoInsert : Integer from Standard )
189 ---Purpose: call_togl_facecontextgroup
191 Group ( me : mutable;
192 ACGroup : in out CGroup from Graphic3d )
194 ---Purpose: call_togl_group
196 LineContextGroup ( me : mutable;
197 ACGroup : CGroup from Graphic3d;
198 NoInsert : Integer from Standard )
200 ---Purpose: call_togl_linecontextgroup
202 MarkerContextGroup ( me : mutable;
203 ACGroup : CGroup from Graphic3d;
204 NoInsert : Integer from Standard )
206 ---Purpose: call_togl_markercontextgroup
208 MarkerContextGroup ( me : mutable;
209 ACGroup : CGroup from Graphic3d;
210 NoInsert : Integer from Standard;
211 AMarkWidth : Integer from Standard;
212 AMarkHeight: Integer from Standard;
213 ATexture : HArray1OfByte from TColStd )
215 ---Purpose: call_togl_markercontextgroup
217 RemoveGroup ( me : mutable;
218 ACGroup : CGroup from Graphic3d )
220 ---Purpose: call_togl_removegroup
222 TextContextGroup ( me : mutable;
223 ACGroup : CGroup from Graphic3d;
224 NoInsert : Integer from Standard )
226 ---Purpose: call_togl_textcontextgroup
228 -----------------------------------------
229 -- Category: Structure management methods
230 -----------------------------------------
232 ClearStructure ( me : mutable;
233 ACStructure : CStructure from Graphic3d )
235 ---Purpose: call_togl_clearstructure
237 Connect ( me : mutable;
238 AFather : CStructure from Graphic3d;
239 ASon : CStructure from Graphic3d )
241 ---Purpose: call_togl_connect
243 ContextStructure ( me : mutable;
244 ACStructure : CStructure from Graphic3d )
246 ---Purpose: call_togl_contextstructure
248 Disconnect ( me : mutable;
249 AFather : CStructure from Graphic3d;
250 ASon : CStructure from Graphic3d )
252 ---Purpose: call_togl_disconnect
254 DisplayStructure ( me : mutable;
255 ACView : CView from Graphic3d;
256 ACStructure : CStructure from Graphic3d;
257 APriority : Integer from Standard )
259 ---Purpose: call_togl_displaystructure
261 EraseStructure ( me : mutable;
262 ACView : CView from Graphic3d;
263 ACStructure : CStructure from Graphic3d )
265 ---Purpose: call_togl_erasestructure
267 RemoveStructure ( me : mutable;
268 ACStructure : CStructure from Graphic3d )
270 ---Purpose: call_togl_removestructure
272 Structure ( me : mutable;
273 ACStructure : in out CStructure from Graphic3d )
275 ---Purpose: call_togl_structure
277 ------------------------------------
278 -- Category: Structured mode methods
279 ------------------------------------
281 ActivateView ( me : mutable;
282 ACView : CView from Graphic3d )
284 ---Purpose: call_togl_activateview
286 AntiAliasing ( me : mutable;
287 ACView : CView from Graphic3d;
288 AFlag : Boolean from Standard )
290 ---Purpose: call_togl_antialiasing
292 Background ( me : mutable;
293 ACView : CView from Graphic3d )
295 ---Purpose: call_togl_background
297 GradientBackground ( me : mutable;
298 ACView : CView from Graphic3d;
299 AColor1: Color from Quantity;
300 AColor2: Color from Quantity;
301 FillStyle : GradientFillMethod from Aspect
304 ---Purpose: call_togl_gradient_background
307 BackgroundImage( me : mutable;
308 FileName : CString from Standard;
309 ACView : CView from Graphic3d;
310 FillStyle : FillMethod from Aspect )
313 SetBgImageStyle( me : mutable;
314 ACView : CView from Graphic3d;
315 FillStyle : FillMethod from Aspect )
318 SetBgGradientStyle( me : mutable;
319 ACView : CView from Graphic3d;
320 FillStyle : GradientFillMethod from Aspect )
323 ClipLimit ( me : mutable;
324 ACView : CView from Graphic3d;
325 AWait : Boolean from Standard )
327 ---Purpose: call_togl_cliplimit
329 DeactivateView ( me : mutable;
330 ACView : CView from Graphic3d )
332 ---Purpose: call_togl_deactivateview
334 DepthCueing ( me : mutable;
335 ACView : CView from Graphic3d;
336 AFlag : Boolean from Standard )
338 ---Purpose: call_togl_cliplimit
340 ProjectRaster ( me : mutable;
341 ACView : CView from Graphic3d;
342 AX : ShortReal from Standard;
343 AY : ShortReal from Standard;
344 AZ : ShortReal from Standard;
345 AU : out Integer from Standard;
346 AV : out Integer from Standard )
347 returns Boolean from Standard
349 ---Purpose: call_togl_unproject_raster
351 UnProjectRaster ( me : mutable;
352 ACView : CView from Graphic3d;
353 Axm : Integer from Standard;
354 Aym : Integer from Standard;
355 AXM : Integer from Standard;
356 AYM : Integer from Standard;
357 AU : Integer from Standard;
358 AV : Integer from Standard;
359 AX : out ShortReal from Standard;
360 AY : out ShortReal from Standard;
361 AZ : out ShortReal from Standard )
362 returns Boolean from Standard
364 ---Purpose: call_togl_unproject_raster
366 UnProjectRasterWithRay ( me : mutable;
367 ACView : CView from Graphic3d;
368 Axm : Integer from Standard;
369 Aym : Integer from Standard;
370 AXM : Integer from Standard;
371 AYM : Integer from Standard;
372 AU : Integer from Standard;
373 AV : Integer from Standard;
374 AX : out ShortReal from Standard;
375 AY : out ShortReal from Standard;
376 AZ : out ShortReal from Standard;
377 DX : out ShortReal from Standard;
378 DY : out ShortReal from Standard;
379 DZ : out ShortReal from Standard )
380 returns Boolean from Standard
382 ---Purpose: call_togl_unproject_raster_with_ray
384 RatioWindow ( me : mutable;
385 ACView : CView from Graphic3d )
387 ---Purpose: call_togl_ratio_window
389 Redraw ( me : mutable;
390 ACView : CView from Graphic3d;
391 ACUnderLayer : CLayer2d from Aspect;
392 ACOverLayer : CLayer2d from Aspect;
396 height : Integer = 0 )
398 ---Purpose: call_togl_redraw
399 -- Warning: when the redraw area has a null size, the full view is redrawn
401 RemoveView ( me : mutable;
402 ACView : CView from Graphic3d )
404 ---Purpose: call_togl_removeview
406 SetLight ( me : mutable;
407 ACView : CView from Graphic3d )
409 ---Purpose: call_togl_setlight
411 SetClipPlanes (me : mutable; theCView : CView from Graphic3d) is deferred;
412 ---Purpose: Pass clip planes to the associated graphic driver view.
414 SetClipPlanes (me : mutable; theCStructure : CStructure from Graphic3d) is deferred;
415 ---Purpose: Pass clip planes to the associated graphic driver structure.
417 SetVisualisation ( me : mutable;
418 ACView : CView from Graphic3d )
420 ---Purpose: call_togl_setvisualisation
422 TransformStructure ( me : mutable;
423 ACStructure : CStructure from Graphic3d )
425 ---Purpose: call_togl_transformstructure
427 Transparency ( me : mutable;
428 ACView : CView from Graphic3d;
429 AFlag : Boolean from Standard )
431 ---Purpose: call_togl_transparency
433 Update ( me : mutable;
434 ACView : CView from Graphic3d;
435 ACUnderLayer : CLayer2d from Aspect;
436 ACOverLayer : CLayer2d from Aspect )
438 ---Purpose: call_togl_update
441 ACView : in out CView from Graphic3d )
442 returns Boolean from Standard
444 ---Purpose: call_togl_view
446 ViewMapping ( me : mutable;
447 ACView : CView from Graphic3d;
448 AWait : Boolean from Standard )
450 ---Purpose: call_togl_viewmapping
452 ViewOrientation ( me : mutable;
453 ACView : CView from Graphic3d;
454 AWait : Boolean from Standard )
456 ---Purpose: call_togl_vieworientation
458 Environment ( me : mutable;
459 ACView : CView from Graphic3d )
463 ----------------------------------------
464 -- Category: Methods to create Text
465 -- for Purpose : see Graphic3d_Group.cdl
466 ----------------------------------------
469 ACGroup : CGroup from Graphic3d;
470 AText : CString from Standard;
471 APoint : Vertex from Graphic3d;
472 AHeight : Real from Standard;
473 AAngle : PlaneAngle from Quantity;
474 ATp : TextPath from Graphic3d;
475 AHta : HorizontalTextAlignment from Graphic3d;
476 AVta : VerticalTextAlignment from Graphic3d;
477 EvalMinMax : Boolean from Standard = Standard_True )
479 ---Purpose: call_togl_text
482 ACGroup : CGroup from Graphic3d;
483 AText : CString from Standard;
484 APoint : Vertex from Graphic3d;
485 AHeight : Real from Standard;
486 EvalMinMax : Boolean from Standard = Standard_True )
488 ---Purpose: call_togl_text
491 ACGroup : CGroup from Graphic3d;
492 AText : ExtendedString from TCollection;
493 APoint : Vertex from Graphic3d;
494 AHeight : Real from Standard;
495 AAngle : PlaneAngle from Quantity;
496 ATp : TextPath from Graphic3d;
497 AHta : HorizontalTextAlignment from Graphic3d;
498 AVta : VerticalTextAlignment from Graphic3d;
499 EvalMinMax : Boolean from Standard = Standard_True )
501 ---Purpose: call_togl_text
504 ACGroup : CGroup from Graphic3d;
505 AText : ExtendedString from TCollection;
506 APoint : Vertex from Graphic3d;
507 AHeight : Real from Standard;
508 EvalMinMax : Boolean from Standard = Standard_True )
510 ---Purpose: call_togl_text
512 ----------------------------------------
513 ---Category: Methods to create Triangle
514 -- for Purpose : see Graphic3d_Group.cdl
515 ----------------------------------------
517 PrimitiveArray( me : mutable;
518 ACGroup : CGroup from Graphic3d;
519 parray : PrimitiveArray from Graphic3d;
520 EvalMinMax : Boolean from Standard = Standard_True )
522 ---Purpose: call_togl_parray
524 UserDraw( me : mutable;
525 ACGroup : CGroup from Graphic3d;
526 AUserDraw : CUserDraw from Graphic3d )
528 ---Purpose: call_togl_userdraw
530 EnableVBO( me : mutable;
531 status : Boolean from Standard )
533 ---Purpose: enables/disables usage of OpenGL vertex buffer arrays while drawing primitiev arrays
536 theFreeBytes : out Size from Standard;
537 theInfo : out AsciiString from TCollection) returns Boolean from Standard is deferred;
538 ---Purpose: Returns information about GPU memory usage.
540 ----------------------------------------
541 ---Category: Methods to create Triedron
542 -- for Purpose : see Graphic3d_Group.cdl
543 ----------------------------------------
545 ZBufferTriedronSetup ( me : mutable;
546 XColor : NameOfColor from Quantity = Quantity_NOC_RED;
547 YColor : NameOfColor from Quantity = Quantity_NOC_GREEN;
548 ZColor : NameOfColor from Quantity = Quantity_NOC_BLUE1;
549 SizeRatio : Real from Standard = 0.8;
550 AxisDiametr : Real from Standard = 0.05;
551 NbFacettes : Integer from Standard = 12)
553 ---Purpose: call_togl_ztriedron_setup
555 TriedronDisplay ( me : mutable;
556 ACView : CView from Graphic3d;
557 APosition : TypeOfTriedronPosition from Aspect = Aspect_TOTP_CENTER;
558 AColor : NameOfColor from Quantity = Quantity_NOC_WHITE ;
559 AScale : Real from Standard = 0.02;
560 AsWireframe : Boolean from Standard = Standard_True )
562 ---Purpose: call_togl_triedron_display
565 TriedronErase ( me : mutable;
566 ACView : CView from Graphic3d)
568 ---Purpose: call_togl_triedron_erase
571 TriedronEcho ( me : mutable;
572 ACView : CView from Graphic3d;
573 AType : TypeOfTriedronEcho from Aspect = Aspect_TOTE_NONE )
575 ---Purpose: call_togl_triedron_echo
577 ---------------------------------
578 ---Category: Graduated trihedron
579 ---------------------------------
581 GraduatedTrihedronDisplay(me : mutable;
582 view : CView from Graphic3d;
583 cubic : CGraduatedTrihedron from Graphic3d)
584 ---Purpose: call_togl_graduatedtrihedron_display
587 GraduatedTrihedronErase(me : mutable;
588 view : CView from Graphic3d)
589 ---Purpose: call_togl_graduatedtrihedron_erase
592 GraduatedTrihedronMinMaxValues(me : mutable;
593 xmin : ShortReal from Standard;
594 ymin : ShortReal from Standard;
595 zmin : ShortReal from Standard;
596 xmax : ShortReal from Standard;
597 ymax : ShortReal from Standard;
598 zmax : ShortReal from Standard)
599 ---Purpose: call_togl_graduatedtrihedron_minmaxvalues
602 ----------------------------------
603 -- Category: Ajout mode methods
604 ----------------------------------
606 BeginAddMode ( me : mutable;
607 ACView : CView from Graphic3d)
608 returns Boolean from Standard
610 ---Purpose: call_togl_begin_ajout_mode
612 EndAddMode ( me : mutable)
614 ---Purpose: call_togl_end_ajout_mode
616 ----------------------------------
617 -- Category: Immediat mode methods
618 ----------------------------------
620 SetImmediateModeDrawToFront (me : mutable;
621 theCView : CView from Graphic3d;
622 theDrawToFrontBuffer : Boolean from Standard)
623 returns Boolean from Standard
625 ---Purpose: @param theDrawToFrontBuffer Advanced option to modify rendering mode:
626 -- 1. TRUE. Drawing immediate mode structures directly to the front buffer over the scene image.
627 -- Fast, so preferred for interactive work (used by default).
628 -- However these extra drawings will be missed in image dump since it is performed from back buffer.
629 -- Notice that since no pre-buffering used the V-Sync will be ignored and rendering could be seen
630 -- in run-time (in case of slow hardware) and/or tearing may appear.
631 -- So this is strongly recommended to draw only simple (fast) structures.
632 -- 2. FALSE. Drawing immediate mode structures to the back buffer.
633 -- The complete scene is redrawn first, so this mode is slower if scene contains complex data and/or V-Sync is turned on.
634 -- But it works in any case and is especially useful for view dump because the dump image is read from the back buffer.
635 -- @return previous mode.
637 BeginImmediatMode ( me : mutable;
638 ACView : CView from Graphic3d;
639 ACUnderLayer : CLayer2d from Aspect;
640 ACOverLayer : CLayer2d from Aspect;
641 DoubleBuffer : Boolean from Standard;
642 RetainMode : Boolean from Standard)
643 returns Boolean from Standard
645 ---Purpose: call_togl_begin_immediat_mode
647 ClearImmediatMode ( me : mutable; ACView : CView from Graphic3d;
648 aFlush : Boolean from Standard = Standard_True)
650 ---Purpose: call_togl_clear_immediat_mode
652 DrawStructure ( me : mutable;
653 ACStructure : CStructure from Graphic3d )
655 ---Purpose: call_togl_draw_structure
657 EndImmediatMode ( me : mutable;
658 Synchronize : Integer from Standard )
660 ---Purpose: call_togl_end_immediat_mode
662 -------------------------------
663 -- Category: Layer mode methods
664 -------------------------------
666 Layer ( me : mutable;
667 ACLayer : in out CLayer2d from Aspect )
669 ---Purpose: call_togl_layer2d
671 RemoveLayer ( me : mutable;
672 ACLayer : CLayer2d from Aspect )
674 ---Purpose: call_togl_removelayer2d
676 BeginLayer ( me : mutable;
677 ACLayer : CLayer2d from Aspect )
679 ---Purpose: call_togl_begin_layer2d
681 BeginPolygon2d ( me : mutable )
683 ---Purpose: call_togl_begin_polygon2d
685 BeginPolyline2d ( me : mutable )
687 ---Purpose: call_togl_begin_polyline2d
689 ClearLayer ( me : mutable;
690 ACLayer : CLayer2d from Aspect )
692 ---Purpose: call_togl_clear_layer2d
695 X : ShortReal from Standard;
696 Y : ShortReal from Standard )
698 ---Purpose: call_togl_draw2d
701 X : ShortReal from Standard;
702 Y : ShortReal from Standard )
704 ---Purpose: call_togl_edge2d
706 EndLayer ( me : mutable )
708 ---Purpose: call_togl_end_layer2d
710 EndPolygon2d ( me : mutable )
712 ---Purpose: call_togl_end_polygon2d
714 EndPolyline2d ( me : mutable )
716 ---Purpose: call_togl_end_polyline2d
719 X : ShortReal from Standard;
720 Y : ShortReal from Standard )
722 ---Purpose: call_togl_move2d
724 Rectangle ( me : mutable;
725 X, Y : ShortReal from Standard;
726 Width, Height : ShortReal from Standard )
728 ---Purpose: call_togl_rectangle2d
730 SetColor ( me : mutable;
731 R : ShortReal from Standard;
732 G : ShortReal from Standard;
733 B : ShortReal from Standard )
735 ---Purpose: call_togl_set_color
737 SetTransparency ( me : mutable;
738 ATransparency : ShortReal from Standard )
740 ---Purpose: call_togl_set_transparency
742 UnsetTransparency ( me : mutable )
744 ---Purpose: call_togl_unset_transparency
746 SetLineAttributes ( me : mutable;
747 Type : Integer from Standard;
748 Width : ShortReal from Standard )
750 ---Purpose: call_togl_set_line_attributes
753 SetTextAttributes ( me : mutable;
754 Font : CString from Standard;
755 Type : Integer from Standard;
756 R : ShortReal from Standard;
757 G : ShortReal from Standard;
758 B : ShortReal from Standard )
760 ---Purpose: Set text attributes for under-/overlayer.
761 -- <Font> argument defines the name of the font to be used,
762 -- <Type> argument defines the display type of the text,
763 -- <R> <G> <B> values define the color of decal or subtitle background.
764 -- To set the color of the text you can use the SetColor method.
767 AText : CString from Standard;
768 X, Y : ShortReal from Standard;
769 AHeight : ShortReal from Standard )
771 ---Purpose: call_togl_text2d
772 -- If AHeight < 0 default text height is used by driver (DefaultTextHeight method)
774 DefaultTextHeight( me )
775 returns ShortReal from Standard
780 AText : CString from Standard;
781 AHeight : ShortReal from Standard;
782 AWidth : in out ShortReal from Standard;
783 AnAscent : in out ShortReal from Standard;
784 ADescent : in out ShortReal from Standard )
786 ---Purpose: call_togl_textsize2d
788 SetBackFacingModel ( me : mutable;
789 aView : CView from Graphic3d )
791 ---Purpose: call_togl_backfacing
793 SetDepthTestEnabled( me; view : CView from Graphic3d;
794 isEnabled : Boolean from Standard )
796 ---Purpose: call_togl_depthtest
798 IsDepthTestEnabled( me; view : CView from Graphic3d )
799 returns Boolean from Standard is deferred;
800 ---Purpose: call_togl_isdepthtest
803 view : CView from Graphic3d;
805 width, height : Integer;
808 ---Purpose: Reads depths of shown pixels of the given
809 -- rectangle (glReadPixels with GL_DEPTH_COMPONENT)
811 FBOCreate( me : mutable;
812 view : CView from Graphic3d;
813 width, height : Integer from Standard )
814 returns PtrFrameBuffer from Graphic3d
816 ---Purpose: Generate offscreen FBO in the graphic library.
817 -- If not supported on hardware returns NULL.
819 FBORelease( me : mutable;
820 view : CView from Graphic3d;
821 fboPtr : in out PtrFrameBuffer from Graphic3d )
823 ---Purpose: Remove offscreen FBO from the graphic library
825 FBOGetDimensions( me : mutable;
826 view : CView from Graphic3d;
827 fboPtr : PtrFrameBuffer from Graphic3d;
828 width, height : out Integer from Standard;
829 widthMax, heightMax : out Integer from Standard )
831 ---Purpose: Read offscreen FBO configuration.
833 FBOChangeViewport( me : mutable;
834 view : CView from Graphic3d;
835 fboPtr : in out PtrFrameBuffer from Graphic3d;
836 width, height : Integer from Standard )
838 ---Purpose: Change offscreen FBO viewport.
840 BufferDump( me : mutable;
841 theCView : CView from Graphic3d;
842 theImage : in out PixMap from Image;
843 theBufferType : BufferType from Graphic3d )
844 returns Boolean from Standard
846 ---Purpose: Dump active rendering buffer into specified memory buffer.
848 SetGLLightEnabled( me; view : CView from Graphic3d;
849 isEnabled : Boolean from Standard )
851 ---Purpose: call_togl_gllight
853 IsGLLightEnabled( me; view : CView from Graphic3d )
854 returns Boolean from Standard is deferred;
855 ---Purpose: call_togl_isgllight
858 ACView : CView from Graphic3d;
859 ACUnderLayer : CLayer2d from Aspect;
860 ACOverLayer : CLayer2d from Aspect;
861 hPrnDC : Handle from Aspect;
862 showBackground : Boolean;
864 printAlgorithm : PrintAlgo from Aspect = Aspect_PA_STRETCH;
865 theScaleFactor : Real from Standard = 1.0 )
866 returns Boolean from Standard is deferred;
868 ---Purpose: print the contents of all layers of the view to the printer.
869 -- <hPrnDC> : Pass the PrinterDeviceContext (HDC),
870 -- <showBackground> : When set to FALSE then print the view without background color
871 -- (background is white)
872 -- else set to TRUE for printing with current background color.
873 -- <filename>: If != NULL, then the view will be printed to a file.
874 -- <printAlgorithm>: Select print algorithm: stretch, tile.
875 -- <theScaleFactor>: Scaling coefficient, used internally to scale the
876 -- printings accordingly to the scale factor selected in the printer
877 -- properties dialog.
878 -- Returns Standard_True if the data is passed to the printer, otherwise
879 -- Standard_False if the print operation failed due to the printer errors,
880 -- or insufficient system memory available.
881 ---Warning: Works only under Windows.
884 theFileName : CString from Standard;
885 theFormat : ExportFormat from Graphic3d;
886 theSortType : SortType from Graphic3d;
887 theWidth, theHeight : Integer from Standard;
888 theView : CView from Graphic3d;
889 theLayerUnder : CLayer2d from Aspect;
890 theLayerOver : CLayer2d from Aspect;
891 thePrecision : Real from Standard = 0.005;
892 theProgressBarFunc : Address from Standard = NULL;
893 theProgressObject : Address from Standard = NULL )
894 returns Boolean from Standard
897 -- Export scene into the one of the Vector graphics formats (SVG, PS, PDF...).
898 -- In contrast to Bitmaps, Vector graphics is scalable (so you may got quality benefits on printing to laser printer).
899 -- Notice however that results may differ a lot and do not contain some elements.
901 AddZLayer( me : mutable;
902 theCView : CView from Graphic3d;
903 theLayerId : Integer from Standard )
905 ---Purpose: Add a new top-level z layer with ID <theLayerId> for
906 -- the view. Z layers allow drawing structures in higher layers
907 -- in foreground of structures in lower layers. To add a structure
908 -- to desired layer on display it is necessary to set the layer
909 -- ID for the structure.
911 RemoveZLayer( me : mutable;
912 theCView : CView from Graphic3d;
913 theLayerId : Integer from Standard )
915 ---Purpose: Remove Z layer from the specified view. All structures
916 -- displayed at the moment in layer will be displayed in default layer
917 -- ( the bottom-level z layer ). To unset layer ID from associated
918 -- structures use method UnsetZLayer (...).
920 UnsetZLayer( me : mutable;
921 theLayerId : Integer from Standard )
923 ---Purpose: Unset Z layer ID for all structures. The structure
924 -- indexes will be set to default layer ( the bottom-level z layer
927 ChangeZLayer( me : mutable;
928 theCStructure : CStructure from Graphic3d;
929 theLayerId : Integer from Standard )
931 ---Purpose: Change Z layer of a structure. The new z layer ID will
932 -- be used to define the associated layer for structure on display.
934 ChangeZLayer( me : mutable;
935 theCStructure : CStructure from Graphic3d;
936 theCView : CView from Graphic3d;
937 theNewLayerId : Integer from Standard )
939 ---Purpose: Change Z layer of a structure already presented in view.
942 theCStructure : CStructure from Graphic3d )
943 returns Integer from Standard is deferred;
944 ---Purpose: Get Z layer ID of structure. If the structure doesn't
945 -- exists in graphic driver, the method returns -1.
947 --------------------------
948 -- Category: Class methods
949 --------------------------
952 ACLight : CLight from Graphic3d;
953 Update : Boolean from Standard )
954 returns Integer from Standard;
955 ---Purpose: call_togl_light
957 -----------------------------
958 -- Category: Internal methods
959 -----------------------------
962 AComment : CString from Standard;
963 AValue : Boolean from Standard );
966 ACGroup : CGroup from Graphic3d;
967 AField : Integer from Standard );
970 ACLight : CLight from Graphic3d;
971 AField : Integer from Standard );
974 ACPick : CPick from Graphic3d;
975 AField : Integer from Standard );
977 PrintCStructure ( me;
978 ACStructure : CStructure from Graphic3d;
979 AField : Integer from Standard );
982 ACView : CView from Graphic3d;
983 AField : Integer from Standard );
986 AFunc : CString from Standard );
989 AComment : CString from Standard;
990 AValue : Integer from Standard );
993 AFunc : CString from Standard;
994 AResult : Integer from Standard );
997 AComment : CString from Standard;
998 AValue : ShortReal from Standard );
1001 AComment : CString from Standard;
1002 AMatrix : Array2OfReal from TColStd )
1003 raises TransformError from Graphic3d;
1006 AComment : CString from Standard;
1007 AString : CString from Standard );
1009 SetTrace ( me : mutable;
1010 ALevel : Integer from Standard )
1014 returns Integer from Standard
1017 --ListOfAvalableFontNames( me;
1018 -- lst: out NListOfHAsciiString from Graphic3d )
1019 -- returns Boolean from Standard
1021 -- Purpose: Initialize list of names of avalable system fonts
1022 -- returns Standard_False if fails
1023 -- ABD Integration support of system fonts (using FTGL and FreeType)
1025 GetDisplayConnection (me)
1026 returns DisplayConnection_Handle from Aspect;
1027 ---C++: return const &
1029 ---Purpose: returns Handle to display connection
1033 MyTraceLevel : Integer from Standard is protected;
1034 MySharedLibrary : SharedLibrary from OSD is protected;
1035 myDisplayConnection: DisplayConnection_Handle from Aspect is protected;
1037 end GraphicDriver from Graphic3d;