Blender V5.0
GHOST_IContext Class Referenceabstract

#include <GHOST_IContext.hh>

Inherited by GHOST_Context.

Public Member Functions

virtual ~GHOST_IContext ()=default
virtual GHOST_TSuccess activateDrawingContext ()=0
virtual GHOST_TSuccess releaseDrawingContext ()=0
virtual unsigned int getDefaultFramebuffer ()=0
virtual GHOST_TSuccess swapBufferAcquire ()=0
virtual GHOST_TSuccess swapBufferRelease ()=0

Static Public Member Functions

static GHOST_IContextgetActiveDrawingContext ()

Detailed Description

Interface for GHOST context.

You can create a off-screen context (windowless) with the system's GHOST_ISystem::createOffscreenContext method.

See also
GHOST_ISystem::createOffscreenContext

Definition at line 25 of file GHOST_IContext.hh.

Constructor & Destructor Documentation

◆ ~GHOST_IContext()

virtual GHOST_IContext::~GHOST_IContext ( )
virtualdefault

Destructor.

Member Function Documentation

◆ activateDrawingContext()

virtual GHOST_TSuccess GHOST_IContext::activateDrawingContext ( )
pure virtual

Activates the drawing context.

Returns
A boolean success indicator.

Implemented in GHOST_Context, GHOST_ContextD3D, GHOST_ContextEGL, GHOST_ContextGLX, GHOST_ContextMTL, GHOST_ContextNone, GHOST_ContextSDL, GHOST_ContextVK, and GHOST_ContextWGL.

◆ getActiveDrawingContext()

GHOST_IContext * GHOST_IContext::getActiveDrawingContext ( )
static

Returns the thread's currently active drawing context.

Definition at line 32 of file GHOST_Context.cc.

References GHOST_Context::getActiveDrawingContext().

Referenced by GHOST_GetActiveGPUContext().

◆ getDefaultFramebuffer()

virtual unsigned int GHOST_IContext::getDefaultFramebuffer ( )
pure virtual

Gets the OpenGL frame-buffer associated with the OpenGL context

Returns
The ID of an OpenGL frame-buffer object.

Implemented in GHOST_Context, GHOST_ContextD3D, and GHOST_ContextMTL.

◆ releaseDrawingContext()

virtual GHOST_TSuccess GHOST_IContext::releaseDrawingContext ( )
pure virtual

Release the drawing context of the calling thread.

Returns
A boolean success indicator.

Implemented in GHOST_Context, GHOST_ContextD3D, GHOST_ContextEGL, GHOST_ContextGLX, GHOST_ContextMTL, GHOST_ContextNone, GHOST_ContextSDL, GHOST_ContextVK, and GHOST_ContextWGL.

◆ swapBufferAcquire()

virtual GHOST_TSuccess GHOST_IContext::swapBufferAcquire ( )
pure virtual

Acquire next buffer for drawing.

Returns
A boolean success indicator.

Implemented in GHOST_Context, GHOST_ContextD3D, GHOST_ContextEGL, GHOST_ContextGLX, GHOST_ContextMTL, GHOST_ContextNone, GHOST_ContextSDL, GHOST_ContextVK, and GHOST_ContextWGL.

◆ swapBufferRelease()

virtual GHOST_TSuccess GHOST_IContext::swapBufferRelease ( )
pure virtual

Swaps front and back buffers of a window.

Returns
A boolean success indicator.

Implemented in GHOST_Context, GHOST_ContextD3D, GHOST_ContextEGL, GHOST_ContextGLX, GHOST_ContextMTL, GHOST_ContextNone, GHOST_ContextSDL, GHOST_ContextVK, and GHOST_ContextWGL.


The documentation for this class was generated from the following files: