Open CASCADE Technology  6.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions
OpenGl_GraphicDriver Class Reference

This class defines an OpenGl graphic driver
More...

#include <OpenGl_GraphicDriver.hxx>

Inheritance diagram for OpenGl_GraphicDriver:
Inheritance graph
[legend]

Public Types

typedef OpenGl_Element *(* OpenGl_UserDrawCallback_t )(const CALL_DEF_USERDRAW *)
 UserDraw function prototype. More...
 

Public Member Functions

 OpenGl_GraphicDriver (const Handle< Aspect_DisplayConnection > &theDisplayConnection)
 Constructor. More...
 
 OpenGl_GraphicDriver (const Standard_CString theShrName="TKOpenGl")
 Constructor. More...
 
Standard_Boolean Begin (const Handle< Aspect_DisplayConnection > &theDisplayConnection)
 Starts graphic driver with given connection
More...
 
void End ()
 call_togl_end
More...
 
Standard_Integer InquireLightLimit ()
 call_togl_inquirelight
More...
 
void InquireMat (const Graphic3d_CView &ACView, TColStd_Array2OfReal &AMatO, TColStd_Array2OfReal &AMatM)
 call_togl_inquiremat
More...
 
Standard_Integer InquireViewLimit ()
 call_togl_inquireview
More...
 
void Blink (const Graphic3d_CStructure &ACStructure, const Standard_Boolean Create)
 call_togl_blink
More...
 
void BoundaryBox (const Graphic3d_CStructure &ACStructure, const Standard_Boolean Create)
 call_togl_boundarybox
More...
 
void HighlightColor (const Graphic3d_CStructure &ACStructure, const Standard_ShortReal R, const Standard_ShortReal G, const Standard_ShortReal B, const Standard_Boolean Create)
 call_togl_highlightcolor
More...
 
void NameSetStructure (const Graphic3d_CStructure &ACStructure)
 call_togl_namesetstructure
More...
 
void ClearGroup (const Graphic3d_CGroup &ACGroup)
 call_togl_cleargroup
More...
 
void FaceContextGroup (const Graphic3d_CGroup &theCGroup, const Standard_Integer theNoInsert)
 call_togl_facecontextgroup
More...
 
void Group (Graphic3d_CGroup &theCGroup)
 call_togl_group
More...
 
void LineContextGroup (const Graphic3d_CGroup &theCGroup, const Standard_Integer theNoInsert)
 call_togl_linecontextgroup
More...
 
void MarkerContextGroup (const Graphic3d_CGroup &theCGroup, const Standard_Integer theNoInsert)
 call_togl_markercontextgroup
More...
 
void RemoveGroup (const Graphic3d_CGroup &theCGroup)
 call_togl_removegroup
More...
 
void TextContextGroup (const Graphic3d_CGroup &theCGroup, const Standard_Integer theNoInsert)
 call_togl_textcontextgroup
More...
 
void ClearStructure (const Graphic3d_CStructure &theCStructure)
 call_togl_clearstructure
More...
 
void ContextStructure (const Graphic3d_CStructure &theCStructure)
 call_togl_contextstructure
More...
 
void Connect (const Graphic3d_CStructure &theFather, const Graphic3d_CStructure &theSon)
 call_togl_connect
More...
 
void Disconnect (const Graphic3d_CStructure &theFather, const Graphic3d_CStructure &theSon)
 call_togl_disconnect
More...
 
void DisplayStructure (const Graphic3d_CView &theCView, const Graphic3d_CStructure &theCStructure, const Standard_Integer thePriority)
 call_togl_displaystructure
More...
 
void EraseStructure (const Graphic3d_CView &theCView, const Graphic3d_CStructure &theCStructure)
 call_togl_erasestructure
More...
 
void RemoveStructure (const Graphic3d_CStructure &theCStructure)
 call_togl_removestructure
More...
 
void Structure (Graphic3d_CStructure &theCStructure)
 call_togl_structure
More...
 
void ActivateView (const Graphic3d_CView &ACView)
 call_togl_activateview
More...
 
void AntiAliasing (const Graphic3d_CView &ACView, const Standard_Boolean AFlag)
 call_togl_antialiasing
More...
 
void Background (const Graphic3d_CView &ACView)
 call_togl_background
More...
 
void GradientBackground (const Graphic3d_CView &ACView, const Quantity_Color &AColor1, const Quantity_Color &AColor2, const Aspect_GradientFillMethod FillStyle)
 call_togl_gradient_background
More...
 
void BackgroundImage (const Standard_CString FileName, const Graphic3d_CView &ACView, const Aspect_FillMethod FillStyle)
 
void SetBgImageStyle (const Graphic3d_CView &ACView, const Aspect_FillMethod FillStyle)
 
void SetBgGradientStyle (const Graphic3d_CView &ACView, const Aspect_GradientFillMethod FillStyle)
 
void ClipLimit (const Graphic3d_CView &ACView, const Standard_Boolean AWait)
 call_togl_cliplimit
More...
 
void DeactivateView (const Graphic3d_CView &ACView)
 call_togl_deactivateview
More...
 
void DepthCueing (const Graphic3d_CView &ACView, const Standard_Boolean AFlag)
 call_togl_cliplimit
More...
 
Standard_Boolean ProjectRaster (const Graphic3d_CView &ACView, const Standard_ShortReal AX, const Standard_ShortReal AY, const Standard_ShortReal AZ, Standard_Integer &AU, Standard_Integer &AV)
 call_togl_unproject_raster
More...
 
Standard_Boolean UnProjectRaster (const Graphic3d_CView &ACView, const Standard_Integer Axm, const Standard_Integer Aym, const Standard_Integer AXM, const Standard_Integer AYM, const Standard_Integer AU, const Standard_Integer AV, Standard_ShortReal &AX, Standard_ShortReal &AY, Standard_ShortReal &AZ)
 call_togl_unproject_raster
More...
 
Standard_Boolean UnProjectRasterWithRay (const Graphic3d_CView &ACView, const Standard_Integer Axm, const Standard_Integer Aym, const Standard_Integer AXM, const Standard_Integer AYM, const Standard_Integer AU, const Standard_Integer AV, Standard_ShortReal &AX, Standard_ShortReal &AY, Standard_ShortReal &AZ, Standard_ShortReal &DX, Standard_ShortReal &DY, Standard_ShortReal &DZ)
 call_togl_unproject_raster_with_ray
More...
 
void RatioWindow (const Graphic3d_CView &ACView)
 call_togl_ratio_window
More...
 
void Redraw (const Graphic3d_CView &ACView, const Aspect_CLayer2d &ACUnderLayer, const Aspect_CLayer2d &ACOverLayer, const Standard_Integer x=0, const Standard_Integer y=0, const Standard_Integer width=0, const Standard_Integer height=0)
 
call_togl_redraw <br>

Warning: when the redraw area has a null size, the full view is redrawn
More...

 
void RemoveView (const Graphic3d_CView &ACView)
 call_togl_removeview
More...
 
void SetLight (const Graphic3d_CView &ACView)
 call_togl_setlight
More...
 
void SetClipPlanes (const Graphic3d_CView &theCView)
 Pass clip planes to the associated graphic driver view.
More...
 
void SetClipPlanes (const Graphic3d_CStructure &theCStructure)
 Pass clip planes to the associated graphic driver structure.
More...
 
void SetVisualisation (const Graphic3d_CView &ACView)
 call_togl_setvisualisation
More...
 
void TransformStructure (const Graphic3d_CStructure &ACStructure)
 call_togl_transformstructure
More...
 
void Transparency (const Graphic3d_CView &ACView, const Standard_Boolean AFlag)
 call_togl_transparency
More...
 
void Update (const Graphic3d_CView &ACView, const Aspect_CLayer2d &ACUnderLayer, const Aspect_CLayer2d &ACOverLayer)
 call_togl_update
More...
 
Standard_Boolean View (Graphic3d_CView &ACView)
 call_togl_view
More...
 
void ViewMapping (const Graphic3d_CView &ACView, const Standard_Boolean AWait)
 call_togl_viewmapping
More...
 
void ViewOrientation (const Graphic3d_CView &ACView, const Standard_Boolean AWait)
 call_togl_vieworientation
More...
 
void Environment (const Graphic3d_CView &ACView)
 
void SetStencilTestOptions (const Graphic3d_CGroup &theCGroup, const Standard_Boolean theIsEnabled)
 sets the stencil test to theIsEnabled state;
More...
 
void Text (const Graphic3d_CGroup &ACGroup, const Standard_CString AText, const Graphic3d_Vertex &APoint, const Standard_Real AHeight, const Quantity_PlaneAngle AAngle, const Graphic3d_TextPath ATp, const Graphic3d_HorizontalTextAlignment AHta, const Graphic3d_VerticalTextAlignment AVta, const Standard_Boolean EvalMinMax=Standard_True)
 call_togl_text
More...
 
void Text (const Graphic3d_CGroup &ACGroup, const Standard_CString AText, const Graphic3d_Vertex &APoint, const Standard_Real AHeight, const Standard_Boolean EvalMinMax=Standard_True)
 call_togl_text
More...
 
void Text (const Graphic3d_CGroup &ACGroup, const TCollection_ExtendedString &AText, const Graphic3d_Vertex &APoint, const Standard_Real AHeight, const Quantity_PlaneAngle AAngle, const Graphic3d_TextPath ATp, const Graphic3d_HorizontalTextAlignment AHta, const Graphic3d_VerticalTextAlignment AVta, const Standard_Boolean EvalMinMax=Standard_True)
 call_togl_text
More...
 
void Text (const Graphic3d_CGroup &ACGroup, const TCollection_ExtendedString &AText, const Graphic3d_Vertex &APoint, const Standard_Real AHeight, const Standard_Boolean EvalMinMax=Standard_True)
 call_togl_text
More...
 
void PrimitiveArray (const Graphic3d_CGroup &ACGroup, const Graphic3d_PrimitiveArray &parray, const Standard_Boolean EvalMinMax=Standard_True)
 call_togl_parray
More...
 
void UserDraw (const Graphic3d_CGroup &ACGroup, const Graphic3d_CUserDraw &AUserDraw)
 call_togl_userdraw
More...
 
void ZBufferTriedronSetup (const Quantity_NameOfColor XColor=Quantity_NOC_RED, const Quantity_NameOfColor YColor=Quantity_NOC_GREEN, const Quantity_NameOfColor ZColor=Quantity_NOC_BLUE1, const Standard_Real SizeRatio=0.8, const Standard_Real AxisDiametr=0.05, const Standard_Integer NbFacettes=12)
 call_togl_ztriedron_setup
More...
 
void TriedronDisplay (const Graphic3d_CView &ACView, const Aspect_TypeOfTriedronPosition APosition=Aspect_TOTP_CENTER, const Quantity_NameOfColor AColor=Quantity_NOC_WHITE, const Standard_Real AScale=0.02, const Standard_Boolean AsWireframe=Standard_True)
 call_togl_triedron_display
More...
 
void TriedronErase (const Graphic3d_CView &ACView)
 call_togl_triedron_erase
More...
 
void TriedronEcho (const Graphic3d_CView &ACView, const Aspect_TypeOfTriedronEcho AType=Aspect_TOTE_NONE)
 call_togl_triedron_echo
More...
 
void GraduatedTrihedronDisplay (const Graphic3d_CView &view, const Graphic3d_CGraduatedTrihedron &cubic)
 call_togl_graduatedtrihedron_display
More...
 
void GraduatedTrihedronErase (const Graphic3d_CView &view)
 call_togl_graduatedtrihedron_erase
More...
 
void GraduatedTrihedronMinMaxValues (const Standard_ShortReal xmin, const Standard_ShortReal ymin, const Standard_ShortReal zmin, const Standard_ShortReal xmax, const Standard_ShortReal ymax, const Standard_ShortReal zmax)
 call_togl_graduatedtrihedron_minmaxvalues
More...
 
Standard_Boolean SetImmediateModeDrawToFront (const Graphic3d_CView &theCView, const Standard_Boolean theDrawToFrontBuffer)
 
Standard_Boolean BeginAddMode (const Graphic3d_CView &ACView)
 call_togl_begin_ajout_mode
More...
 
void EndAddMode ()
 call_togl_end_ajout_mode
More...
 
Standard_Boolean BeginImmediatMode (const Graphic3d_CView &ACView, const Aspect_CLayer2d &ACUnderLayer, const Aspect_CLayer2d &ACOverLayer, const Standard_Boolean DoubleBuffer, const Standard_Boolean RetainMode)
 call_togl_begin_immediat_mode
More...
 
void ClearImmediatMode (const Graphic3d_CView &ACView, const Standard_Boolean aFlush=Standard_True)
 call_togl_clear_immediat_mode
More...
 
void DrawStructure (const Graphic3d_CStructure &ACStructure)
 call_togl_draw_structure
More...
 
void EndImmediatMode (const Standard_Integer Synchronize)
 call_togl_end_immediat_mode
More...
 
void Layer (Aspect_CLayer2d &ACLayer)
 call_togl_layer2d
More...
 
void RemoveLayer (const Aspect_CLayer2d &ACLayer)
 call_togl_removelayer2d
More...
 
void BeginLayer (const Aspect_CLayer2d &ACLayer)
 call_togl_begin_layer2d
More...
 
void BeginPolygon2d ()
 call_togl_begin_polygon2d
More...
 
void BeginPolyline2d ()
 call_togl_begin_polyline2d
More...
 
void ClearLayer (const Aspect_CLayer2d &ACLayer)
 call_togl_clear_layer2d
More...
 
void Draw (const Standard_ShortReal X, const Standard_ShortReal Y)
 call_togl_draw2d
More...
 
void Edge (const Standard_ShortReal X, const Standard_ShortReal Y)
 call_togl_edge2d
More...
 
void EndLayer ()
 call_togl_end_layer2d
More...
 
void EndPolygon2d ()
 call_togl_end_polygon2d
More...
 
void EndPolyline2d ()
 call_togl_end_polyline2d
More...
 
void Move (const Standard_ShortReal X, const Standard_ShortReal Y)
 call_togl_move2d
More...
 
void Rectangle (const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal Width, const Standard_ShortReal Height)
 call_togl_rectangle2d
More...
 
void SetColor (const Standard_ShortReal R, const Standard_ShortReal G, const Standard_ShortReal B)
 call_togl_set_color
More...
 
void SetTransparency (const Standard_ShortReal ATransparency)
 call_togl_set_transparency
More...
 
void UnsetTransparency ()
 call_togl_unset_transparency
More...
 
void SetLineAttributes (const Standard_Integer Type, const Standard_ShortReal Width)
 call_togl_set_line_attributes
More...
 
void SetFlippingOptions (const Graphic3d_CGroup &theCGroup, const Standard_Boolean theIsEnabled, const gp_Ax2 &theRefPlane)
 sets the flipping to theIsEnabled state for the given graphic group.
More...
 
void SetTextAttributes (const Standard_CString FontName, const Standard_Integer Type, const Standard_ShortReal R, const Standard_ShortReal G, const Standard_ShortReal B)
 Set text attributes for under-/overlayer.
<Font> argument defines the name of the font to be used,
<Type> argument defines the display type of the text,
<R> <G> values define the color of decal or subtitle background.
To set the color of the text you can use the SetColor method.
More...
 
void Text (const Standard_CString AText, const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal AHeight)
 
 call_togl_text2d <br>

If AHeight < 0 default text height is used by driver (DefaultTextHeight method)
More...

 
void TextSize (const Standard_CString AText, const Standard_ShortReal AHeight, Standard_ShortReal &AWidth, Standard_ShortReal &AnAscent, Standard_ShortReal &ADescent) const
 call_togl_textsize2d
More...
 
void SetBackFacingModel (const Graphic3d_CView &aView)
 call_togl_backfacing
More...
 
Standard_Boolean Print (const Graphic3d_CView &ACView, const Aspect_CLayer2d &ACUnderLayer, const Aspect_CLayer2d &ACOverLayer, const Aspect_Handle hPrnDC, const Standard_Boolean showBackground, const Standard_CString filename, const Aspect_PrintAlgo printAlgorithm=Aspect_PA_STRETCH, const Standard_Real theScaleFactor=1.0) const
 print the contents of all layers of the view to the printer.
<hPrnDC> : Pass the PrinterDeviceContext (HDC),
<showBackground> : When set to FALSE then print the view without background color
(background is white)
else set to TRUE for printing with current background color.
<filename>: If != NULL, then the view will be printed to a file.
<printAlgorithm>: Select print algorithm: stretch, tile.
<theScaleFactor>: Scaling coefficient, used internally to scale the
printings accordingly to the scale factor selected in the printer
properties dialog.
Returns Standard_True if the data is passed to the printer, otherwise
Standard_False if the print operation failed due to the printer errors,
or lack of system memory. This might be related to insufficient memory
or some internal errors. All this errors are indicated by the message
boxes (on level of OpenGl_GraphicDriver).
Warning: This function can reuse FBO assigned to the view
Please take it into account if you use it for your purposes;
More...
 
void SetDepthTestEnabled (const Graphic3d_CView &view, const Standard_Boolean isEnabled) const
 call_togl_depthtest
More...
 
Standard_Boolean IsDepthTestEnabled (const Graphic3d_CView &view) const
 call_togl_isdepthtest
More...
 
void ReadDepths (const Graphic3d_CView &view, const Standard_Integer x, const Standard_Integer y, const Standard_Integer width, const Standard_Integer height, const Standard_Address buffer) const
 Reads depths of shown pixels of the given rectangle (glReadPixels with GL_DEPTH_COMPONENT)
More...
 
Graphic3d_PtrFrameBuffer FBOCreate (const Graphic3d_CView &view, const Standard_Integer width, const Standard_Integer height)
 Generate offscreen FBO (needs OpenGL2+ hardware)
If not supported on hardware returns NULL.
More...
 
void FBORelease (const Graphic3d_CView &view, Graphic3d_PtrFrameBuffer &fboPtr)
 Remove offscreen FBO
More...
 
Standard_Boolean BufferDump (const Graphic3d_CView &theCView, Image_PixMap &theImage, const Graphic3d_BufferType &theBufferType)
 Dump active rendering buffer into specified memory buffer.
More...
 
void SetGLLightEnabled (const Graphic3d_CView &view, const Standard_Boolean isEnabled) const
 call_togl_gllight
More...
 
Standard_Boolean IsGLLightEnabled (const Graphic3d_CView &view) const
 call_togl_isgllight
More...
 
Standard_Integer InquirePlaneLimit ()
 Clear visualization data in graphical driver and stop
displaying the primitives array of the graphical group <theCGroup>.
This method is internal and should be used by Graphic3d_Group only.
More...
 
Standard_ShortReal DefaultTextHeight () const
 
void FBOGetDimensions (const Graphic3d_CView &view, const Graphic3d_PtrFrameBuffer fboPtr, Standard_Integer &width, Standard_Integer &height, Standard_Integer &widthMax, Standard_Integer &heightMax)
 Read offscreen FBO configuration.
More...
 
void FBOChangeViewport (const Graphic3d_CView &view, Graphic3d_PtrFrameBuffer &fboPtr, const Standard_Integer width, const Standard_Integer height)
 Change offscreen FBO viewport.
More...
 
