Gateware Libraries  6.3.A
Beta Build
GW::GRAPHICS::GDirectX11Surface Class Referenceabstract

A library used to initialize, create, and manage a DirectX11 rendering context. More...

#include <GDirectX11Surface.h>

Inheritance diagram for GW::GRAPHICS::GDirectX11Surface:
GW::CORE::GListener GW::CORE::GMultiThreaded GW::CORE::GInterface

Public Member Functions

virtual GReturn GetAspectRatio (float &_outRatio)=0
 Returns the aspect ratio for the current window. More...
 
virtual GReturn GetDevice (void **_outDevice)=0
 Returns the address of the current ID3D11Device. More...
 
virtual GReturn GetContext (void **_outContext)=0
 Returns the address of the current ID3D11DeviceContext. More...
 
virtual GReturn GetSwapchain (void **_outSwapchain)=0
 Returns the address of the current IDXGISwapChain. More...
 
virtual GReturn GetRenderTarget (void **_outRenderTarget)=0
 Returns the address of the current ID3D11RenderTargetView. More...
 
virtual GReturn GetDepthStencilView (void **_outDepthStencilView)=0
 Returns the address of the current ID3D11DepthStencilView. More...
 
- Public Member Functions inherited from GW::CORE::GListener
virtual GReturn OnEvent (const GUUIID &_senderInterface, unsigned int _eventID, void *_eventData, unsigned int _dataSize)=0
 This operation is called whenever a GBroadcaster a listener is registered to generates an event. More...
 
- Public Member Functions inherited from GW::CORE::GInterface
virtual GReturn GetCount (unsigned int &_outCount)=0
 Return the total number of active references to this object. More...
 
virtual GReturn IncrementCount ()=0
 Increase the total number of active references to this object. More...
 
virtual GReturn DecrementCount ()=0
 Decrease the total number of active references to this object. More...
 
virtual GReturn RequestInterface (const GUUIID &_interfaceID, void **_outputInterface)=0
 Requests an interface that may or may not be supported by this object. More...
 

Detailed Description

A library used to initialize, create, and manage a DirectX11 rendering context.

This library automates the creation of a basic DirectX11 rendering context, and is capable of accepting special requests that can guide the initialization to support requested options. GDirectX11Surface is a GListener, which allows it to receive events from a registered broadcaster and react accordingly.

Member Function Documentation

◆ GetAspectRatio()

virtual GReturn GW::GRAPHICS::GDirectX11Surface::GetAspectRatio ( float &  _outRatio)
pure virtual

Returns the aspect ratio for the current window.

Parameters
[out]_outRatioWill contain the calculated aspect ratio.
Return values
SUCCESSThe current aspect ratio was calculated and returned.
FAILURENo active GWindow exists to calculate an aspect ratio from.

◆ GetContext()

virtual GReturn GW::GRAPHICS::GDirectX11Surface::GetContext ( void **  _outContext)
pure virtual

Returns the address of the current ID3D11DeviceContext.

Parameters
[out]_outContextWill contain the address of the context.
Return values
SUCCESSA DirectX11 contexts exists and was returned.
FAILURENo context exists to retrieve.

◆ GetDepthStencilView()

virtual GReturn GW::GRAPHICS::GDirectX11Surface::GetDepthStencilView ( void **  _outDepthStencilView)
pure virtual

Returns the address of the current ID3D11DepthStencilView.

A Depth Stencil View will only be created if requested as a special option when the 'Initialize' method is called.

Parameters
[out]_outDepthStencilViewWill contain the address of the depth stencil view.
Return values
SUCCESSA DirectX11 depth stencil view exists and was returned.
FAILURENo depth stencil view exists to retrieve.

◆ GetDevice()

virtual GReturn GW::GRAPHICS::GDirectX11Surface::GetDevice ( void **  _outDevice)
pure virtual

Returns the address of the current ID3D11Device.

Parameters
[out]_outDeviceWill contain the address of the device.
Return values
SUCCESSA DirectX11 device exists and was returned.
FAILURENo device exists to retrieve.

◆ GetRenderTarget()

virtual GReturn GW::GRAPHICS::GDirectX11Surface::GetRenderTarget ( void **  _outRenderTarget)
pure virtual

Returns the address of the current ID3D11RenderTargetView.

Parameters
[out]_outRenderTargetWill contain the address of the render target view.
Return values
SUCCESSA DirectX11 render target view exists and was returned.
FAILURENo render target view exists to retrieve.

◆ GetSwapchain()

virtual GReturn GW::GRAPHICS::GDirectX11Surface::GetSwapchain ( void **  _outSwapchain)
pure virtual

Returns the address of the current IDXGISwapChain.

Parameters
[out]_outSwapchainWill contain the address of the swap chain.
Return values
SUCCESSA DirectX11 swap chain exists and was returned.
FAILURENo swap chain exists to retrieve.

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