Blender V4.3
GHOST_ContextD3D Class Reference

#include <GHOST_ContextD3D.hh>

Inherits GHOST_Context.

Public Member Functions

 GHOST_ContextD3D (bool stereoVisual, HWND hWnd)
 
 ~GHOST_ContextD3D ()
 
GHOST_TSuccess swapBuffers ()
 
GHOST_TSuccess activateDrawingContext ()
 
GHOST_TSuccess releaseDrawingContext ()
 
GHOST_TSuccess initializeDrawingContext ()
 
GHOST_TSuccess updateDrawingContext ()
 
GHOST_TSuccess releaseNativeHandles ()
 
GHOST_TSuccess setSwapInterval (int)
 
GHOST_TSuccess getSwapInterval (int &)
 
unsigned int getDefaultFramebuffer ()
 
class GHOST_SharedOpenGLResourcecreateSharedOpenGLResource (unsigned int width, unsigned int height, DXGI_FORMAT format, ID3D11RenderTargetView *render_target)
 
class GHOST_SharedOpenGLResourcecreateSharedOpenGLResource (unsigned int width, unsigned int height, DXGI_FORMAT format)
 
void disposeSharedOpenGLResource (class GHOST_SharedOpenGLResource *shared_res)
 
GHOST_TSuccess blitFromOpenGLContext (class GHOST_SharedOpenGLResource *shared_res, unsigned int width, unsigned int height)
 
ID3D11Texture2D * getSharedTexture2D (class GHOST_SharedOpenGLResource *shared_res)
 
bool isUpsideDown () const
 
- Public Member Functions inherited from GHOST_Context
 GHOST_Context (bool stereoVisual)
 
virtual ~GHOST_Context ()
 
void * getUserData ()
 
void setUserData (void *user_data)
 
bool isStereoVisual () const
 
- Public Member Functions inherited from GHOST_IContext
virtual ~GHOST_IContext ()
 

Friends

class GHOST_XrGraphicsBindingD3D
 

Additional Inherited Members

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

Detailed Description

Definition at line 19 of file GHOST_ContextD3D.hh.

Constructor & Destructor Documentation

◆ GHOST_ContextD3D()

GHOST_ContextD3D::GHOST_ContextD3D ( bool stereoVisual,
HWND hWnd )

Definition at line 23 of file GHOST_ContextD3D.cc.

◆ ~GHOST_ContextD3D()

GHOST_ContextD3D::~GHOST_ContextD3D ( )

Definition at line 28 of file GHOST_ContextD3D.cc.

Member Function Documentation

◆ activateDrawingContext()

GHOST_TSuccess GHOST_ContextD3D::activateDrawingContext ( )
virtual

Activates the drawing context of this window.

Returns
A boolean success indicator.

Implements GHOST_Context.

Definition at line 40 of file GHOST_ContextD3D.cc.

References GHOST_kFailure.

◆ blitFromOpenGLContext()

GHOST_TSuccess GHOST_ContextD3D::blitFromOpenGLContext ( class GHOST_SharedOpenGLResource * shared_res,
unsigned int width,
unsigned int height )

Definition at line 393 of file GHOST_ContextD3D.cc.

References GHOST_SharedOpenGLResource::blit().

◆ createSharedOpenGLResource() [1/2]

GHOST_SharedOpenGLResource * GHOST_ContextD3D::createSharedOpenGLResource ( unsigned int width,
unsigned int height,
DXGI_FORMAT format )

Definition at line 381 of file GHOST_ContextD3D.cc.

References createSharedOpenGLResource().

◆ createSharedOpenGLResource() [2/2]

GHOST_SharedOpenGLResource * GHOST_ContextD3D::createSharedOpenGLResource ( unsigned int width,
unsigned int height,
DXGI_FORMAT format,
ID3D11RenderTargetView * render_target )

Definition at line 364 of file GHOST_ContextD3D.cc.

Referenced by createSharedOpenGLResource().

◆ disposeSharedOpenGLResource()

void GHOST_ContextD3D::disposeSharedOpenGLResource ( class GHOST_SharedOpenGLResource * shared_res)

Definition at line 388 of file GHOST_ContextD3D.cc.

◆ getDefaultFramebuffer()

unsigned int GHOST_ContextD3D::getDefaultFramebuffer ( )
inlinevirtual

Gets the OpenGL frame-buffer associated with the OpenGL context

Returns
The ID of an OpenGL frame-buffer object.

Reimplemented from GHOST_Context.

Definition at line 91 of file GHOST_ContextD3D.hh.

◆ getSharedTexture2D()

ID3D11Texture2D * GHOST_ContextD3D::getSharedTexture2D ( class GHOST_SharedOpenGLResource * shared_res)

◆ getSwapInterval()

GHOST_TSuccess GHOST_ContextD3D::getSwapInterval ( int & )
inlinevirtual

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 82 of file GHOST_ContextD3D.hh.

References GHOST_kFailure.

◆ initializeDrawingContext()

GHOST_TSuccess GHOST_ContextD3D::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 78 of file GHOST_ContextD3D.cc.

References GHOST_kFailure, and GHOST_kSuccess.

◆ isUpsideDown()

bool GHOST_ContextD3D::isUpsideDown ( ) const
inlinevirtual

Returns if the context is rendered upside down compared to OpenGL.

Reimplemented from GHOST_Context.

Definition at line 110 of file GHOST_ContextD3D.hh.

◆ releaseDrawingContext()

GHOST_TSuccess GHOST_ContextD3D::releaseDrawingContext ( )
virtual

Release the drawing context of the calling thread.

Returns
A boolean success indicator.

Implements GHOST_Context.

Definition at line 45 of file GHOST_ContextD3D.cc.

References GHOST_kFailure.

◆ releaseNativeHandles()

GHOST_TSuccess GHOST_ContextD3D::releaseNativeHandles ( )
virtual

Checks if it is OK for a remove the native display

Returns
Indication as to whether removal has succeeded.

Implements GHOST_Context.

Definition at line 105 of file GHOST_ContextD3D.cc.

References GHOST_kFailure.

◆ setSwapInterval()

GHOST_TSuccess GHOST_ContextD3D::setSwapInterval ( int )
inlinevirtual

Sets the swap interval for swapBuffers.

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

Reimplemented from GHOST_Context.

Definition at line 72 of file GHOST_ContextD3D.hh.

References GHOST_kFailure.

◆ swapBuffers()

GHOST_TSuccess GHOST_ContextD3D::swapBuffers ( )
virtual

Swaps front and back buffers of a window.

Returns
A boolean success indicator.

Implements GHOST_Context.

Definition at line 35 of file GHOST_ContextD3D.cc.

References GHOST_kSuccess.

◆ updateDrawingContext()

GHOST_TSuccess GHOST_ContextD3D::updateDrawingContext ( )
inlinevirtual

Updates the drawing context of this window. Needed whenever the window is changed.

Returns
Indication of success.

Reimplemented from GHOST_Context.

Definition at line 56 of file GHOST_ContextD3D.hh.

References GHOST_kFailure.

Friends And Related Symbol Documentation

◆ GHOST_XrGraphicsBindingD3D

friend class GHOST_XrGraphicsBindingD3D
friend

Definition at line 21 of file GHOST_ContextD3D.hh.


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