Open CASCADE Technology  6.9.0
Public Member Functions | Protected Member Functions | Protected Attributes

Graphic3d_GraphicDriver Class Referenceabstract

This class allows the definition of a graphic driver for 3d interface (currently only OpenGl driver is used). More...

#include <Graphic3d_GraphicDriver.hxx>

Inheritance diagram for Graphic3d_GraphicDriver:
Inheritance graph
[legend]

Public Member Functions

virtual Standard_Integer InquireLightLimit ()=0
 call_togl_inquirelight More...
 
virtual Standard_Integer InquirePlaneLimit ()=0
 call_togl_inquireplane More...
 
virtual Standard_Integer InquireViewLimit ()=0
 call_togl_inquireview More...
 
virtual void DisplayStructure (const Graphic3d_CView &theCView, const Handle< Graphic3d_Structure > &theStructure, const Standard_Integer thePriority)=0
 call_togl_displaystructure More...
 
virtual void EraseStructure (const Graphic3d_CView &theCView, const Handle< Graphic3d_Structure > &theStructure)=0
 call_togl_erasestructure More...
 
virtual void RemoveStructure (Handle< Graphic3d_CStructure > &theCStructure)=0
 call_togl_removestructure More...
 
virtual Handle
< Graphic3d_CStructure
Structure (const Handle< Graphic3d_StructureManager > &theManager)=0
 Creates new empty graphic structure. More...
 
virtual void ActivateView (const Graphic3d_CView &ACView)=0
 call_togl_activateview More...
 
virtual void AntiAliasing (const Graphic3d_CView &ACView, const Standard_Boolean AFlag)=0
 call_togl_antialiasing More...
 
virtual void Background (const Graphic3d_CView &ACView)=0
 call_togl_background More...
 
virtual void GradientBackground (const Graphic3d_CView &ACView, const Quantity_Color &AColor1, const Quantity_Color &AColor2, const Aspect_GradientFillMethod FillStyle)=0
 call_togl_gradient_background More...
 
virtual void BackgroundImage (const Standard_CString FileName, const Graphic3d_CView &ACView, const Aspect_FillMethod FillStyle)=0
 
virtual void SetBgImageStyle (const Graphic3d_CView &ACView, const Aspect_FillMethod FillStyle)=0
 
virtual void SetBgGradientStyle (const Graphic3d_CView &ACView, const Aspect_GradientFillMethod FillStyle)=0
 
virtual void ClipLimit (const Graphic3d_CView &ACView, const Standard_Boolean AWait)=0
 call_togl_cliplimit More...
 
virtual void DeactivateView (const Graphic3d_CView &ACView)=0
 call_togl_deactivateview More...
 
virtual void DepthCueing (const Graphic3d_CView &ACView, const Standard_Boolean AFlag)=0
 call_togl_cliplimit More...
 
virtual void RatioWindow (const Graphic3d_CView &ACView)=0
 call_togl_ratio_window More...
 
virtual void Redraw (const Graphic3d_CView &theCView, const Aspect_CLayer2d &theCUnderLayer, const Aspect_CLayer2d &theCOverLayer, const Standard_Integer theX=0, const Standard_Integer theY=0, const Standard_Integer theWidth=0, const Standard_Integer theHeight=0)=0
 Redraw content of the view. More...
 
virtual void RedrawImmediate (const Graphic3d_CView &theCView, const Aspect_CLayer2d &theCUnderLayer, const Aspect_CLayer2d &theCOverLayer)=0
 Redraw layer of immediate presentations. More...
 
virtual void Invalidate (const Graphic3d_CView &theCView)=0
 Invalidates content of the view but does not redraw it. More...
 
virtual void RemoveView (const Graphic3d_CView &ACView)=0
 call_togl_removeview More...
 
virtual void SetLight (const Graphic3d_CView &ACView)=0
 call_togl_setlight More...
 
virtual void SetClipPlanes (const Graphic3d_CView &theCView)=0
 Pass clip planes to the associated graphic driver view. More...
 
