OGRE  1.10.5
Object-Oriented Graphics Rendering Engine
Ogre::GLContext Class Referenceabstract

Class that encapsulates an GL context. More...

#include <OgreGLContext.h>

+ Inheritance diagram for Ogre::GLContext:

Public Member Functions

 GLContext ()
 
virtual ~GLContext ()
 
virtual void barrier ()
 Sequence gl commands enqueued in current context to be completed before commands that would be enqueued by other contexts after this moment, does not wait for completion. More...
 
virtual GLContextclone () const =0
 Create a new context based on the same window/pbuffer as this context - mostly useful for additional threads. More...
 
virtual void endCurrent ()=0
 This is called before another context is made current. More...
 
bool getInitialized ()
 
virtual void releaseContext ()
 Release the render context. More...
 
virtual void setCurrent ()=0
 Enable the context. More...
 
void setInitialized ()
 

Detailed Description

Class that encapsulates an GL context.

(IE a window/pbuffer). This is a virtual base class which should be implemented in a GLSupport. This object can also be used to cache renderstate if we decide to do so in the future.

Constructor & Destructor Documentation

◆ GLContext()

Ogre::GLContext::GLContext ( )
inline

◆ ~GLContext()

virtual Ogre::GLContext::~GLContext ( )
inlinevirtual

Member Function Documentation

◆ barrier()

virtual void Ogre::GLContext::barrier ( )
inlinevirtual

Sequence gl commands enqueued in current context to be completed before commands that would be enqueued by other contexts after this moment, does not wait for completion.

This ensures for example that resources created in the current context would be available in other shared contexts. Implementation could flush commands from per-context CPU queue to single GPU queue, use glFenceSync/glWaitSync, eglWaitClient or any other mechanism to accomplish the goal.

◆ setCurrent()

virtual void Ogre::GLContext::setCurrent ( )
pure virtual

Enable the context.

All subsequent rendering commands will go here.

Implemented in Ogre::NaClGLContext.

◆ endCurrent()

virtual void Ogre::GLContext::endCurrent ( )
pure virtual

This is called before another context is made current.

By default, nothing is done here.

Implemented in Ogre::NaClGLContext.

◆ getInitialized()

bool Ogre::GLContext::getInitialized ( )
inline

◆ setInitialized()

void Ogre::GLContext::setInitialized ( )
inline

◆ clone()

virtual GLContext* Ogre::GLContext::clone ( ) const
pure virtual

Create a new context based on the same window/pbuffer as this context - mostly useful for additional threads.

Note
The caller is responsible for deleting the returned context.

Implemented in Ogre::NaClGLContext.

◆ releaseContext()

virtual void Ogre::GLContext::releaseContext ( )
inlinevirtual

Release the render context.


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