Standard_Boolean Export (const Standard_CString theFileName, const Graphic3d_ExportFormat theFormat, const Graphic3d_SortType theSortType, const Standard_Integer theWidth, const Standard_Integer theHeight, const Graphic3d_CView &theView, const Aspect_CLayer2d &theLayerUnder, const Aspect_CLayer2d &theLayerOver, const Standard_Real thePrecision=0.005, const Standard_Address theProgressBarFunc=NULL, const Standard_Address theProgressObject=NULL)
 Export scene into the one of the Vector graphics formats (SVG, PS, PDF...).
In contrast to Bitmaps, Vector graphics is scalable (so you may got quality benefits on printing to laser printer).
Notice however that results may differ a lot and do not contain some elements.
More...
 
void AddZLayer (const Graphic3d_CView &theCView, const Standard_Integer theLayerId)
 Add a new top-level z layer with ID <theLayerId> for
the view. Z layers allow drawing structures in higher layers
in foreground of structures in lower layers. To add a structure
to desired layer on display it is necessary to set the layer
index for the structure.
More...
 
void RemoveZLayer (const Graphic3d_CView &theCView, const Standard_Integer theLayerId)
 Remove Z layer from the specified view. All structures
displayed at the moment in layer will be displayed in default layer
( the bottom-level z layer ). To unset layer index from associated
structures use method UnsetZLayer (...).
More...
 
void UnsetZLayer (const Standard_Integer theLayerId)
 Unset Z layer ID for all structures. The structure
indexes will be set to default layer ( the bottom-level z layer with
ID = 0 ).
More...
 
void ChangeZLayer (const Graphic3d_CStructure &theCStructure, const Standard_Integer theLayerId)
 Change Z layer of a structure. The new z layer ID will
be used to define the associated layer for structure on display.
It is recommended to take care of redisplaying the structures already
presented in view with previously set layer index. This is usually
done by viewer manager. Z layers allow drawing structures in
higher layers in foreground of structures in lower layers.
More...
 
void ChangeZLayer (const Graphic3d_CStructure &theCStructure, const Graphic3d_CView &theCView, const Standard_Integer theNewLayerId)
 Change Z layer of a structure already presented in view.
It is recommended to update z layer of already
displayed structures with this method before setting new z layer
index to the structure. This is usually done by viewer manager.
More...
 
Standard_Integer GetZLayer (const Graphic3d_CStructure &theCStructure) const
 Get Z layer ID of the structure. If the structure doesn't exists in
graphic driver, the method returns -1.
More...
 
void SetZLayerSettings (const Graphic3d_CView &theCView, const Standard_Integer theLayerId, const Graphic3d_ZLayerSettings theSettings)
 Sets the settings for a single Z layer of specified view. More...
 
const OpenGl_CapsOptions () const
 
OpenGl_CapsChangeOptions ()
 
void EnableVBO (const Standard_Boolean theToTurnOn)
 VBO usage can be forbidden by this method even if it is supported by GL driver. Notice that disabling of VBO will cause rendering performance degradation. Warning! This method should be called only before any primitives are displayed in GL scene! More...
 
Standard_Boolean MemoryInfo (Standard_Size &theFreeBytes, TCollection_AsciiString &theInfo) const
 Returns information about GPU memory usage. Please read OpenGl_Context::MemoryInfo() for more description. More...
 
OpenGl_UserDrawCallback_tUserDrawCallback ()
 Method to setup UserDraw callback. More...
 
Standard_Boolean GetOpenClDeviceInfo (const Graphic3d_CView &theCView, NCollection_DataMap< TCollection_AsciiString, TCollection_AsciiString > &theInfo)
 Returns information about OpenCL device used for computations. More...
 
OpenGl_StateCounterGetStateCounter () const
 
- Public Member Functions inherited from Graphic3d_GraphicDriver
void PrintBoolean (const Standard_CString AComment, const Standard_Boolean AValue) const
 
void PrintCGroup (const Graphic3d_CGroup &ACGroup, const Standard_Integer AField) const
 
void PrintCLight (const Graphic3d_CLight &ACLight, const Standard_Integer AField) const
 
void PrintCPick (const Graphic3d_CPick &ACPick, const Standard_Integer AField) const
 
void PrintCStructure (const Graphic3d_CStructure &ACStructure, const Standard_Integer AField) const
 
void PrintCView (const Graphic3d_CView &ACView, const Standard_Integer AField) const
 
void PrintFunction (const Standard_CString AFunc) const
 
void PrintInteger (const Standard_CString AComment, const Standard_Integer AValue) const
 
void PrintIResult (const Standard_CString AFunc, const Standard_Integer AResult) const
 
void PrintShortReal (const Standard_CString AComment, const Standard_ShortReal AValue) const
 
void PrintMatrix (const Standard_CString AComment, const TColStd_Array2OfReal &AMatrix) const
 
void PrintString (const Standard_CString AComment, const Standard_CString AString) const
 
void SetTrace (const Standard_Integer ALevel)
 
Standard_Integer Trace () const
 
const
Aspect_DisplayConnection_Handle
GetDisplayConnection () const
 returns Handle to display connection
More...
 
Standard_Boolean IsDeviceLost () const
 
void ResetDeviceLostFlag ()
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void ShallowDump (Standard_OStream &) const
 
virtual const
Handle_Standard_Type & 
DynamicType () const
 Returns a type information object about this object. More...
 