virtual void SetCamera (const Graphic3d_CView &theCView)=0
 Inform graphic driver if camera assigned to view changes. More...
 
virtual void SetVisualisation (const Graphic3d_CView &ACView)=0
 call_togl_setvisualisation More...
 
virtual Standard_Boolean View (Graphic3d_CView &ACView)=0
 call_togl_view More...
 
virtual void Environment (const Graphic3d_CView &ACView)=0
 
virtual void EnableVBO (const Standard_Boolean status)=0
 enables/disables usage of OpenGL vertex buffer arrays while drawing primitiev arrays More...
 
virtual Standard_Boolean MemoryInfo (Standard_Size &theFreeBytes, TCollection_AsciiString &theInfo) const =0
 Returns information about GPU memory usage. More...
 
virtual void ZBufferTriedronSetup (const Graphic3d_CView &theCView, 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)=0
 call_togl_ztriedron_setup More...
 
virtual 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)=0
 call_togl_triedron_display More...
 
virtual void TriedronErase (const Graphic3d_CView &ACView)=0
 call_togl_triedron_erase More...
 
virtual void TriedronEcho (const Graphic3d_CView &ACView, const Aspect_TypeOfTriedronEcho AType=Aspect_TOTE_NONE)=0
 call_togl_triedron_echo More...
 
virtual void GraduatedTrihedronDisplay (const Graphic3d_CView &theView, const Graphic3d_GraduatedTrihedron &theCubic)=0
 call_togl_graduatedtrihedron_display More...
 
virtual void GraduatedTrihedronErase (const Graphic3d_CView &theView)=0
 call_togl_graduatedtrihedron_erase More...
 
virtual void GraduatedTrihedronMinMaxValues (const Graphic3d_CView &theView, const Graphic3d_Vec3 theMin, const Graphic3d_Vec3 theMax)=0
 Sets minimum and maximum points of scene bounding box for Graduated Trihedron stored in graphic view object. More...
 
virtual Standard_Boolean SetImmediateModeDrawToFront (const Graphic3d_CView &theCView, const Standard_Boolean theDrawToFrontBuffer)=0
 
virtual void DisplayImmediateStructure (const Graphic3d_CView &theCView, const Handle< Graphic3d_Structure > &theStructure)=0
 Display structure in immediate mode on top of general presentation. More...
 
virtual void EraseImmediateStructure (const Graphic3d_CView &theCView, const Graphic3d_CStructure &theCStructure)=0
 Erases immediate structure. More...
 
virtual void Layer (Aspect_CLayer2d &ACLayer)=0
 call_togl_layer2d More...
 
virtual void RemoveLayer (const Aspect_CLayer2d &ACLayer)=0
 call_togl_removelayer2d More...
 
virtual void BeginLayer (const Aspect_CLayer2d &ACLayer)=0
 call_togl_begin_layer2d More...
 
virtual void BeginPolygon2d ()=0
 call_togl_begin_polygon2d More...
 
virtual void BeginPolyline2d ()=0
 call_togl_begin_polyline2d More...
 
virtual void ClearLayer (const Aspect_CLayer2d &ACLayer)=0
 call_togl_clear_layer2d More...
 
virtual void Draw (const Standard_ShortReal X, const Standard_ShortReal Y)=0
 call_togl_draw2d More...
 
virtual void Edge (const Standard_ShortReal X, const Standard_ShortReal Y)=0
 call_togl_edge2d More...
 
virtual void EndLayer ()=0
 call_togl_end_layer2d More...
 
virtual void EndPolygon2d ()=0
 call_togl_end_polygon2d More...
 
virtual void EndPolyline2d ()=0
 call_togl_end_polyline2d More...
 
virtual void Move (const Standard_ShortReal X, const Standard_ShortReal Y)=0
 call_togl_move2d More...
 
virtual void Rectangle (const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal Width, const Standard_ShortReal Height)=0
 call_togl_rectangle2d More...
 
