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

#include <GHOST_ContextD3D.h>

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, ID3D11RenderTargetView *render_target)
 
class GHOST_SharedOpenGLResourcecreateSharedOpenGLResource (unsigned int width, unsigned int height)
 
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 ()
 
bool isStereoVisual () const
 
- Public Member Functions inherited from GHOST_IContext
virtual ~GHOST_IContext ()
 

Friends

class GHOST_XrGraphicsBindingD3D
 

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 31 of file GHOST_ContextD3D.h.

Constructor & Destructor Documentation

◆ GHOST_ContextD3D()

GHOST_ContextD3D::GHOST_ContextD3D ( bool  stereoVisual,
HWND  hWnd 
)

Definition at line 36 of file GHOST_ContextD3D.cpp.

◆ ~GHOST_ContextD3D()

GHOST_ContextD3D::~GHOST_ContextD3D ( )

Definition at line 41 of file GHOST_ContextD3D.cpp.

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 53 of file GHOST_ContextD3D.cpp.

References GHOST_kFailure.

◆ blitFromOpenGLContext()

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

Definition at line 348 of file GHOST_ContextD3D.cpp.

References GHOST_SharedOpenGLResource::blit(), height, and width.

◆ createSharedOpenGLResource() [1/2]

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

Definition at line 337 of file GHOST_ContextD3D.cpp.

References createSharedOpenGLResource(), height, and width.

◆ createSharedOpenGLResource() [2/2]

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

Definition at line 323 of file GHOST_ContextD3D.cpp.

References height, and width.

Referenced by createSharedOpenGLResource().

◆ disposeSharedOpenGLResource()

void GHOST_ContextD3D::disposeSharedOpenGLResource ( class GHOST_SharedOpenGLResource shared_res)

Definition at line 343 of file GHOST_ContextD3D.cpp.

◆ 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 103 of file GHOST_ContextD3D.h.

◆ 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 94 of file GHOST_ContextD3D.h.

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 91 of file GHOST_ContextD3D.cpp.

References GHOST_kFailure, GHOST_kSuccess, and NULL.

◆ 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 118 of file GHOST_ContextD3D.h.

◆ 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 58 of file GHOST_ContextD3D.cpp.

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 118 of file GHOST_ContextD3D.cpp.

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 84 of file GHOST_ContextD3D.h.

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 48 of file GHOST_ContextD3D.cpp.

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 68 of file GHOST_ContextD3D.h.

References GHOST_kFailure.

Friends And Related Function Documentation

◆ GHOST_XrGraphicsBindingD3D

friend class GHOST_XrGraphicsBindingD3D
friend

Definition at line 33 of file GHOST_ContextD3D.h.


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