Blender V4.3
GHOST_ContextGLX Class Reference

#include <GHOST_ContextGLX.hh>

Inherits GHOST_Context.

Public Member Functions

 GHOST_ContextGLX (bool stereoVisual, Window window, Display *display, GLXFBConfig fbconfig, int contextProfileMask, int contextMajorVersion, int contextMinorVersion, int contextFlags, int contextResetNotificationStrategy)
 
 ~GHOST_ContextGLX () override
 
GHOST_TSuccess swapBuffers () 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 &intervalOut) override
 
- Public Member Functions inherited from GHOST_Context
 GHOST_Context (bool stereoVisual)
 
virtual ~GHOST_Context ()
 
virtual GHOST_TSuccess updateDrawingContext ()
 
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 ()
 

Friends

class GHOST_XrGraphicsBindingOpenGL
 

Additional Inherited Members

- Protected Attributes inherited from GHOST_Context
bool m_stereoVisual
 
void * m_user_data = nullptr
 

Detailed Description

Definition at line 24 of file GHOST_ContextGLX.hh.

Constructor & Destructor Documentation

◆ GHOST_ContextGLX()

GHOST_ContextGLX::GHOST_ContextGLX ( bool stereoVisual,
Window window,
Display * display,
GLXFBConfig fbconfig,
int contextProfileMask,
int contextMajorVersion,
int contextMinorVersion,
int contextFlags,
int contextResetNotificationStrategy )

Constructor.

Definition at line 31 of file GHOST_ContextGLX.cc.

◆ ~GHOST_ContextGLX()

GHOST_ContextGLX::~GHOST_ContextGLX ( )
override

Destructor.

Definition at line 54 of file GHOST_ContextGLX.cc.

References None.

Member Function Documentation

◆ activateDrawingContext()

GHOST_TSuccess GHOST_ContextGLX::activateDrawingContext ( )
overridevirtual

Activates the drawing context of this window.

Returns
A boolean success indicator.

Implements GHOST_Context.

Definition at line 83 of file GHOST_ContextGLX.cc.

References GHOST_kFailure, and GHOST_kSuccess.

◆ getSwapInterval()

GHOST_TSuccess GHOST_ContextGLX::getSwapInterval ( int & intervalOut)
overridevirtual

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 318 of file GHOST_ContextGLX.cc.

References GHOST_kFailure, GHOST_kSuccess, and int.

◆ initializeDrawingContext()

GHOST_TSuccess GHOST_ContextGLX::initializeDrawingContext ( )
overridevirtual

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 99 of file GHOST_ContextGLX.cc.

References _glewSearchExtension(), _glewStrLen(), GHOST_kFailure, GHOST_kSuccess, GHOST_X11_ERROR_HANDLERS_OVERRIDE, GHOST_X11_ERROR_HANDLERS_RESTORE, GHOST_X11_GL_GetAttributes(), GHOST_Context::m_stereoVisual, None, and Window.

◆ releaseDrawingContext()

GHOST_TSuccess GHOST_ContextGLX::releaseDrawingContext ( )
overridevirtual

Release the drawing context of the calling thread.

Returns
A boolean success indicator.

Implements GHOST_Context.

Definition at line 91 of file GHOST_ContextGLX.cc.

References GHOST_kFailure, GHOST_kSuccess, and None.

◆ releaseNativeHandles()

GHOST_TSuccess GHOST_ContextGLX::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 302 of file GHOST_ContextGLX.cc.

References GHOST_kSuccess.

◆ setSwapInterval()

GHOST_TSuccess GHOST_ContextGLX::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 309 of file GHOST_ContextGLX.cc.

References GHOST_kFailure, and GHOST_kSuccess.

◆ swapBuffers()

GHOST_TSuccess GHOST_ContextGLX::swapBuffers ( )
overridevirtual

Swaps front and back buffers of a window.

Returns
A boolean success indicator.

Implements GHOST_Context.

Definition at line 76 of file GHOST_ContextGLX.cc.

References GHOST_kSuccess.

Friends And Related Symbol Documentation

◆ GHOST_XrGraphicsBindingOpenGL

friend class GHOST_XrGraphicsBindingOpenGL
friend

Definition at line 26 of file GHOST_ContextGLX.hh.


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