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

Public Member Functions

virtual bool initialize (const SJimcppCreationParameters &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 jpp::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.
 
s32 getReferenceCount () const
 Get the reference count.
 
const c8getDebugName () const
 Returns the debug name of the object.
 

Additional Inherited Members

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

Member Function Documentation

◆ activateContext()

virtual bool jpp::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(jpp::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:

Jimcpp    @cppfx.xyz

K