virtual void SetColor (const Standard_ShortReal R, const Standard_ShortReal G, const Standard_ShortReal B)=0
 call_togl_set_color More...
 
virtual void SetTransparency (const Standard_ShortReal ATransparency)=0
 call_togl_set_transparency More...
 
virtual void UnsetTransparency ()=0
 call_togl_unset_transparency More...
 
virtual void SetLineAttributes (const Standard_Integer Type, const Standard_ShortReal Width)=0
 call_togl_set_line_attributes More...
 
virtual void SetTextAttributes (const Standard_CString Font, const Standard_Integer Type, const Standard_ShortReal R, const Standard_ShortReal G, const Standard_ShortReal B)=0
 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...
 
virtual void Text (const Standard_CString AText, const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal AHeight)=0
 call_togl_text2d If AHeight < 0 default text height is used by driver (DefaultTextHeight method) More...
 
virtual Standard_ShortReal DefaultTextHeight () const =0
 
virtual void TextSize (const Standard_CString AText, const Standard_ShortReal AHeight, Standard_ShortReal &AWidth, Standard_ShortReal &AnAscent, Standard_ShortReal &ADescent) const =0
 call_togl_textsize2d More...
 
virtual void SetBackFacingModel (const Graphic3d_CView &aView)=0
 call_togl_backfacing More...
 
virtual void SetDepthTestEnabled (const Graphic3d_CView &view, const Standard_Boolean isEnabled) const =0
 call_togl_depthtest More...
 
virtual Standard_Boolean IsDepthTestEnabled (const Graphic3d_CView &view) const =0
 call_togl_isdepthtest More...
 
virtual 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 =0
 Reads depths of shown pixels of the given rectangle (glReadPixels with GL_DEPTH_COMPONENT) More...
 
virtual Graphic3d_PtrFrameBuffer FBOCreate (const Graphic3d_CView &view, const Standard_Integer width, const Standard_Integer height)=0
 Generate offscreen FBO in the graphic library. If not supported on hardware returns NULL. More...
 
virtual void FBORelease (const Graphic3d_CView &view, Graphic3d_PtrFrameBuffer &fboPtr)=0
 Remove offscreen FBO from the graphic library. More...
 
virtual void FBOGetDimensions (const Graphic3d_CView &view, const Graphic3d_PtrFrameBuffer fboPtr, Standard_Integer &width, Standard_Integer &height, Standard_Integer &widthMax, Standard_Integer &heightMax)=0
 Read offscreen FBO configuration. More...
 
virtual void FBOChangeViewport (const Graphic3d_CView &view, Graphic3d_PtrFrameBuffer &fboPtr, const Standard_Integer width, const Standard_Integer height)=0
 Change offscreen FBO viewport. More...
 
virtual Standard_Boolean BufferDump (const Graphic3d_CView &theCView, Image_PixMap &theImage, const Graphic3d_BufferType &theBufferType)=0
 Dump active rendering buffer into specified memory buffer. More...
 
virtual void SetGLLightEnabled (const Graphic3d_CView &view, const Standard_Boolean isEnabled) const =0
 call_togl_gllight More...
 
virtual Standard_Boolean IsGLLightEnabled (const Graphic3d_CView &view) const =0
 call_togl_isgllight More...
 
virtual 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 =0
 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 insufficient system memory available. More...
 
virtual 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)=0
 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...
 
virtual void InvalidateBVHData (Graphic3d_CView &theCView, const Standard_Integer theLayerId)=0
 Marks BVH tree and the set of BVH primitives of correspondent priority list with id theLayerId as outdated. More...
 
virtual void AddZLayer (const Graphic3d_CView &theCView, const Graphic3d_ZLayerId theLayerId)=0
 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 ID for the structure. More...
 
virtual void RemoveZLayer (const Graphic3d_CView &theCView, const Graphic3d_ZLayerId theLayerId)=0
 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 ID from associated structures use method UnsetZLayer (...). More...
 
