Blender
V3.3
|
#include <GHOST_Context.h>
Public Member Functions | |
GHOST_Context (bool stereoVisual) | |
virtual | ~GHOST_Context () |
virtual GHOST_TSuccess | swapBuffers ()=0 |
virtual GHOST_TSuccess | activateDrawingContext ()=0 |
virtual GHOST_TSuccess | releaseDrawingContext ()=0 |
virtual GHOST_TSuccess | initializeDrawingContext ()=0 |
virtual GHOST_TSuccess | updateDrawingContext () |
virtual GHOST_TSuccess | releaseNativeHandles ()=0 |
virtual GHOST_TSuccess | setSwapInterval (int) |
virtual GHOST_TSuccess | getSwapInterval (int &) |
void * | getUserData () |
void | setUserData (void *user_data) |
bool | isStereoVisual () const |
virtual bool | isUpsideDown () const |
virtual unsigned int | getDefaultFramebuffer () |
![]() | |
virtual | ~GHOST_IContext () |
Protected Member Functions | |
void | initContextGLEW () |
Static Protected Member Functions | |
static void | initClearGL () |
Protected Attributes | |
bool | m_stereoVisual |
void * | m_user_data = nullptr |
Definition at line 18 of file GHOST_Context.h.
|
inline |
Constructor.
stereoVisual | Stereo visual for quad buffered stereo. |
Definition at line 24 of file GHOST_Context.h.
|
inlinevirtual |
Destructor.
Definition at line 31 of file GHOST_Context.h.
|
pure virtual |
Activates the drawing context of this window.
Implements GHOST_IContext.
Implemented in GHOST_ContextWGL, GHOST_ContextSDL, GHOST_ContextNone, GHOST_ContextGLX, GHOST_ContextEGL, GHOST_ContextD3D, and GHOST_ContextCGL.
Referenced by GHOST_Window::activateDrawingContext().
|
inlinevirtual |
Gets the OpenGL frame-buffer associated with the OpenGL context
Implements GHOST_IContext.
Reimplemented in GHOST_ContextD3D, and GHOST_ContextCGL.
Definition at line 133 of file GHOST_Context.h.
Referenced by GHOST_Window::getDefaultFramebuffer().
|
inlinevirtual |
Gets the current swap interval for swapBuffers.
intervalOut | Variable to store the swap interval if it can be read. |
Reimplemented in GHOST_ContextWGL, GHOST_ContextSDL, GHOST_ContextNone, GHOST_ContextGLX, GHOST_ContextEGL, GHOST_ContextD3D, and GHOST_ContextCGL.
Definition at line 90 of file GHOST_Context.h.
References GHOST_kFailure.
Referenced by GHOST_Window::getSwapInterval().
|
inline |
|
staticprotected |
|
protected |
Definition at line 125 of file GHOST_Context.cpp.
References GLEW_CHK.
Referenced by GHOST_ContextCGL::initializeDrawingContext(), GHOST_ContextEGL::initializeDrawingContext(), GHOST_ContextSDL::initializeDrawingContext(), and GHOST_ContextWGL::initializeDrawingContext().
|
pure virtual |
Call immediately after new to initialize. If this fails then immediately delete the object.
Implemented in GHOST_ContextWGL, GHOST_ContextSDL, GHOST_ContextNone, GHOST_ContextGLX, GHOST_ContextEGL, GHOST_ContextD3D, and GHOST_ContextCGL.
|
inline |
Stereo visual created. Only necessary for 'real' stereo support, ie quad buffered stereo. This is not always possible, depends on the graphics h/w
Definition at line 116 of file GHOST_Context.h.
References m_stereoVisual.
|
inlinevirtual |
Returns if the context is rendered upside down compared to OpenGL.
Reimplemented in GHOST_ContextD3D.
Definition at line 124 of file GHOST_Context.h.
Referenced by GHOST_XrGraphicsBindingOpenGL::needsUpsideDownDrawing().
|
pure virtual |
Release the drawing context of the calling thread.
Implements GHOST_IContext.
Implemented in GHOST_ContextWGL, GHOST_ContextSDL, GHOST_ContextNone, GHOST_ContextGLX, GHOST_ContextEGL, GHOST_ContextD3D, and GHOST_ContextCGL.
|
pure virtual |
Checks if it is OK for a remove the native display
Implemented in GHOST_ContextWGL, GHOST_ContextSDL, GHOST_ContextNone, GHOST_ContextGLX, GHOST_ContextEGL, GHOST_ContextD3D, and GHOST_ContextCGL.
Referenced by GHOST_Window::releaseNativeHandles().
|
inlinevirtual |
Sets the swap interval for swapBuffers.
interval | The swap interval to use. |
Reimplemented in GHOST_ContextD3D, GHOST_ContextWGL, GHOST_ContextSDL, GHOST_ContextNone, GHOST_ContextGLX, GHOST_ContextEGL, and GHOST_ContextCGL.
Definition at line 80 of file GHOST_Context.h.
References GHOST_kFailure.
Referenced by GHOST_Window::setSwapInterval().
Set user data (intended for the caller to use as needed).
Definition at line 106 of file GHOST_Context.h.
References m_user_data, and user_data.
|
pure virtual |
Swaps front and back buffers of a window.
Implements GHOST_IContext.
Implemented in GHOST_ContextWGL, GHOST_ContextSDL, GHOST_ContextNone, GHOST_ContextGLX, GHOST_ContextEGL, GHOST_ContextD3D, and GHOST_ContextCGL.
Referenced by GHOST_Window::swapBuffers().
|
inlinevirtual |
Updates the drawing context of this window. Needed whenever the window is changed.
Reimplemented in GHOST_ContextNone, GHOST_ContextD3D, and GHOST_ContextCGL.
Definition at line 64 of file GHOST_Context.h.
References GHOST_kFailure.
Referenced by GHOST_Window::updateDrawingContext().
|
protected |
Definition at line 141 of file GHOST_Context.h.
Referenced by GHOST_ContextCGL::initializeDrawingContext(), GHOST_ContextEGL::initializeDrawingContext(), GHOST_ContextGLX::initializeDrawingContext(), GHOST_ContextSDL::initializeDrawingContext(), GHOST_ContextWGL::initializeDrawingContext(), and isStereoVisual().
|
protected |
Caller specified, not for internal use.
Definition at line 144 of file GHOST_Context.h.
Referenced by getUserData(), and setUserData().