Blender  V3.3
Public Member Functions | Friends | List of all members
GHOST_ContextEGL Class Reference

#include <GHOST_ContextEGL.h>

Inheritance diagram for GHOST_ContextEGL:
GHOST_Context GHOST_IContext

Public Member Functions

 GHOST_ContextEGL (const GHOST_System *const system, bool stereoVisual, EGLNativeWindowType nativeWindow, EGLNativeDisplayType nativeDisplay, EGLint contextProfileMask, EGLint contextMajorVersion, EGLint contextMinorVersion, EGLint contextFlags, EGLint contextResetNotificationStrategy, EGLenum api)
 
 ~GHOST_ContextEGL ()
 
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)
 
EGLDisplay getDisplay () const
 
EGLConfig getConfig () const
 
EGLContext getContext () const
 
- Public Member Functions inherited from GHOST_Context
 GHOST_Context (bool stereoVisual)
 
virtual ~GHOST_Context ()
 
virtual GHOST_TSuccess updateDrawingContext ()
 
voidgetUserData ()
 
void setUserData (void *user_data)
 
bool isStereoVisual () const
 
virtual bool isUpsideDown () const
 
virtual unsigned int getDefaultFramebuffer ()
 
- Public Member Functions inherited from GHOST_IContext
virtual ~GHOST_IContext ()
 

Friends

class GHOST_XrGraphicsBindingOpenGL
 

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
 
voidm_user_data = nullptr
 

Detailed Description

Definition at line 23 of file GHOST_ContextEGL.h.

Constructor & Destructor Documentation

◆ GHOST_ContextEGL()

GHOST_ContextEGL::GHOST_ContextEGL ( const GHOST_System *const  system,
bool  stereoVisual,
EGLNativeWindowType  nativeWindow,
EGLNativeDisplayType  nativeDisplay,
EGLint  contextProfileMask,
EGLint  contextMajorVersion,
EGLint  contextMinorVersion,
EGLint  contextFlags,
EGLint  contextResetNotificationStrategy,
EGLenum  api 
)

Constructor.

Definition at line 194 of file GHOST_ContextEGL.cpp.

◆ ~GHOST_ContextEGL()

GHOST_ContextEGL::~GHOST_ContextEGL ( )

Destructor.

Definition at line 224 of file GHOST_ContextEGL.cpp.

References bindAPI(), and EGL_CHK.

Member Function Documentation

◆ activateDrawingContext()

GHOST_TSuccess GHOST_ContextEGL::activateDrawingContext ( )
virtual

Activates the drawing context of this window.

Returns
A boolean success indicator.

Implements GHOST_Context.

Definition at line 294 of file GHOST_ContextEGL.cpp.

References bindAPI(), EGL_CHK, GHOST_kFailure, and GHOST_kSuccess.

◆ getConfig()

EGLConfig GHOST_ContextEGL::getConfig ( ) const

◆ getContext()

EGLContext GHOST_ContextEGL::getContext ( ) const

◆ getDisplay()

EGLDisplay GHOST_ContextEGL::getDisplay ( ) const

◆ getSwapInterval()

GHOST_TSuccess GHOST_ContextEGL::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 270 of file GHOST_ContextEGL.cpp.

References GHOST_kSuccess.

◆ initializeDrawingContext()

GHOST_TSuccess GHOST_ContextEGL::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 347 of file GHOST_ContextEGL.cpp.

References api_string(), bindAPI(), EGL_CHK, error(), GHOST_kFailure, GHOST_kSuccess, GHOST_Context::initClearGL(), GHOST_Context::initContextGLEW(), and GHOST_Context::m_stereoVisual.

◆ releaseDrawingContext()

GHOST_TSuccess GHOST_ContextEGL::releaseDrawingContext ( )
virtual

Release the drawing context of the calling thread.

Returns
A boolean success indicator.

Implements GHOST_Context.

Definition at line 304 of file GHOST_ContextEGL.cpp.

References bindAPI(), EGL_CHK, GHOST_kFailure, and GHOST_kSuccess.

◆ releaseNativeHandles()

GHOST_TSuccess GHOST_ContextEGL::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 615 of file GHOST_ContextEGL.cpp.

References GHOST_kSuccess.

◆ setSwapInterval()

GHOST_TSuccess GHOST_ContextEGL::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 257 of file GHOST_ContextEGL.cpp.

References EGL_CHK, GHOST_kFailure, and GHOST_kSuccess.

◆ swapBuffers()

GHOST_TSuccess GHOST_ContextEGL::swapBuffers ( )
virtual

Swaps front and back buffers of a window.

Returns
A boolean success indicator.

Implements GHOST_Context.

Definition at line 252 of file GHOST_ContextEGL.cpp.

References EGL_CHK, GHOST_kFailure, and GHOST_kSuccess.

Friends And Related Function Documentation

◆ GHOST_XrGraphicsBindingOpenGL

friend class GHOST_XrGraphicsBindingOpenGL
friend

Definition at line 25 of file GHOST_ContextEGL.h.


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