Standard_Boolean IsInstance (const Handle_Standard_Type &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const Handle_Standard_Type &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
virtual Handle_Standard_Transient This () const
 Returns a Handle which references this object. Must never be called to objects created in stack. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Graphic3d_GraphicDriver
 Graphic3d_GraphicDriver (const Standard_CString AShrName)
 Initialises the Driver
More...
 
- Protected Attributes inherited from Graphic3d_GraphicDriver
Standard_Integer MyTraceLevel
 
OSD_SharedLibrary MySharedLibrary
 
Aspect_DisplayConnection_Handle myDisplayConnection
 
Standard_Boolean myDeviceLostFlag
 

Detailed Description

This class defines an OpenGl graphic driver

Member Typedef Documentation

typedef OpenGl_Element*(* OpenGl_GraphicDriver::OpenGl_UserDrawCallback_t)(const CALL_DEF_USERDRAW *)

UserDraw function prototype.

Constructor & Destructor Documentation

OpenGl_GraphicDriver::OpenGl_GraphicDriver ( const Handle< Aspect_DisplayConnection > &  theDisplayConnection)

Constructor.

OpenGl_GraphicDriver::OpenGl_GraphicDriver ( const Standard_CString  theShrName = "TKOpenGl")

Constructor.

Member Function Documentation

void OpenGl_GraphicDriver::ActivateView ( const Graphic3d_CView ACView)
virtual

call_togl_activateview

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::AddZLayer ( const Graphic3d_CView theCView,
const Standard_Integer  theLayerId 
)
virtual

Add a new top-level z layer with ID <theLayerId> for
the view. Z layers allow drawing structures in higher layers
in foreground of structures in lower layers. To add a structure
to desired layer on display it is necessary to set the layer
index for the structure.

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::AntiAliasing ( const Graphic3d_CView ACView,
const Standard_Boolean  AFlag 
)
virtual

call_togl_antialiasing

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Background ( const Graphic3d_CView ACView)
virtual

call_togl_background

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::BackgroundImage ( const Standard_CString  FileName,
const Graphic3d_CView ACView,
const Aspect_FillMethod  FillStyle 
)
virtual
Standard_Boolean OpenGl_GraphicDriver::Begin ( const Handle< Aspect_DisplayConnection > &  theDisplayConnection)
virtual

Starts graphic driver with given connection

Implements Graphic3d_GraphicDriver.

Standard_Boolean OpenGl_GraphicDriver::BeginAddMode ( const Graphic3d_CView ACView)
virtual

call_togl_begin_ajout_mode

Implements Graphic3d_GraphicDriver.

Standard_Boolean OpenGl_GraphicDriver::BeginImmediatMode ( const Graphic3d_CView ACView,
const Aspect_CLayer2d ACUnderLayer,
const Aspect_CLayer2d ACOverLayer,
const Standard_Boolean  DoubleBuffer,
const Standard_Boolean  RetainMode 
)
virtual

call_togl_begin_immediat_mode

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::BeginLayer ( const Aspect_CLayer2d ACLayer)
virtual

call_togl_begin_layer2d

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::BeginPolygon2d ( )
virtual

call_togl_begin_polygon2d

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::BeginPolyline2d ( )
virtual

call_togl_begin_polyline2d

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Blink ( const Graphic3d_CStructure ACStructure,
const Standard_Boolean  Create 
)
virtual

call_togl_blink

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::BoundaryBox ( const Graphic3d_CStructure ACStructure,
const Standard_Boolean  Create 
)
virtual

call_togl_boundarybox

Implements Graphic3d_GraphicDriver.

Standard_Boolean OpenGl_GraphicDriver::BufferDump ( const Graphic3d_CView theCView,
Image_PixMap theImage,
const Graphic3d_BufferType theBufferType 
)
virtual

Dump active rendering buffer into specified memory buffer.

Implements Graphic3d_GraphicDriver.

OpenGl_Caps& OpenGl_GraphicDriver::ChangeOptions ( )
inline
Returns
the visualization options
void OpenGl_GraphicDriver::ChangeZLayer ( const Graphic3d_CStructure theCStructure,
const Standard_Integer  theLayerId 
)
virtual

Change Z layer of a structure. The new z layer ID will
be used to define the associated layer for structure on display.
It is recommended to take care of redisplaying the structures already
presented in view with previously set layer index. This is usually
done by viewer manager. Z layers allow drawing structures in
higher layers in foreground of structures in lower layers.

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::ChangeZLayer ( const Graphic3d_CStructure theCStructure,
const Graphic3d_CView theCView,
const Standard_Integer  theNewLayerId 
)
virtual

Change Z layer of a structure already presented in view.
It is recommended to update z layer of already
displayed structures with this method before setting new z layer
index to the structure. This is usually done by viewer manager.

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::ClearGroup ( const Graphic3d_CGroup ACGroup)
virtual

call_togl_cleargroup

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::ClearImmediatMode ( const Graphic3d_CView ACView,
const Standard_Boolean  aFlush = Standard_True 
)
virtual

call_togl_clear_immediat_mode

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::ClearLayer ( const Aspect_CLayer2d ACLayer)
virtual

call_togl_clear_layer2d

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::ClearStructure ( const Graphic3d_CStructure ACStructure)
virtual

call_togl_clearstructure

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::ClipLimit ( const Graphic3d_CView ACView,
const Standard_Boolean  AWait 
)
virtual

call_togl_cliplimit

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Connect ( const Graphic3d_CStructure AFather,
const Graphic3d_CStructure ASon 
)
virtual

call_togl_connect

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::ContextStructure ( const Graphic3d_CStructure ACStructure)
virtual

call_togl_contextstructure

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::DeactivateView ( const Graphic3d_CView ACView)
virtual

call_togl_deactivateview

Implements Graphic3d_GraphicDriver.

Standard_ShortReal OpenGl_GraphicDriver::DefaultTextHeight ( ) const
virtual
void OpenGl_GraphicDriver::DepthCueing ( const Graphic3d_CView ACView,
const Standard_Boolean  AFlag 
)
virtual

call_togl_cliplimit

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Disconnect ( const Graphic3d_CStructure AFather,
const Graphic3d_CStructure ASon 
)
virtual

call_togl_disconnect

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::DisplayStructure ( const Graphic3d_CView ACView,
const Graphic3d_CStructure ACStructure,
const Standard_Integer  APriority 
)
virtual

call_togl_displaystructure

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Draw ( const Standard_ShortReal  X,
const Standard_ShortReal  Y 
)
virtual

call_togl_draw2d

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::DrawStructure ( const Graphic3d_CStructure ACStructure)
virtual

call_togl_draw_structure

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Edge ( const Standard_ShortReal  X,
const Standard_ShortReal  Y 
)
virtual

call_togl_edge2d

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::EnableVBO ( const Standard_Boolean  theToTurnOn)
virtual

VBO usage can be forbidden by this method even if it is supported by GL driver. Notice that disabling of VBO will cause rendering performance degradation. Warning! This method should be called only before any primitives are displayed in GL scene!

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::End ( )
virtual

call_togl_end

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::EndAddMode ( )
virtual

call_togl_end_ajout_mode

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::EndImmediatMode ( const Standard_Integer  Synchronize)
virtual

call_togl_end_immediat_mode

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::EndLayer ( )
virtual

call_togl_end_layer2d

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::EndPolygon2d ( )
virtual

call_togl_end_polygon2d

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::EndPolyline2d ( )
virtual

call_togl_end_polyline2d

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Environment ( const Graphic3d_CView ACView)
virtual
void OpenGl_GraphicDriver::EraseStructure ( const Graphic3d_CView ACView,
const Graphic3d_CStructure ACStructure 
)
virtual

call_togl_erasestructure

Implements Graphic3d_GraphicDriver.

Standard_Boolean OpenGl_GraphicDriver::Export ( const Standard_CString  theFileName,
const Graphic3d_ExportFormat  theFormat,
const Graphic3d_SortType  theSortType,
const Standard_Integer  theWidth,
const Standard_Integer  theHeight,
const Graphic3d_CView theView,
const Aspect_CLayer2d theLayerUnder,
const Aspect_CLayer2d theLayerOver,
const Standard_Real  thePrecision = 0.005,
const Standard_Address  theProgressBarFunc = NULL,
const Standard_Address  theProgressObject = NULL 
)
virtual

Export scene into the one of the Vector graphics formats (SVG, PS, PDF...).
In contrast to Bitmaps, Vector graphics is scalable (so you may got quality benefits on printing to laser printer).
Notice however that results may differ a lot and do not contain some elements.

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::FaceContextGroup ( const Graphic3d_CGroup ACGroup,
const Standard_Integer  NoInsert 
)
virtual

call_togl_facecontextgroup

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::FBOChangeViewport ( const Graphic3d_CView view,
Graphic3d_PtrFrameBuffer fboPtr,
const Standard_Integer  width,
const Standard_Integer  height 
)
virtual

Change offscreen FBO viewport.

Implements Graphic3d_GraphicDriver.

Graphic3d_PtrFrameBuffer OpenGl_GraphicDriver::FBOCreate ( const Graphic3d_CView view,
const Standard_Integer  width,
const Standard_Integer  height 
)
virtual

Generate offscreen FBO (needs OpenGL2+ hardware)
If not supported on hardware returns NULL.

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::FBOGetDimensions ( const Graphic3d_CView view,
const Graphic3d_PtrFrameBuffer  fboPtr,
Standard_Integer width,
Standard_Integer height,
Standard_Integer widthMax,
Standard_Integer heightMax 
)
virtual

Read offscreen FBO configuration.

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::FBORelease ( const Graphic3d_CView view,
Graphic3d_PtrFrameBuffer fboPtr 
)
virtual

Remove offscreen FBO

Implements Graphic3d_GraphicDriver.

Standard_Boolean OpenGl_GraphicDriver::GetOpenClDeviceInfo ( const Graphic3d_CView theCView,
NCollection_DataMap< TCollection_AsciiString, TCollection_AsciiString > &  theInfo 
)

Returns information about OpenCL device used for computations.

OpenGl_StateCounter* OpenGl_GraphicDriver::GetStateCounter ( ) const
inline
Standard_Integer OpenGl_GraphicDriver::GetZLayer ( const Graphic3d_CStructure theCStructure) const
virtual

Get Z layer ID of the structure. If the structure doesn't exists in
graphic driver, the method returns -1.

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::GradientBackground ( const Graphic3d_CView ACView,
const Quantity_Color AColor1,
const Quantity_Color AColor2,
const Aspect_GradientFillMethod  FillStyle 
)
virtual

call_togl_gradient_background

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::GraduatedTrihedronDisplay ( const Graphic3d_CView view,
const Graphic3d_CGraduatedTrihedron cubic 
)
virtual

call_togl_graduatedtrihedron_display

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::GraduatedTrihedronErase ( const Graphic3d_CView view)
virtual

call_togl_graduatedtrihedron_erase

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::GraduatedTrihedronMinMaxValues ( const Standard_ShortReal  xmin,
const Standard_ShortReal  ymin,
const Standard_ShortReal  zmin,
const Standard_ShortReal  xmax,
const Standard_ShortReal  ymax,
const Standard_ShortReal  zmax 
)
virtual

call_togl_graduatedtrihedron_minmaxvalues

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Group ( Graphic3d_CGroup ACGroup)
virtual

call_togl_group

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::HighlightColor ( const Graphic3d_CStructure ACStructure,
const Standard_ShortReal  R,
const Standard_ShortReal  G,
const Standard_ShortReal  B,
const Standard_Boolean  Create 
)
virtual

call_togl_highlightcolor

Implements Graphic3d_GraphicDriver.

Standard_Integer OpenGl_GraphicDriver::InquireLightLimit ( )
virtual

call_togl_inquirelight

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::InquireMat ( const Graphic3d_CView ACView,
TColStd_Array2OfReal AMatO,
TColStd_Array2OfReal AMatM 
)
virtual

call_togl_inquiremat

Implements Graphic3d_GraphicDriver.

Standard_Integer OpenGl_GraphicDriver::InquirePlaneLimit ( )
virtual

Clear visualization data in graphical driver and stop
displaying the primitives array of the graphical group <theCGroup>.
This method is internal and should be used by Graphic3d_Group only.

Implements Graphic3d_GraphicDriver.

Standard_Integer OpenGl_GraphicDriver::InquireViewLimit ( )
virtual

call_togl_inquireview

Implements Graphic3d_GraphicDriver.

Standard_Boolean OpenGl_GraphicDriver::IsDepthTestEnabled ( const Graphic3d_CView view) const
virtual

call_togl_isdepthtest

Implements Graphic3d_GraphicDriver.

Standard_Boolean OpenGl_GraphicDriver::IsGLLightEnabled ( const Graphic3d_CView view) const
virtual

call_togl_isgllight

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Layer ( Aspect_CLayer2d ACLayer)
virtual

call_togl_layer2d

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::LineContextGroup ( const Graphic3d_CGroup ACGroup,
const Standard_Integer  NoInsert 
)
virtual

call_togl_linecontextgroup

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::MarkerContextGroup ( const Graphic3d_CGroup ACGroup,
const Standard_Integer  NoInsert 
)
virtual

call_togl_markercontextgroup

Implements Graphic3d_GraphicDriver.

Standard_Boolean OpenGl_GraphicDriver::MemoryInfo ( Standard_Size theFreeBytes,
TCollection_AsciiString theInfo 
) const
virtual

Returns information about GPU memory usage. Please read OpenGl_Context::MemoryInfo() for more description.

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Move ( const Standard_ShortReal  X,
const Standard_ShortReal  Y 
)
virtual

call_togl_move2d

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::NameSetStructure ( const Graphic3d_CStructure ACStructure)
virtual

call_togl_namesetstructure

Implements Graphic3d_GraphicDriver.

const OpenGl_Caps& OpenGl_GraphicDriver::Options ( ) const
inline
Returns
the visualization options
void OpenGl_GraphicDriver::PrimitiveArray ( const Graphic3d_CGroup ACGroup,
const Graphic3d_PrimitiveArray parray,
const Standard_Boolean  EvalMinMax = Standard_True 
)
virtual

call_togl_parray

Implements Graphic3d_GraphicDriver.

Standard_Boolean OpenGl_GraphicDriver::Print ( const Graphic3d_CView ACView,
const Aspect_CLayer2d ACUnderLayer,
const Aspect_CLayer2d ACOverLayer,
const Aspect_Handle  hPrnDC,
const Standard_Boolean  showBackground,
const Standard_CString  filename,
const Aspect_PrintAlgo  printAlgorithm = Aspect_PA_STRETCH,
const Standard_Real  theScaleFactor = 1.0 
) const
virtual

print the contents of all layers of the view to the printer.
<hPrnDC> : Pass the PrinterDeviceContext (HDC),
<showBackground> : When set to FALSE then print the view without background color
(background is white)
else set to TRUE for printing with current background color.
<filename>: If != NULL, then the view will be printed to a file.
<printAlgorithm>: Select print algorithm: stretch, tile.
<theScaleFactor>: Scaling coefficient, used internally to scale the
printings accordingly to the scale factor selected in the printer
properties dialog.
Returns Standard_True if the data is passed to the printer, otherwise
Standard_False if the print operation failed due to the printer errors,
or lack of system memory. This might be related to insufficient memory
or some internal errors. All this errors are indicated by the message
boxes (on level of OpenGl_GraphicDriver).
Warning: This function can reuse FBO assigned to the view
Please take it into account if you use it for your purposes;

Implements Graphic3d_GraphicDriver.

Standard_Boolean OpenGl_GraphicDriver::ProjectRaster ( const Graphic3d_CView ACView,
const Standard_ShortReal  AX,
const Standard_ShortReal  AY,
const Standard_ShortReal  AZ,
Standard_Integer AU,
Standard_Integer AV 
)
virtual

call_togl_unproject_raster

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::RatioWindow ( const Graphic3d_CView ACView)
virtual

call_togl_ratio_window

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::ReadDepths ( const Graphic3d_CView view,
const Standard_Integer  x,
const Standard_Integer  y,
const Standard_Integer  width,
const Standard_Integer  height,
const Standard_Address  buffer 
) const
virtual

Reads depths of shown pixels of the given rectangle (glReadPixels with GL_DEPTH_COMPONENT)

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Rectangle ( const Standard_ShortReal  X,
const Standard_ShortReal  Y,
const Standard_ShortReal  Width,
const Standard_ShortReal  Height 
)
virtual

call_togl_rectangle2d

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Redraw ( const Graphic3d_CView ACView,
const Aspect_CLayer2d ACUnderLayer,
const Aspect_CLayer2d ACOverLayer,
const Standard_Integer  x = 0,
const Standard_Integer  y = 0,
const Standard_Integer  width = 0,
const Standard_Integer  height = 0 
)
virtual

call_togl_redraw <br>

Warning: when the redraw area has a null size, the full view is redrawn

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::RemoveGroup ( const Graphic3d_CGroup ACGroup)
virtual

call_togl_removegroup

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::RemoveLayer ( const Aspect_CLayer2d ACLayer)
virtual

call_togl_removelayer2d

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::RemoveStructure ( const Graphic3d_CStructure ACStructure)
virtual

call_togl_removestructure

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::RemoveView ( const Graphic3d_CView ACView)
virtual

call_togl_removeview

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::RemoveZLayer ( const Graphic3d_CView theCView,
const Standard_Integer  theLayerId 
)
virtual

Remove Z layer from the specified view. All structures
displayed at the moment in layer will be displayed in default layer
( the bottom-level z layer ). To unset layer index from associated
structures use method UnsetZLayer (...).

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::SetBackFacingModel ( const Graphic3d_CView aView)
virtual

call_togl_backfacing

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::SetBgGradientStyle ( const Graphic3d_CView ACView,
const Aspect_GradientFillMethod  FillStyle 
)
virtual
void OpenGl_GraphicDriver::SetBgImageStyle ( const Graphic3d_CView ACView,
const Aspect_FillMethod  FillStyle 
)
virtual
void OpenGl_GraphicDriver::SetClipPlanes ( const Graphic3d_CView theCView)
virtual

Pass clip planes to the associated graphic driver view.

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::SetClipPlanes ( const Graphic3d_CStructure theCStructure)
virtual

Pass clip planes to the associated graphic driver structure.

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::SetColor ( const Standard_ShortReal  R,
const Standard_ShortReal  G,
const Standard_ShortReal  B 
)
virtual

call_togl_set_color

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::SetDepthTestEnabled ( const Graphic3d_CView view,
const Standard_Boolean  isEnabled 
) const
virtual

call_togl_depthtest

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::SetFlippingOptions ( const Graphic3d_CGroup theCGroup,
const Standard_Boolean  theIsEnabled,
const gp_Ax2 theRefPlane 
)
virtual

sets the flipping to theIsEnabled state for the given graphic group.

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::SetGLLightEnabled ( const Graphic3d_CView view,
const Standard_Boolean  isEnabled 
) const
virtual

call_togl_gllight

Implements Graphic3d_GraphicDriver.

Standard_Boolean OpenGl_GraphicDriver::SetImmediateModeDrawToFront ( const Graphic3d_CView theCView,
const Standard_Boolean  theDrawToFrontBuffer 
)
virtual
 @param theDrawToFrontBuffer Advanced option to modify rendering mode: <br>
  1. TRUE. Drawing immediate mode structures directly to the front buffer over the scene image.
    Fast, so preferred for interactive work (used by default).
    However these extra drawings will be missed in image dump since it is performed from back buffer.
    Notice that since no pre-buffering used the V-Sync will be ignored and rendering could be seen
    in run-time (in case of slow hardware) and/or tearing may appear.
    So this is strongly recommended to draw only simple (fast) structures.
  2. FALSE. Drawing immediate mode structures to the back buffer.
    The complete scene is redrawn first, so this mode is slower if scene contains complex data and/or V-Sync is turned on.
    But it works in any case and is especially useful for view dump because the dump image is read from the back buffer.
    Returns
    previous mode.

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::SetLight ( const Graphic3d_CView ACView)
virtual

call_togl_setlight

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::SetLineAttributes ( const Standard_Integer  Type,
const Standard_ShortReal  Width 
)
virtual

call_togl_set_line_attributes

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::SetStencilTestOptions ( const Graphic3d_CGroup theCGroup,
const Standard_Boolean  theIsEnabled 
)
virtual

sets the stencil test to theIsEnabled state;

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::SetTextAttributes ( const Standard_CString  FontName,
const Standard_Integer  Type,
const Standard_ShortReal  R,
const Standard_ShortReal  G,
const Standard_ShortReal  B 
)
virtual

Set text attributes for under-/overlayer.
<Font> argument defines the name of the font to be used,
<Type> argument defines the display type of the text,
<R> <G> values define the color of decal or subtitle background.
To set the color of the text you can use the SetColor method.

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::SetTransparency ( const Standard_ShortReal  ATransparency)
virtual

call_togl_set_transparency

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::SetVisualisation ( const Graphic3d_CView ACView)
virtual

call_togl_setvisualisation

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::SetZLayerSettings ( const Graphic3d_CView theCView,
const Standard_Integer  theLayerId,
const Graphic3d_ZLayerSettings  theSettings 
)
virtual

Sets the settings for a single Z layer of specified view.

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Structure ( Graphic3d_CStructure ACStructure)
virtual

call_togl_structure

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Text ( const Graphic3d_CGroup ACGroup,
const Standard_CString  AText,
const Graphic3d_Vertex APoint,
const Standard_Real  AHeight,
const Quantity_PlaneAngle  AAngle,
const Graphic3d_TextPath  ATp,
const Graphic3d_HorizontalTextAlignment  AHta,
const Graphic3d_VerticalTextAlignment  AVta,
const Standard_Boolean  EvalMinMax = Standard_True 
)
virtual

call_togl_text

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Text ( const Graphic3d_CGroup ACGroup,
const Standard_CString  AText,
const Graphic3d_Vertex APoint,
const Standard_Real  AHeight,
const Standard_Boolean  EvalMinMax = Standard_True 
)
virtual

call_togl_text

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Text ( const Graphic3d_CGroup ACGroup,
const TCollection_ExtendedString AText,
const Graphic3d_Vertex APoint,
const Standard_Real  AHeight,
const Quantity_PlaneAngle  AAngle,
const Graphic3d_TextPath  ATp,
const Graphic3d_HorizontalTextAlignment  AHta,
const Graphic3d_VerticalTextAlignment  AVta,
const Standard_Boolean  EvalMinMax = Standard_True 
)
virtual

call_togl_text

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Text ( const Graphic3d_CGroup ACGroup,
const TCollection_ExtendedString AText,
const Graphic3d_Vertex APoint,
const Standard_Real  AHeight,
const Standard_Boolean  EvalMinMax = Standard_True 
)
virtual

call_togl_text

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Text ( const Standard_CString  AText,
const Standard_ShortReal  X,
const Standard_ShortReal  Y,
const Standard_ShortReal  AHeight 
)
virtual

 call_togl_text2d <br>

If AHeight < 0 default text height is used by driver (DefaultTextHeight method)

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::TextContextGroup ( const Graphic3d_CGroup ACGroup,
const Standard_Integer  NoInsert 
)
virtual

call_togl_textcontextgroup

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::TextSize ( const Standard_CString  AText,
const Standard_ShortReal  AHeight,
Standard_ShortReal AWidth,
Standard_ShortReal AnAscent,
Standard_ShortReal ADescent 
) const
virtual

call_togl_textsize2d

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::TransformStructure ( const Graphic3d_CStructure ACStructure)
virtual

call_togl_transformstructure

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Transparency ( const Graphic3d_CView ACView,
const Standard_Boolean  AFlag 
)
virtual

call_togl_transparency

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::TriedronDisplay ( const Graphic3d_CView ACView,
const Aspect_TypeOfTriedronPosition  APosition = Aspect_TOTP_CENTER,
const Quantity_NameOfColor  AColor = Quantity_NOC_WHITE,
const Standard_Real  AScale = 0.02,
const Standard_Boolean  AsWireframe = Standard_True 
)
virtual

call_togl_triedron_display

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::TriedronEcho ( const Graphic3d_CView ACView,
const Aspect_TypeOfTriedronEcho  AType = Aspect_TOTE_NONE 
)
virtual

call_togl_triedron_echo

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::TriedronErase ( const Graphic3d_CView ACView)
virtual

call_togl_triedron_erase

Implements Graphic3d_GraphicDriver.

Standard_Boolean OpenGl_GraphicDriver::UnProjectRaster ( const Graphic3d_CView ACView,
const Standard_Integer  Axm,
const Standard_Integer  Aym,
const Standard_Integer  AXM,
const Standard_Integer  AYM,
const Standard_Integer  AU,
const Standard_Integer  AV,
Standard_ShortReal AX,
Standard_ShortReal AY,
Standard_ShortReal AZ 
)
virtual

call_togl_unproject_raster

Implements Graphic3d_GraphicDriver.

Standard_Boolean OpenGl_GraphicDriver::UnProjectRasterWithRay ( const Graphic3d_CView ACView,
const Standard_Integer  Axm,
const Standard_Integer  Aym,
const Standard_Integer  AXM,
const Standard_Integer  AYM,
const Standard_Integer  AU,
const Standard_Integer  AV,
Standard_ShortReal AX,
Standard_ShortReal AY,
Standard_ShortReal AZ,
Standard_ShortReal DX,
Standard_ShortReal DY,
Standard_ShortReal DZ 
)
virtual

call_togl_unproject_raster_with_ray

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::UnsetTransparency ( )
virtual

call_togl_unset_transparency

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::UnsetZLayer ( const Standard_Integer  theLayerId)
virtual

Unset Z layer ID for all structures. The structure
indexes will be set to default layer ( the bottom-level z layer with
ID = 0 ).

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::Update ( const Graphic3d_CView ACView,
const Aspect_CLayer2d ACUnderLayer,
const Aspect_CLayer2d ACOverLayer 
)
virtual

call_togl_update

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::UserDraw ( const Graphic3d_CGroup ACGroup,
const Graphic3d_CUserDraw AUserDraw 
)
virtual

call_togl_userdraw

Implements Graphic3d_GraphicDriver.

OpenGl_UserDrawCallback_t& OpenGl_GraphicDriver::UserDrawCallback ( )

Method to setup UserDraw callback.

Standard_Boolean OpenGl_GraphicDriver::View ( Graphic3d_CView ACView)
virtual

call_togl_view

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::ViewMapping ( const Graphic3d_CView ACView,
const Standard_Boolean  AWait 
)
virtual

call_togl_viewmapping

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::ViewOrientation ( const Graphic3d_CView ACView,
const Standard_Boolean  AWait 
)
virtual

call_togl_vieworientation

Implements Graphic3d_GraphicDriver.

void OpenGl_GraphicDriver::ZBufferTriedronSetup ( const Quantity_NameOfColor  XColor = Quantity_NOC_RED,
const Quantity_NameOfColor  YColor = Quantity_NOC_GREEN,
const Quantity_NameOfColor  ZColor = Quantity_NOC_BLUE1,
const Standard_Real  SizeRatio = 0.8,
const Standard_Real  AxisDiametr = 0.05,
const Standard_Integer  NbFacettes = 12 
)
virtual

call_togl_ztriedron_setup

Implements Graphic3d_GraphicDriver.


The documentation for this class was generated from the following file: