Blender V5.0
GHOST_ContextWGL Class Reference

#include <GHOST_ContextWGL.hh>

Inherits GHOST_Context.

Public Member Functions

 GHOST_ContextWGL (const GHOST_ContextParams &context_params, bool alphaBackground, HWND hWnd, HDC hDC, int contextProfileMask, int contextMajorVersion, int contextMinorVersion, int contextFlags, int contextResetNotificationStrategy)
 ~GHOST_ContextWGL () override
GHOST_TSuccess swapBufferAcquire () override
GHOST_TSuccess swapBufferRelease () override
GHOST_TSuccess activateDrawingContext () override
GHOST_TSuccess releaseDrawingContext () override
GHOST_TSuccess initializeDrawingContext () override
GHOST_TSuccess releaseNativeHandles () override
GHOST_TSuccess setSwapInterval (int interval) override
GHOST_TSuccess getSwapInterval (int &interval_out) override
Public Member Functions inherited from GHOST_Context
 GHOST_Context (const GHOST_ContextParams &context_params)
 ~GHOST_Context () override
virtual GHOST_TSuccess updateDrawingContext ()
void * getUserData ()
void setUserData (void *user_data)
bool isStereoVisual () const
virtual GHOST_TVSyncModes getVSync ()
virtual bool isUpsideDown () const
unsigned int getDefaultFramebuffer () override
Public Member Functions inherited from GHOST_IContext
virtual ~GHOST_IContext ()=default

Friends

class GHOST_XrGraphicsBindingOpenGL

Additional Inherited Members

Static Public Member Functions inherited from GHOST_Context
static GHOST_ContextgetActiveDrawingContext ()
Static Public Member Functions inherited from GHOST_IContext
static GHOST_IContextgetActiveDrawingContext ()
Protected Attributes inherited from GHOST_Context
GHOST_ContextParams context_params_
void * user_data_ = nullptr
Static Protected Attributes inherited from GHOST_Context
static GHOST_Contextactive_context_

Detailed Description

Definition at line 19 of file GHOST_ContextWGL.hh.

Constructor & Destructor Documentation

◆ GHOST_ContextWGL()

GHOST_ContextWGL::GHOST_ContextWGL ( const GHOST_ContextParams & context_params,
bool alphaBackground,
HWND hWnd,
HDC hDC,
int contextProfileMask,
int contextMajorVersion,
int contextMinorVersion,
int contextFlags,
int contextResetNotificationStrategy )

Constructor.

Definition at line 28 of file GHOST_ContextWGL.cc.

References assert, GHOST_Context::GHOST_Context(), and nullptr.

◆ ~GHOST_ContextWGL()

GHOST_ContextWGL::~GHOST_ContextWGL ( )
override

Destructor.

Definition at line 57 of file GHOST_ContextWGL.cc.

References assert, and free().

Member Function Documentation

◆ activateDrawingContext()

GHOST_TSuccess GHOST_ContextWGL::activateDrawingContext ( )
overridevirtual

Activates the drawing context of this window.

Returns
A boolean success indicator.

Implements GHOST_Context.

Definition at line 112 of file GHOST_ContextWGL.cc.

References GHOST_Context::active_context_, GHOST_kFailure, and GHOST_kSuccess.

◆ getSwapInterval()

GHOST_TSuccess GHOST_ContextWGL::getSwapInterval ( int & interval_out)
overridevirtual

Gets the current swap interval for #swapBuffers.

Parameters
interval_outVariable to store the swap interval if it can be read.
Returns
Whether the swap interval can be read.

Reimplemented from GHOST_Context.

Definition at line 101 of file GHOST_ContextWGL.cc.

References GHOST_kFailure, and GHOST_kSuccess.

◆ initializeDrawingContext()

◆ releaseDrawingContext()

GHOST_TSuccess GHOST_ContextWGL::releaseDrawingContext ( )
overridevirtual

Release the drawing context of the calling thread.

Returns
A boolean success indicator.

Implements GHOST_Context.

Definition at line 123 of file GHOST_ContextWGL.cc.

References GHOST_Context::active_context_, GHOST_kFailure, and GHOST_kSuccess.

◆ releaseNativeHandles()

GHOST_TSuccess GHOST_ContextWGL::releaseNativeHandles ( )
overridevirtual

Removes references to native handles from this context and then returns

Returns
GHOST_kSuccess if it is OK for the parent to release the handles and GHOST_kFailure if releasing the handles will interfere with sharing

Implements GHOST_Context.

Definition at line 669 of file GHOST_ContextWGL.cc.

References GHOST_kFailure, and GHOST_kSuccess.

◆ setSwapInterval()

GHOST_TSuccess GHOST_ContextWGL::setSwapInterval ( int interval)
overridevirtual

Sets the swap interval for #swapBuffers.

Parameters
intervalThe swap interval to use.
Returns
A boolean success indicator.

Reimplemented from GHOST_Context.

Definition at line 91 of file GHOST_ContextWGL.cc.

References GHOST_kFailure, and GHOST_kSuccess.

Referenced by initializeDrawingContext().

◆ swapBufferAcquire()

GHOST_TSuccess GHOST_ContextWGL::swapBufferAcquire ( )
inlineoverridevirtual

Implements GHOST_Context.

Definition at line 43 of file GHOST_ContextWGL.hh.

References GHOST_kSuccess.

◆ swapBufferRelease()

GHOST_TSuccess GHOST_ContextWGL::swapBufferRelease ( )
overridevirtual

Swaps front and back buffers of a window.

Returns
A boolean success indicator.

Implements GHOST_Context.

Definition at line 86 of file GHOST_ContextWGL.cc.

References GHOST_kFailure, and GHOST_kSuccess.

◆ GHOST_XrGraphicsBindingOpenGL

friend class GHOST_XrGraphicsBindingOpenGL
friend

Definition at line 21 of file GHOST_ContextWGL.hh.

References GHOST_XrGraphicsBindingOpenGL.

Referenced by GHOST_XrGraphicsBindingOpenGL.


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