virtual void UnsetZLayer (const Graphic3d_ZLayerId theLayerId)=0
 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...
 
virtual void ChangeZLayer (const Graphic3d_CStructure &theCStructure, const Graphic3d_CView &theCView, const Graphic3d_ZLayerId theNewLayerId)=0
 Change Z layer of a structure already presented in view. More...
 
virtual void SetZLayerSettings (const Graphic3d_CView &theCView, const Graphic3d_ZLayerId theLayerId, const Graphic3d_ZLayerSettings &theSettings)=0
 Sets the settings for a single Z layer of specified view. More...
 
virtual void ChangePriority (const Graphic3d_CStructure &theCStructure, const Graphic3d_CView &theCView, const Standard_Integer theNewPriority)=0
 Changes the priority of a structure within its Z layer in the specified view. More...
 
void PrintBoolean (const Standard_CString AComment, const Standard_Boolean AValue) const
 
void PrintCLight (const Graphic3d_CLight &ACLight, 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 Handle
< Aspect_DisplayConnection > & 
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 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...
 

Protected Member Functions

 Graphic3d_GraphicDriver (const Handle< Aspect_DisplayConnection > &theDisp)
 Initialises the Driver. More...
 

Protected Attributes

Standard_Integer MyTraceLevel
 
Handle< Aspect_DisplayConnectionmyDisplayConnection
 
Standard_Boolean myDeviceLostFlag
 

Detailed Description

This class allows the definition of a graphic driver for 3d interface (currently only OpenGl driver is used).

Constructor & Destructor Documentation

Graphic3d_GraphicDriver::Graphic3d_GraphicDriver ( const Handle< Aspect_DisplayConnection > &  theDisp)
protected

Initialises the Driver.

Member Function Documentation

virtual void Graphic3d_GraphicDriver::ActivateView ( const Graphic3d_CView ACView)
pure virtual

call_togl_activateview

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::AddZLayer ( const Graphic3d_CView theCView,
const Graphic3d_ZLayerId  theLayerId 
)
pure 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 ID for the structure.

Implemented in OpenGl_GraphicDriver.

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

call_togl_antialiasing

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::Background ( const Graphic3d_CView ACView)
pure virtual

call_togl_background

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::BackgroundImage ( const Standard_CString  FileName,
const Graphic3d_CView ACView,
const Aspect_FillMethod  FillStyle 
)
pure virtual

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::BeginLayer ( const Aspect_CLayer2d ACLayer)
pure virtual

call_togl_begin_layer2d

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::BeginPolygon2d ( )
pure virtual

call_togl_begin_polygon2d

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::BeginPolyline2d ( )
pure virtual

call_togl_begin_polyline2d

Implemented in OpenGl_GraphicDriver.

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

Dump active rendering buffer into specified memory buffer.

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::ChangePriority ( const Graphic3d_CStructure theCStructure,
const Graphic3d_CView theCView,
const Standard_Integer  theNewPriority 
)
pure virtual

Changes the priority of a structure within its Z layer in the specified view.

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::ChangeZLayer ( const Graphic3d_CStructure theCStructure,
const Graphic3d_CView theCView,
const Graphic3d_ZLayerId  theNewLayerId 
)
pure virtual

Change Z layer of a structure already presented in view.

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::ClearLayer ( const Aspect_CLayer2d ACLayer)
pure virtual

call_togl_clear_layer2d

Implemented in OpenGl_GraphicDriver.

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

call_togl_cliplimit

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::DeactivateView ( const Graphic3d_CView ACView)
pure virtual

call_togl_deactivateview

Implemented in OpenGl_GraphicDriver.

virtual Standard_ShortReal Graphic3d_GraphicDriver::DefaultTextHeight ( ) const
pure virtual

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::DepthCueing ( const Graphic3d_CView ACView,
const Standard_Boolean  AFlag 
)
pure virtual

call_togl_cliplimit

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::DisplayImmediateStructure ( const Graphic3d_CView theCView,
const Handle< Graphic3d_Structure > &  theStructure 
)
pure virtual

Display structure in immediate mode on top of general presentation.

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::DisplayStructure ( const Graphic3d_CView theCView,
const Handle< Graphic3d_Structure > &  theStructure,
const Standard_Integer  thePriority 
)
pure virtual

call_togl_displaystructure

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::Draw ( const Standard_ShortReal  X,
const Standard_ShortReal  Y 
)
pure virtual

call_togl_draw2d

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::Edge ( const Standard_ShortReal  X,
const Standard_ShortReal  Y 
)
pure virtual

call_togl_edge2d

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::EnableVBO ( const Standard_Boolean  status)
pure virtual

enables/disables usage of OpenGL vertex buffer arrays while drawing primitiev arrays

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::EndLayer ( )
pure virtual

call_togl_end_layer2d

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::EndPolygon2d ( )
pure virtual

call_togl_end_polygon2d

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::EndPolyline2d ( )
pure virtual

call_togl_end_polyline2d

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::Environment ( const Graphic3d_CView ACView)
pure virtual

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::EraseImmediateStructure ( const Graphic3d_CView theCView,
const Graphic3d_CStructure theCStructure 
)
pure virtual

Erases immediate structure.

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::EraseStructure ( const Graphic3d_CView theCView,
const Handle< Graphic3d_Structure > &  theStructure 
)
pure virtual

call_togl_erasestructure

Implemented in OpenGl_GraphicDriver.

virtual Standard_Boolean Graphic3d_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 
)
pure 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.

