Class that encapsulates an GL context.
More...
#include <OgreGLContext.h>
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.
◆ GLContext()
Ogre::GLContext::GLContext |
( |
| ) |
|
|
inline |
◆ ~GLContext()
virtual Ogre::GLContext::~GLContext |
( |
| ) |
|
|
inlinevirtual |
◆ 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: