Blender  V2.93
Public Member Functions | List of all members
GHOST_ContextSDL Class Reference

#include <GHOST_ContextSDL.h>

Inherits GHOST_Context.

Public Member Functions

 GHOST_ContextSDL (bool stereoVisual, SDL_Window *window, int contextProfileMask, int contextMajorVersion, int contextMinorVersion, int contextFlags, int contextResetNotificationStrategy)
 
 ~GHOST_ContextSDL ()
 
GHOST_TSuccess swapBuffers ()
 
GHOST_TSuccess activateDrawingContext ()
 
GHOST_TSuccess releaseDrawingContext ()
 
GHOST_TSuccess initializeDrawingContext ()
 
GHOST_TSuccess releaseNativeHandles ()
 
GHOST_TSuccess setSwapInterval (int interval)
 
GHOST_TSuccess getSwapInterval (int &intervalOut)
 
- Public Member Functions inherited from GHOST_Context
 GHOST_Context (bool stereoVisual)
 
virtual ~GHOST_Context ()
 
virtual GHOST_TSuccess updateDrawingContext ()
 
bool isStereoVisual () const
 
virtual bool isUpsideDown () const
 
virtual unsigned int getDefaultFramebuffer ()
 
- Public Member Functions inherited from GHOST_IContext
virtual ~GHOST_IContext ()
 

Additional Inherited Members

- Protected Member Functions inherited from GHOST_Context
void initContextGLEW ()
 
- Static Protected Member Functions inherited from GHOST_Context
static void initClearGL ()
 
- Protected Attributes inherited from GHOST_Context
bool m_stereoVisual
 

Detailed Description

Definition at line 44 of file GHOST_ContextSDL.h.

Constructor & Destructor Documentation

◆ GHOST_ContextSDL()

GHOST_ContextSDL::GHOST_ContextSDL ( bool  stereoVisual,
SDL_Window *  window,
int  contextProfileMask,
int  contextMajorVersion,
int  contextMinorVersion,
int  contextFlags,
int  contextResetNotificationStrategy 
)

Constructor.

Definition at line 37 of file GHOST_ContextSDL.cpp.

◆ ~GHOST_ContextSDL()

GHOST_ContextSDL::~GHOST_ContextSDL ( )

Destructor.

Definition at line 57 of file GHOST_ContextSDL.cpp.

References NULL.

Member Function Documentation

◆ activateDrawingContext()

GHOST_TSuccess GHOST_ContextSDL::activateDrawingContext ( )
virtual

Activates the drawing context of this window.

Returns
A boolean success indicator.

Implements GHOST_Context.

Definition at line 86 of file GHOST_ContextSDL.cpp.

References GHOST_kFailure, and GHOST_kSuccess.

◆ getSwapInterval()

GHOST_TSuccess GHOST_ContextSDL::getSwapInterval ( int &  intervalOut)
virtual

Gets the current swap interval for swapBuffers.

Parameters
intervalOutVariable 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 189 of file GHOST_ContextSDL.cpp.

References GHOST_kSuccess.

◆ initializeDrawingContext()

GHOST_TSuccess GHOST_ContextSDL::initializeDrawingContext ( )
virtual

Call immediately after new to initialize. If this fails then immediately delete the object.

Returns
Indication as to whether initialization has succeeded.

Implements GHOST_Context.

Definition at line 107 of file GHOST_ContextSDL.cpp.

References GHOST_kFailure, GHOST_kSuccess, GHOST_Context::initClearGL(), GHOST_Context::initContextGLEW(), GHOST_Context::m_stereoVisual, and NULL.

◆ releaseDrawingContext()

GHOST_TSuccess GHOST_ContextSDL::releaseDrawingContext ( )
virtual

Release the drawing context of the calling thread.

Returns
A boolean success indicator.

Implements GHOST_Context.

Definition at line 96 of file GHOST_ContextSDL.cpp.

References GHOST_kFailure, GHOST_kSuccess, and NULL.

◆ releaseNativeHandles()

GHOST_TSuccess GHOST_ContextSDL::releaseNativeHandles ( )
virtual

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 172 of file GHOST_ContextSDL.cpp.

References GHOST_kSuccess, and NULL.

◆ setSwapInterval()

GHOST_TSuccess GHOST_ContextSDL::setSwapInterval ( int  interval)
virtual

Sets the swap interval for swapBuffers.

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

Reimplemented from GHOST_Context.

Definition at line 179 of file GHOST_ContextSDL.cpp.

References GHOST_kFailure, and GHOST_kSuccess.

◆ swapBuffers()

GHOST_TSuccess GHOST_ContextSDL::swapBuffers ( )
virtual

Swaps front and back buffers of a window.

Returns
A boolean success indicator.

Implements GHOST_Context.

Definition at line 79 of file GHOST_ContextSDL.cpp.

References GHOST_kSuccess.


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