A library used to initialize, create, and manage an OpenGL rendering context.
More...
#include <GOpenGLSurface.h>
A library used to initialize, create, and manage an OpenGL rendering context.
This library automates the creation of a standard OpenGL context, and is capable of accepting special requests that can guide the initialization to support requested options. GOpenGLSurface is a GListener, which allows it to receive events from a registered broadcaster and react accordingly.
◆ EnableSwapControl()
| virtual GReturn GW::GRAPHICS::GOpenGLSurface::EnableSwapControl |
( |
bool |
_setSwapControl | ) |
|
|
pure virtual |
Enables or disables v-synchronization in regards to buffer swapping.
- Parameters
-
| [in] | _toggle | Determines whether to enable or disable v-sync. |
- Return values
-
| SUCCESS | The appropriate function was called to enable v-sync. |
| FEATURE_UNSUPPORTED | The extension required to use this functionality was not supported. |
| FAILURE | No valid OpenGL context exists. |
◆ GetAspectRatio()
| virtual GReturn GW::GRAPHICS::GOpenGLSurface::GetAspectRatio |
( |
float & |
_outAspectRatio | ) |
|
|
pure virtual |
Returns the aspect ratio for the current window.
- Parameters
-
| [out] | _outRatio | Will contain the calculated aspect ratio. |
- Return values
-
| SUCCESS | The current aspect ratio was calculated and returned. |
| FAILURE | No active GWindow exists to calculate an aspect ratio from. |
◆ GetContext()
| virtual GReturn GW::GRAPHICS::GOpenGLSurface::GetContext |
( |
void ** |
_outContext | ) |
|
|
pure virtual |
Returns the current OpenGL context.
- Parameters
-
| [out] | _outContext | Will contain the address of the OpenGL context. |
- Return values
-
| SUCCESS | The existing OpenGL context was returned. |
| FAILURE | No OpenGL context exists to retrieve. |
◆ QueryExtensionFunction()
| virtual GReturn GW::GRAPHICS::GOpenGLSurface::QueryExtensionFunction |
( |
const char * |
_extension, |
|
|
const char * |
_funcName, |
|
|
void ** |
_outFuncAddress |
|
) |
| |
|
pure virtual |
Queries if a requested OpenGL extension or function is supported.
This funtion accepts either an OpenGL extension or OpenGL function (or both) and searches the total list of supported extensions (generated upon creation of the context) to see if that extension/function is supported. When a function name is queried, this function will return it's appropriate address if supported.
- Parameters
-
| [in] | _extension | The exact name of an OpenGL, WGL, or GLX extension. |
| [in] | _funcName | The exact name of an OpenGL, WGL, or GLX function. |
| [out] | _outFuncAddress | The address of a function pointer that matches the queried function (_funcName). |
- Return values
-
| SUCCESS | The extension/function is supported, and the address was returned successfully (if requested). |
| INVALID_ARGUMENT | This function was called with an incorrect set of parameters. |
| FAILURE | The requested extension/function is not supported. |
◆ UniversalSwapBuffers()
| virtual GReturn GW::GRAPHICS::GOpenGLSurface::UniversalSwapBuffers |
( |
| ) |
|
|
pure virtual |
Calls the appropriate method (depending on platform) to swap the front and back buffers.
- Return values
-
| SUCCESS | The front and back buffers were successfully swapped. |
| FAILURE | No valid OpenGL context exists to perform a buffer swap on. |
The documentation for this class was generated from the following file: