LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
LibCarna::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.hpp>

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

Public Member Functions

 QGLContextAdapter ()
 Creates GLContext wrapper for the current QGLContext object.
 
- Public Member Functions inherited from LibCarna::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.
 
const ShaderProgramshader () const
 References the shader set last.
 
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 LibCarna::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 LibCarna::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 LibCarna::base::GLContext
const bool isDoubleBuffered
 Tells whether the represented OpenGL context uses double buffering.
 
- Static Public Attributes inherited from LibCarna::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 LibCarna::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>
Represents an association.
Wraps and represents an OpenGL context.
Definition GLContext.hpp:66
Author
Leonid Kostrykin

Definition at line 176 of file GLContext.hpp.

Constructor & Destructor Documentation

◆ QGLContextAdapter()

Creates GLContext wrapper for the current QGLContext object.

Definition at line 201 of file GLContext.hpp.

Member Function Documentation

◆ activate()

void LibCarna::base::QGLContextAdapter< QGLContext, QGLFormat >::activate ( ) const
overrideprotectedvirtual

Activates the OpenGL context represented by this object.

Implements LibCarna::base::GLContext.

Definition at line 234 of file GLContext.hpp.

◆ desiredFormat()

Holds the recommended format that shall be used to create a QGLContext.

Definition at line 224 of file GLContext.hpp.


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