C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
OpenGLContextInterface class presents own OpenGL context allowing to render OpenGL in a system window. More...
#include <vsn_openglcontextinterface.h>
Public Member Functions | |
virtual | ~OpenGLContextInterface () |
Destructor. | |
virtual bool | MakeCurrent () |
Makes the current context of the specified surface. Returns true if successfully. | |
virtual bool | MakeCurrent (RenderingArea *pFrame) |
Makes the current context of the specified surface. Returns true if successfully. | |
virtual void | DoneCurrent () |
Function for comfort makes makeCurrent call with null surface. | |
virtual void | SwapBuffers () |
Swaps the forward and back buffers of the specified surface. | |
virtual void | SwapBuffers (RenderingArea *pFrame) |
Swaps the forward and back buffers of the specified surface. | |
virtual RenderingAreaFormat | GetFormat () const |
Returns context format if context was created with Create() function. | |
virtual void | SetFormat (const RenderingAreaFormat &format) |
Sets context format if context was created with Create() function. | |
virtual OpenGLFunctionListInterface * | GetFunctionList () const =0 |
It's an overloaded function. Returns pointer to the specified function. | |
virtual OpenGLExtraFunctionListInterface * | GetExtraFunctionList () const =0 |
Returns additional OpenGLExFunctionList instance for this context. | |
virtual FunctionPtr | GetProcAddress (const std::string &procName) const =0 |
It's an overloaded function. Returns pointer to the specified function. | |
virtual bool | IsValid () const =0 |
Returns true if this context is valid, i.e. it was successfully created. | |
virtual bool | HasExtension (const String &extension) const =0 |
virtual uint | GetDefaultFrameBufferObject () const =0 |
Returns the default framebuffer object for the current surface. | |
virtual RenderingArea * | GetSurface () const |
Returns pointer to screen for rendering OpenGL. | |
virtual OpenGLContextContainer * | GetContextContainer () const =0 |
Returns list of extended contexts of this context. | |
virtual bool | IsOpenGLES () const =0 |
Returns true if context is OpenGL ES context. | |
virtual bool | IsSharing () const |
Returns true if context shares with other GL contexts. | |
bool | IsSupportExtansion (const std::string &name) const |
Checks if device supports a concrete extension. | |
bool | IsAllowLighting () const |
If lighting is allowed. | |
Static Public Member Functions | |
static OpenGLContextInterface * | CreateOpenGLContext (const RenderingAreaFormat &format) |
Creates OpenGL context and returns pointer to its interface. | |
static OpenGLFunctionListInterface * | Gl () |
Returns a function list of the current context. | |
static bool | IsSame (const OpenGLContextInterface *pFirst, const OpenGLContextInterface *pSecond) |
If the same. | |
static OpenGLContextInterface * | GetCurrentContext () |
Returns last context that was set when calling MakeCurrent function or 0, if context is not set. | |
Protected Member Functions | |
OpenGLContextInterface () | |
Default constructor. | |
OpenGLContextInterface class presents own OpenGL context allowing to render OpenGL in a system window.
OpenGLContextInterface class presents OpenGL state for the basic OpenGL context. To create context, use CreateOpenGLContext function. Use returnable value IsValid() to check if context was successfully created. To set an activity mode of context, call MakeCurrent function. To update OpenGL frame, it's necessary to call SwapBuffers, what will lead to swapping the back and forward buffer for the next content visualization. Don't forget to make MakeCurrent call before starting a rendering after every calling SwapBuffers.