Carna
Version 3.3.2
|
If you're using Qt, this class template implements the abstract GLContext class as an adapter to the QGLContext
class from Qt.
More...
#include <GLContext.h>
Public Member Functions | |
QGLContextAdapter () | |
Creates GLContext wrapper for the current QGLContext object. | |
![]() | |
virtual | ~GLContext () |
Deletes. | |
void | makeCurrent () const |
Makes the OpenGL context represented by this object the current one. | |
bool | isCurrent () const |
Tells whether the OpenGL context represented by this object is the current one. | |
void | setShader (const ShaderProgram &shader) |
Makes shader the current shader of the represented OpenGL context. More... | |
const ShaderProgram & | shader () const |
References the shader set last. More... | |
void | clearBuffers (unsigned int flags) |
Wraps glClear . Automatically enables on glDepthMask temporarily if the DEPTH_BUFFER_BIT is supplied. | |
Static Public Member Functions | |
static QGLFormat | desiredFormat () |
Holds the recommended format that shall be used to create a QGLContext . | |
![]() | |
static GLContext & | current () |
References the current OpenGL context wrapper. | |
Protected Member Functions | |
virtual void | activate () const override |
Activates the OpenGL context represented by this object. | |
![]() | |
GLContext (bool isDoubleBuffered) | |
Instantiates GLContext that represents the current OpenGL context. | |
void | pushRenderState (const RenderState &rs) |
Makes rs the current render state. | |
void | popRenderState () |
Restores previous render state. | |
const RenderState & | currentRenderState () const |
References the latest render state. | |
Additional Inherited Members | |
![]() | |
const bool | isDoubleBuffered |
Tells whether the represented OpenGL context uses double buffering. | |
![]() | |
static const unsigned int | DEPTH_BUFFER_BIT |
Wraps GL_DEPTH_BUFFER_BIT . | |
static const unsigned int | COLOR_BUFFER_BIT |
Wraps GL_COLOR_BUFFER_BIT | |
If you're using Qt, this class template implements the abstract GLContext class as an adapter to the QGLContext
class from Qt.
Example:
Definition at line 174 of file GLContext.h.
Documentation generated by Doxygen