Implemented in OpenGl_GraphicDriver.

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

Change offscreen FBO viewport.

Implemented in OpenGl_GraphicDriver.

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

Generate offscreen FBO in the graphic library. If not supported on hardware returns NULL.

Implemented in OpenGl_GraphicDriver.

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

Read offscreen FBO configuration.

Implemented in OpenGl_GraphicDriver.

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

Remove offscreen FBO from the graphic library.

Implemented in OpenGl_GraphicDriver.

const Handle< Aspect_DisplayConnection >& Graphic3d_GraphicDriver::GetDisplayConnection ( ) const

returns Handle to display connection

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

call_togl_gradient_background

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::GraduatedTrihedronDisplay ( const Graphic3d_CView theView,
const Graphic3d_GraduatedTrihedron theCubic 
)
pure virtual

call_togl_graduatedtrihedron_display

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::GraduatedTrihedronErase ( const Graphic3d_CView theView)
pure virtual

call_togl_graduatedtrihedron_erase

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::GraduatedTrihedronMinMaxValues ( const Graphic3d_CView theView,
const Graphic3d_Vec3  theMin,
const Graphic3d_Vec3  theMax 
)
pure virtual

Sets minimum and maximum points of scene bounding box for Graduated Trihedron stored in graphic view object.

Parameters
theView[in] current graphic view
theMin[in] the minimum point of scene.
theMax[in] the maximum point of scene.

Implemented in OpenGl_GraphicDriver.

virtual Standard_Integer Graphic3d_GraphicDriver::InquireLightLimit ( )
pure virtual

call_togl_inquirelight

Implemented in OpenGl_GraphicDriver.

virtual Standard_Integer Graphic3d_GraphicDriver::InquirePlaneLimit ( )
pure virtual

call_togl_inquireplane

Implemented in OpenGl_GraphicDriver.

virtual Standard_Integer Graphic3d_GraphicDriver::InquireViewLimit ( )
pure virtual

call_togl_inquireview

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::Invalidate ( const Graphic3d_CView theCView)
pure virtual

Invalidates content of the view but does not redraw it.

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::InvalidateBVHData ( Graphic3d_CView theCView,
const Standard_Integer  theLayerId 
)
pure virtual

Marks BVH tree and the set of BVH primitives of correspondent priority list with id theLayerId as outdated.

Implemented in OpenGl_GraphicDriver.

virtual Standard_Boolean Graphic3d_GraphicDriver::IsDepthTestEnabled ( const Graphic3d_CView view) const
pure virtual

call_togl_isdepthtest

Implemented in OpenGl_GraphicDriver.

Standard_Boolean Graphic3d_GraphicDriver::IsDeviceLost ( ) const
virtual Standard_Boolean Graphic3d_GraphicDriver::IsGLLightEnabled ( const Graphic3d_CView view) const
pure virtual

call_togl_isgllight

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::Layer ( Aspect_CLayer2d ACLayer)
pure virtual

call_togl_layer2d

Implemented in OpenGl_GraphicDriver.

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

Returns information about GPU memory usage.

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::Move ( const Standard_ShortReal  X,
const Standard_ShortReal  Y 
)
pure virtual

call_togl_move2d

Implemented in OpenGl_GraphicDriver.

virtual Standard_Boolean Graphic3d_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
pure 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 insufficient system memory available.

Implemented in OpenGl_GraphicDriver.

void Graphic3d_GraphicDriver::PrintBoolean ( const Standard_CString  AComment,
const Standard_Boolean  AValue 
) const
void Graphic3d_GraphicDriver::PrintCLight ( const Graphic3d_CLight ACLight,
const Standard_Integer  AField 
) const
void Graphic3d_GraphicDriver::PrintCStructure ( const Graphic3d_CStructure ACStructure,
const Standard_Integer  AField 
) const
void Graphic3d_GraphicDriver::PrintCView ( const Graphic3d_CView ACView,
const Standard_Integer  AField 
) const
void Graphic3d_GraphicDriver::PrintFunction ( const Standard_CString  AFunc) const
void Graphic3d_GraphicDriver::PrintInteger ( const Standard_CString  AComment,
const Standard_Integer  AValue 
) const
void Graphic3d_GraphicDriver::PrintIResult ( const Standard_CString  AFunc,
const Standard_Integer  AResult 
) const
void Graphic3d_GraphicDriver::PrintMatrix ( const Standard_CString  AComment,
const TColStd_Array2OfReal AMatrix 
) const
void Graphic3d_GraphicDriver::PrintShortReal ( const Standard_CString  AComment,
const Standard_ShortReal  AValue 
) const
void Graphic3d_GraphicDriver::PrintString ( const Standard_CString  AComment,
const Standard_CString  AString 
) const
virtual void Graphic3d_GraphicDriver::RatioWindow ( const Graphic3d_CView ACView)
pure virtual

call_togl_ratio_window

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_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
pure virtual

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

Implemented in OpenGl_GraphicDriver.

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

call_togl_rectangle2d

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::Redraw ( const Graphic3d_CView theCView,
const Aspect_CLayer2d theCUnderLayer,
const Aspect_CLayer2d theCOverLayer,
const Standard_Integer  theX = 0,
const Standard_Integer  theY = 0,
const Standard_Integer  theWidth = 0,
const Standard_Integer  theHeight = 0 
)
pure virtual

Redraw content of the view.

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::RedrawImmediate ( const Graphic3d_CView theCView,
const Aspect_CLayer2d theCUnderLayer,
const Aspect_CLayer2d theCOverLayer 
)
pure virtual

Redraw layer of immediate presentations.

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::RemoveLayer ( const Aspect_CLayer2d ACLayer)
pure virtual

call_togl_removelayer2d

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::RemoveStructure ( Handle< Graphic3d_CStructure > &  theCStructure)
pure virtual

call_togl_removestructure

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::RemoveView ( const Graphic3d_CView ACView)
pure virtual

call_togl_removeview

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::RemoveZLayer ( const Graphic3d_CView theCView,
const Graphic3d_ZLayerId  theLayerId 
)
pure 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 ID from associated structures use method UnsetZLayer (...).

Implemented in OpenGl_GraphicDriver.

void Graphic3d_GraphicDriver::ResetDeviceLostFlag ( )
virtual void Graphic3d_GraphicDriver::SetBackFacingModel ( const Graphic3d_CView aView)
pure virtual

call_togl_backfacing

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::SetBgGradientStyle ( const Graphic3d_CView ACView,
const Aspect_GradientFillMethod  FillStyle 
)
pure virtual

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::SetBgImageStyle ( const Graphic3d_CView ACView,
const Aspect_FillMethod  FillStyle 
)
pure virtual

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::SetCamera ( const Graphic3d_CView theCView)
pure virtual

Inform graphic driver if camera assigned to view changes.

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::SetClipPlanes ( const Graphic3d_CView theCView)
pure virtual

Pass clip planes to the associated graphic driver view.

Implemented in OpenGl_GraphicDriver.

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

call_togl_set_color

Implemented in OpenGl_GraphicDriver.

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

call_togl_depthtest

Implemented in OpenGl_GraphicDriver.

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

call_togl_gllight

Implemented in OpenGl_GraphicDriver.

virtual Standard_Boolean Graphic3d_GraphicDriver::SetImmediateModeDrawToFront ( const Graphic3d_CView theCView,
const Standard_Boolean  theDrawToFrontBuffer 
)
pure virtual
Parameters
theDrawToFrontBufferAdvanced option to modify rendering mode:
  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.

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::SetLight ( const Graphic3d_CView ACView)
pure virtual

call_togl_setlight

Implemented in OpenGl_GraphicDriver.

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

call_togl_set_line_attributes

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::SetTextAttributes ( const Standard_CString  Font,
const Standard_Integer  Type,
const Standard_ShortReal  R,
const Standard_ShortReal  G,
const Standard_ShortReal  B 
)
pure 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.

Implemented in OpenGl_GraphicDriver.

void Graphic3d_GraphicDriver::SetTrace ( const Standard_Integer  ALevel)
virtual void Graphic3d_GraphicDriver::SetTransparency ( const Standard_ShortReal  ATransparency)
pure virtual

call_togl_set_transparency

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::SetVisualisation ( const Graphic3d_CView ACView)
pure virtual

call_togl_setvisualisation

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::SetZLayerSettings ( const Graphic3d_CView theCView,
const Graphic3d_ZLayerId  theLayerId,
const Graphic3d_ZLayerSettings theSettings 
)
pure virtual

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

Implemented in OpenGl_GraphicDriver.

virtual Handle< Graphic3d_CStructure > Graphic3d_GraphicDriver::Structure ( const Handle< Graphic3d_StructureManager > &  theManager)
pure virtual

Creates new empty graphic structure.

Implemented in OpenGl_GraphicDriver.

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

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

Implemented in OpenGl_GraphicDriver.

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

call_togl_textsize2d

Implemented in OpenGl_GraphicDriver.

Standard_Integer Graphic3d_GraphicDriver::Trace ( ) const
virtual void Graphic3d_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 
)
pure virtual

call_togl_triedron_display

Implemented in OpenGl_GraphicDriver.

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

call_togl_triedron_echo

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::TriedronErase ( const Graphic3d_CView ACView)
pure virtual

call_togl_triedron_erase

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::UnsetTransparency ( )
pure virtual

call_togl_unset_transparency

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::UnsetZLayer ( const Graphic3d_ZLayerId  theLayerId)
pure 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 ).

Implemented in OpenGl_GraphicDriver.

virtual Standard_Boolean Graphic3d_GraphicDriver::View ( Graphic3d_CView ACView)
pure virtual

call_togl_view

Implemented in OpenGl_GraphicDriver.

virtual void Graphic3d_GraphicDriver::ZBufferTriedronSetup ( const Graphic3d_CView theCView,
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 
)
pure virtual

call_togl_ztriedron_setup

Implemented in OpenGl_GraphicDriver.

Field Documentation

Standard_Boolean Graphic3d_GraphicDriver::myDeviceLostFlag
protected
Handle< Aspect_DisplayConnection > Graphic3d_GraphicDriver::myDisplayConnection
protected
Standard_Integer Graphic3d_GraphicDriver::MyTraceLevel
protected

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