|
Blender V4.3
|
#include <GHOST_Context.hh>
Inherits GHOST_IContext.
Inherited by GHOST_ContextCGL, GHOST_ContextD3D, GHOST_ContextEGL, GHOST_ContextGLX, GHOST_ContextNone, GHOST_ContextSDL, GHOST_ContextVK, and GHOST_ContextWGL.
Public Member Functions | |
| GHOST_Context (bool stereoVisual) | |
| virtual | ~GHOST_Context () |
| virtual GHOST_TSuccess | swapBuffers () override=0 |
| virtual GHOST_TSuccess | activateDrawingContext () override=0 |
| virtual GHOST_TSuccess | releaseDrawingContext () override=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 () override |
Public Member Functions inherited from GHOST_IContext | |
| virtual | ~GHOST_IContext () |
Protected Attributes | |
| bool | m_stereoVisual |
| void * | m_user_data = nullptr |
Definition at line 17 of file GHOST_Context.hh.
|
inline |
Constructor.
| stereoVisual | Stereo visual for quad buffered stereo. |
Definition at line 23 of file GHOST_Context.hh.
|
inlinevirtual |
Destructor.
Definition at line 28 of file GHOST_Context.hh.
|
overridepure virtual |
Activates the drawing context of this window.
Implements GHOST_IContext.
Implemented in GHOST_ContextCGL, GHOST_ContextD3D, GHOST_ContextEGL, GHOST_ContextGLX, GHOST_ContextNone, GHOST_ContextSDL, GHOST_ContextVK, and GHOST_ContextWGL.
Referenced by GHOST_Window::activateDrawingContext().
|
inlineoverridevirtual |
Gets the OpenGL frame-buffer associated with the OpenGL context
Implements GHOST_IContext.
Reimplemented in GHOST_ContextCGL, and GHOST_ContextD3D.
Definition at line 128 of file GHOST_Context.hh.
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_ContextCGL, GHOST_ContextD3D, GHOST_ContextEGL, GHOST_ContextGLX, GHOST_ContextNone, GHOST_ContextSDL, GHOST_ContextVK, and GHOST_ContextWGL.
Definition at line 85 of file GHOST_Context.hh.
References GHOST_kFailure.
Referenced by GHOST_Window::getSwapInterval().
|
inline |
|
pure virtual |
Call immediately after new to initialize. If this fails then immediately delete the object.
Implemented in GHOST_ContextCGL, GHOST_ContextD3D, GHOST_ContextEGL, GHOST_ContextGLX, GHOST_ContextNone, GHOST_ContextSDL, GHOST_ContextVK, and GHOST_ContextWGL.
|
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 111 of file GHOST_Context.hh.
References m_stereoVisual.
|
inlinevirtual |
Returns if the context is rendered upside down compared to OpenGL.
Reimplemented in GHOST_ContextD3D.
Definition at line 119 of file GHOST_Context.hh.
Referenced by GHOST_XrGraphicsBindingOpenGL::needsUpsideDownDrawing().
|
overridepure virtual |
Release the drawing context of the calling thread.
Implements GHOST_IContext.
Implemented in GHOST_ContextCGL, GHOST_ContextD3D, GHOST_ContextEGL, GHOST_ContextGLX, GHOST_ContextNone, GHOST_ContextSDL, GHOST_ContextVK, and GHOST_ContextWGL.
|
pure virtual |
Checks if it is OK for a remove the native display
Implemented in GHOST_ContextCGL, GHOST_ContextD3D, GHOST_ContextEGL, GHOST_ContextGLX, GHOST_ContextNone, GHOST_ContextSDL, GHOST_ContextVK, and GHOST_ContextWGL.
Referenced by GHOST_Window::releaseNativeHandles().
|
inlinevirtual |
Sets the swap interval for swapBuffers.
| interval | The swap interval to use. |
Reimplemented in GHOST_ContextCGL, GHOST_ContextD3D, GHOST_ContextEGL, GHOST_ContextGLX, GHOST_ContextNone, GHOST_ContextSDL, GHOST_ContextVK, and GHOST_ContextWGL.
Definition at line 75 of file GHOST_Context.hh.
References GHOST_kFailure.
Referenced by GHOST_Window::setSwapInterval().
|
inline |
Set user data (intended for the caller to use as needed).
Definition at line 101 of file GHOST_Context.hh.
References m_user_data.
|
overridepure virtual |
Swaps front and back buffers of a window.
Implements GHOST_IContext.
Implemented in GHOST_ContextCGL, GHOST_ContextD3D, GHOST_ContextEGL, GHOST_ContextGLX, GHOST_ContextNone, GHOST_ContextSDL, GHOST_ContextVK, and GHOST_ContextWGL.
Referenced by GHOST_Window::swapBuffers().
|
inlinevirtual |
Updates the drawing context of this window. Needed whenever the window is changed.
Reimplemented in GHOST_ContextCGL, GHOST_ContextD3D, and GHOST_ContextNone.
Definition at line 59 of file GHOST_Context.hh.
References GHOST_kFailure.
Referenced by GHOST_Window::updateDrawingContext().
|
protected |
Definition at line 189 of file GHOST_Context.hh.
Referenced by GHOST_ContextEGL::initializeDrawingContext(), GHOST_ContextGLX::initializeDrawingContext(), GHOST_ContextSDL::initializeDrawingContext(), GHOST_ContextWGL::initializeDrawingContext(), and isStereoVisual().
|
protected |
Caller specified, not for internal use.
Definition at line 192 of file GHOST_Context.hh.
Referenced by getUserData(), and setUserData().