Duckcpp 2.1.0
Duckcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
dcpp::video::IContextManager Class Referenceabstract
Inheritance diagram for dcpp::video::IContextManager:
Inheritance graph
Collaboration diagram for dcpp::video::IContextManager:
Collaboration graph

Public Member Functions

virtual bool initialize (const SDuckcppCreationParameters &params, const SExposedVideoData &data)=0
 Initialize manager with device creation parameters and device window (passed as exposed video data)
 
virtual void terminate ()=0
 Terminate manager, any cleanup that is left over. Manager needs a new initialize to be usable again.
 
virtual bool generateSurface ()=0
 Create surface based on current window set.
 
virtual void destroySurface ()=0
 Destroy current surface.
 
virtual bool generateContext ()=0
 Create context based on current surface.
 
virtual void destroyContext ()=0
 Destroy current context.
 
virtual const SExposedVideoDatagetContext () const =0
 Get current context.
 
virtual bool activateContext (const SExposedVideoData &videoData, bool restorePrimaryOnZero=false)=0
 Change render context, disable old and activate new defined by videoData.
 
virtual bool swapBuffers ()=0
 Swap buffers.
 
- Public Member Functions inherited from dcpp::IReferenceCounted
 IReferenceCounted ()
 Constructor.
 
virtual ~IReferenceCounted ()
 Destructor.
 
void grab () const
 Grabs the object. Increments the reference counter by one.
 
bool drop () const
 Drops the object. Decrements the reference counter by one.
 
dcpp::int32_kt getReferenceCount () const
 Get the reference count.
 
const dcpp::char_ktgetDebugName () const
 Returns the debug name of the object.
 

Additional Inherited Members

- Protected Member Functions inherited from dcpp::IReferenceCounted
void setDebugName (const dcpp::char_kt *newName)
 Sets the debug name of the object.
 

Member Function Documentation

◆ activateContext()

virtual bool dcpp::video::IContextManager::activateContext ( const SExposedVideoData videoData,
bool  restorePrimaryOnZero = false 
)
pure virtual

Change render context, disable old and activate new defined by videoData.

This is mostly used internally by IVideoDriver::beginScene(). But if you want to switch threads which access your OpenGL driver you will have to call this function as follows: Old thread gives up context with: activateContext(dcpp::video::SExposedVideoData()); New thread takes over context with: activateContext(videoDriver->getExposedVideoData()); Note that only 1 thread at a time may access an OpenGL context.


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

Duckcpp    @cppfx.xyz