VVISF & VVGL
|
GLContext is an attempt to make a platform/SDK-agnostic representation of an OpenGL context. More...
#include <GLContext.hpp>
Public Member Functions | |
GLContextRef | newContextSharingMe () const |
Creates and returns a new OpenGL context in the same sharegroup as the receiver. | |
void | makeCurrent () |
Makes this GL context current. | |
void | makeCurrentIfNotCurrent () |
Makes this GL context current if it isn't already current. | |
void | makeCurrentIfNull () |
Makes this GL context current if no context is current. | |
bool | sameShareGroupAs (const GLContextRef &inCtx) |
Returns a true if the passed context is in the same sharegroup as the receiver. | |
Public Attributes | |
GLVersion | version = GLVersion_Unknown |
The version of OpenGL this context is using. | |
Related Functions | |
(Note that these are not member functions.) | |
using | GLContextRef = shared_ptr< GLContext > |
A GLContextRef is a shared pointer around a GLContext. | |
GLContextRef | CreateGLContextRefUsing (EGLDisplay inDisplay, EGLSurface inWinSurface, EGLContext inSharedCtx, EGLContext inCtx) |
Doesn't create any GL resources, just makes a new GLContext instance around the passed EGLContext. | |
GLContextRef | CreateNewGLContextRef (EGLDisplay inDisplay, EGLSurface inWinSurface, EGLContext inSharedCtx) |
Makes a new OpenGL context and GLContext instance. | |
GLContextRef | CreateNewGLContextRef () |
Creates a generic OpenGL context and GLContext instance using whatever the default settings are for this platform and SDK. | |
GLContext is an attempt to make a platform/SDK-agnostic representation of an OpenGL context.
GLContext is a OpenGL context- this class wraps up whatever the native object is for whatever platform/SDK you're compiling VVGL against, and presents a single standard interface across all platforms for the rest of VVGL and any libs that derive from it. You can create a GLContext around an existing platform-specific OpenGL context- which makes integration with existing codebases easy- or you can also create new OpenGL contexts by making a new instance of GLContext or using the newContextSharingMe() member function of an existing context. Has explicit support for sharing of multiple contexts so resources (textures, models, etc) can be shared between contexts.
Notes on use: