Open CASCADE Technology 7.8.2.dev
|
This class defines D3D host for an OpenGl graphic driver. More...
#include <D3DHost_GraphicDriver.hxx>
Public Member Functions | |
D3DHost_GraphicDriver () | |
Constructor. | |
virtual | ~D3DHost_GraphicDriver () |
Destructor. | |
virtual Handle< Graphic3d_CView > | CreateView (const Handle< Graphic3d_StructureManager > &theMgr) override |
Create instance of D3D host view. | |
Public Member Functions inherited from OpenGl_GraphicDriver | |
OpenGl_GraphicDriver (const Handle< Aspect_DisplayConnection > &theDisp, const Standard_Boolean theToInitialize=Standard_True) | |
Constructor. | |
virtual | ~OpenGl_GraphicDriver () |
Destructor. | |
void | ReleaseContext () |
Release default context. | |
Standard_Boolean | InitContext () |
Perform initialization of default OpenGL context. | |
Standard_Boolean | InitEglContext (Aspect_Display theEglDisplay, Aspect_RenderingContext theEglContext, void *theEglConfig) |
Initialize default OpenGL context using existing one. | |
virtual Standard_Integer | InquireLimit (const Graphic3d_TypeOfLimit theType) const override |
Request limit of graphic resource of specific type. | |
virtual Handle< Graphic3d_CStructure > | CreateStructure (const Handle< Graphic3d_StructureManager > &theManager) override |
Creates new empty graphic structure. | |
virtual void | RemoveStructure (Handle< Graphic3d_CStructure > &theCStructure) override |
Removes structure from graphic driver and releases its resources. | |
virtual void | RemoveView (const Handle< Graphic3d_CView > &theView) override |
Removes view from graphic driver and releases its resources. | |
virtual Handle< OpenGl_Window > | CreateRenderWindow (const Handle< Aspect_Window > &theNativeWindow, const Handle< Aspect_Window > &theSizeWindow, const Aspect_RenderingContext theContext) |
Create OpenGL window from native window. | |
void | TextSize (const Handle< Graphic3d_CView > &theView, const Standard_CString theText, const Standard_ShortReal theHeight, Standard_ShortReal &theWidth, Standard_ShortReal &theAscent, Standard_ShortReal &theDescent) const override |
Computes text width. | |
Standard_ShortReal | DefaultTextHeight () const override |
Standard_Boolean | ViewExists (const Handle< Aspect_Window > &theWindow, Handle< Graphic3d_CView > &theView) override |
Returns view associated with the window if it is exists and is activated. Returns Standard_True if the view associated to the window exists. | |
virtual void | InsertLayerBefore (const Graphic3d_ZLayerId theNewLayerId, const Graphic3d_ZLayerSettings &theSettings, const Graphic3d_ZLayerId theLayerAfter) override |
Adds a layer to all views. | |
virtual void | InsertLayerAfter (const Graphic3d_ZLayerId theNewLayerId, const Graphic3d_ZLayerSettings &theSettings, const Graphic3d_ZLayerId theLayerBefore) override |
Adds a layer to all views. | |
void | RemoveZLayer (const Graphic3d_ZLayerId theLayerId) override |
Removes Z layer. All structures displayed at the moment in layer will be displayed in default layer (the bottom-level z layer). By default, there are always default bottom-level layer that can't be removed. The passed theLayerId should be not less than 0 (reserved for default layers that can not be removed). | |
void | SetZLayerSettings (const Graphic3d_ZLayerId theLayerId, const Graphic3d_ZLayerSettings &theSettings) override |
Sets the settings for a single Z layer. | |
const OpenGl_Caps & | Options () const |
OpenGl_Caps & | ChangeOptions () |
void | SetBuffersNoSwap (const Standard_Boolean theIsNoSwap) |
Specify swap buffer behavior. | |
virtual void | EnableVBO (const Standard_Boolean theToTurnOn) override |
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! | |
virtual bool | IsVerticalSync () const override |
Returns TRUE if vertical synchronization with display refresh rate (VSync) should be used; TRUE by default. | |
virtual void | SetVerticalSync (bool theToEnable) override |
Set if vertical synchronization with display refresh rate (VSync) should be used. | |
Standard_Boolean | MemoryInfo (Standard_Size &theFreeBytes, TCollection_AsciiString &theInfo) const override |
Returns information about GPU memory usage. Please read OpenGl_Context::MemoryInfo() for more description. | |
const Handle< OpenGl_Context > & | GetSharedContext (bool theBound=false) const |
Method to retrieve valid GL context. Could return NULL-handle if no window created by this driver. | |
Aspect_Display | getRawGlDisplay () const |
Aspect_RenderingContext | getRawGlContext () const |
void * | getRawGlConfig () const |
void | setDeviceLost () |
Set device lost flag for redrawn views. | |
OpenGl_StateCounter * | GetStateCounter () const |
State counter for OpenGl structures. | |
Standard_Size | GetNextPrimitiveArrayUID () const |
Returns unique ID for primitive arrays. | |
Public Member Functions inherited from Graphic3d_GraphicDriver | |
Standard_Integer | InquireLightLimit () const |
Request maximum number of active light sources supported by driver and hardware. | |
Standard_Integer | InquirePlaneLimit () const |
Request maximum number of active clipping planes supported by driver and hardware. | |
Standard_Integer | InquireViewLimit () const |
Request maximum number of views supported by driver. | |
virtual void | ZLayers (TColStd_SequenceOfInteger &theLayerSeq) const |
Returns list of Z layers defined for the graphical driver. | |
virtual const Graphic3d_ZLayerSettings & | ZLayerSettings (const Graphic3d_ZLayerId theLayerId) const |
Returns the settings of a single Z layer. | |
const Handle< Aspect_DisplayConnection > & | GetDisplayConnection () const |
returns Handle to display connection | |
Standard_Integer | NewIdentification () |
Returns a new identification number for a new structure. | |
void | RemoveIdentification (const Standard_Integer theId) |
Frees the identifier of a structure. | |
void | DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const |
Dumps the content of me into the stream. | |
Public Member Functions inherited from Standard_Transient | |
Standard_Transient () | |
Empty constructor. | |
Standard_Transient (const Standard_Transient &) | |
Copy constructor – does nothing. | |
Standard_Transient & | operator= (const Standard_Transient &) |
Assignment operator, needed to avoid copying reference counter. | |
virtual | ~Standard_Transient () |
Destructor must be virtual. | |
virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
Returns a type descriptor about this object. | |
Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
Returns a true value if this is an instance of Type. | |
Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
Returns a true value if this is an instance of TypeName. | |
Standard_Boolean | IsKind (const opencascade::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. | |
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. | |
Standard_Transient * | This () const |
Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. | |
Standard_Integer | GetRefCount () const noexcept |
Get the reference counter of this object. | |
void | IncrementRefCounter () noexcept |
Increments the reference counter of this object. | |
Standard_Integer | DecrementRefCounter () noexcept |
Decrements the reference counter of this object; returns the decremented value. | |
virtual void | Delete () const |
Memory deallocator for transient classes. | |
Additional Inherited Members | |
Public Types inherited from Standard_Transient | |
typedef void | base_type |
Returns a type descriptor about this object. | |
Static Public Member Functions inherited from Standard_Transient | |
static constexpr const char * | get_type_name () |
Returns a type descriptor about this object. | |
static const opencascade::handle< Standard_Type > & | get_type_descriptor () |
Returns type descriptor of Standard_Transient class. | |
Protected Member Functions inherited from OpenGl_GraphicDriver | |
void | chooseVisualInfo () |
Choose default visual for new windows created by Aspect_DisplayConnection. | |
Protected Member Functions inherited from Graphic3d_GraphicDriver | |
Graphic3d_GraphicDriver (const Handle< Aspect_DisplayConnection > &theDisp) | |
Initializes the Driver. | |
Protected Attributes inherited from OpenGl_GraphicDriver | |
Standard_Boolean | myIsOwnContext |
indicates that shared context has been created within OpenGl_GraphicDriver | |
Aspect_Display | myEglDisplay |
EGL connection to the Display : EGLDisplay. | |
Aspect_RenderingContext | myEglContext |
EGL rendering context : EGLContext. | |
void * | myEglConfig |
EGL configuration : EGLConfig. | |
Handle< OpenGl_Caps > | myCaps |
NCollection_Map< Handle< OpenGl_View > > | myMapOfView |
NCollection_DataMap< Standard_Integer, OpenGl_Structure * > | myMapOfStructure |
OpenGl_StateCounter | myStateCounter |
State counter for OpenGl structures. | |
OpenGl_StateCounter | myUIDGenerator |
Unique ID counter for primitive arrays. | |
Protected Attributes inherited from Graphic3d_GraphicDriver | |
Handle< Aspect_DisplayConnection > | myDisplayConnection |
Aspect_GenId | myStructGenId |
NCollection_List< Handle< Graphic3d_Layer > > | myLayers |
NCollection_DataMap< Graphic3d_ZLayerId, Handle< Graphic3d_Layer > > | myLayerIds |
This class defines D3D host for an OpenGl graphic driver.
D3DHost_GraphicDriver::D3DHost_GraphicDriver | ( | ) |
Constructor.
|
virtual |
Destructor.
|
overridevirtual |
Create instance of D3D host view.
Reimplemented from OpenGl_GraphicDriver.