Carna  Version 3.3.2
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Carna::base::QGLContextAdapter< QGLContext, QGLFormat > Class Template Reference

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>

+ Inheritance diagram for Carna::base::QGLContextAdapter< QGLContext, QGLFormat >:
+ Collaboration diagram for Carna::base::QGLContextAdapter< QGLContext, QGLFormat >:

Public Member Functions

 QGLContextAdapter ()
 Creates GLContext wrapper for the current QGLContext object.
 
- Public Member Functions inherited from Carna::base::GLContext
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 ShaderProgramshader () 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 Public Member Functions inherited from Carna::base::GLContext
static GLContextcurrent ()
 References the current OpenGL context wrapper.
 

Protected Member Functions

virtual void activate () const override
 Activates the OpenGL context represented by this object.
 
- Protected Member Functions inherited from Carna::base::GLContext
 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 RenderStatecurrentRenderState () const
 References the latest render state.
 

Additional Inherited Members

- Public Attributes inherited from Carna::base::GLContext
const bool isDoubleBuffered
 Tells whether the represented OpenGL context uses double buffering.
 
- Static Public Attributes inherited from Carna::base::GLContext
static const unsigned int DEPTH_BUFFER_BIT
 Wraps GL_DEPTH_BUFFER_BIT.
 
static const unsigned int COLOR_BUFFER_BIT
 Wraps GL_COLOR_BUFFER_BIT
 

Detailed Description

template<typename QGLContext, typename QGLFormat>
class Carna::base::QGLContextAdapter< QGLContext, QGLFormat >

If you're using Qt, this class template implements the abstract GLContext class as an adapter to the QGLContext class from Qt.

Example:

#include <QGLContext>
#include <QGLFormat>
Author
Leonid Kostrykin
Date
22.2.15 - 20.3.15

Definition at line 174 of file GLContext.h.


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