Simulated Reality SDK 7500c78d v1.30.2.51085 2024-04-26T11:23:03Z
Stable
Public Member Functions | Protected Attributes | List of all members
SR::DX11WeaverBase Class Reference

#include <dx11weaver.h>

Inheritance diagram for SR::DX11WeaverBase:
[legend]

Public Member Functions

 DX11WeaverBase ()
 
 ~DX11WeaverBase ()
 
ID3D11RenderTargetView * getFrameBuffer ()
 Returns the buffer that will be used to create a weaved image. This buffer expects a side-by-side image. When a frame buffer is provided by calling setInputFrameBuffer(), the internally created buffer will be released. More...
 
void setInputFrameBuffer (ID3D11ShaderResourceView *frameBuffer)
 Sets the buffer that will be used to create a weaved image. This will release the internally created frame buffer. More...
 
void setContext (ID3D11DeviceContext *context)
 Sets the device context for the weaver to use. More...
 
void setWindowHandle (HWND handle)
 Sets the window handle of the application window. If the weaver was created using a deprecated constructor, setting window handle has no effect. More...
 
bool canWeave ()
 Used to determine if software weaving is possible on this device. More...
 
bool canWeave (unsigned int width, unsigned int height)
 Used to determine if software weaving is possible for certain size and visibility to the currently bound framebuffer. More...
 
bool canWeave (unsigned int width, unsigned int height, unsigned int xOffset, unsigned int yOffset)
 Used to determine if software weaving is possible for certain size and visibility to the currently bound framebuffer. More...
 
void weave (unsigned int width, unsigned int height)
 Can be called to render a weaved image of a certain size to the currently bound framebuffer A framebuffer must be set before calling this function. More...
 
void weave (unsigned int width, unsigned int height, unsigned int xOffset, unsigned int yOffset)
 Can be called to render a weaved image of a certain size to the currently bound framebuffer A framebuffer must be set before calling this function. More...
 

Protected Attributes

std::unique_ptr< Impl > pimpl
 

Constructor & Destructor Documentation

◆ DX11WeaverBase()

SR::DX11WeaverBase::DX11WeaverBase ( )

◆ ~DX11WeaverBase()

SR::DX11WeaverBase::~DX11WeaverBase ( )

Member Function Documentation

◆ canWeave() [1/3]

bool SR::DX11WeaverBase::canWeave ( )

Used to determine if software weaving is possible on this device.

Deprecated:
Returns
bool indicating whether weaving can be done. Returns true when software weaving can be performed by DX11Weaver. When false is returned, you can output side-by-side manually or let DX11Weaver handle this.

◆ canWeave() [2/3]

bool SR::DX11WeaverBase::canWeave ( unsigned int  width,
unsigned int  height 
)

Used to determine if software weaving is possible for certain size and visibility to the currently bound framebuffer.

Parameters
widthof the image to be rendered to the bound framebuffer
heightof the image to be rendered to the bound framebuffer
Exceptions
std::runtime_errorif the window handle (HWND) becomes invalid during the execution of canWeave
Returns
bool indicating whether weaving can be done. Returns true when software weaving can be performed by DX11Weaver. When false is returned, you can output side-by-side manually or let DX11Weaver handle this.

◆ canWeave() [3/3]

bool SR::DX11WeaverBase::canWeave ( unsigned int  width,
unsigned int  height,
unsigned int  xOffset,
unsigned int  yOffset 
)

Used to determine if software weaving is possible for certain size and visibility to the currently bound framebuffer.

Parameters
widthof the image to be rendered to the bound framebuffer
heightof the image to be rendered to the bound framebuffer
xOffsetof the image to be rendered to the bound framebuffer
yOffsetof the image to be rendered to the bound framebuffer
Exceptions
std::runtime_errorif the window handle (HWND) becomes invalid during the execution of canWeave
Returns
bool indicating whether weaving can be done. Returns true when software weaving can be performed by DX11Weaver. When false is returned, you can output side-by-side manually or let DX11Weaver handle this.

◆ getFrameBuffer()

ID3D11RenderTargetView * SR::DX11WeaverBase::getFrameBuffer ( )

Returns the buffer that will be used to create a weaved image. This buffer expects a side-by-side image. When a frame buffer is provided by calling setInputFrameBuffer(), the internally created buffer will be released.

The buffer identifier can be bound using OMSetRenderTargets to start rendering to it. Rendering to the buffer is identical to normal rendering and often starts with calling ClearRenderTargetView.

Returns
ID3D11RenderTargetView identifying a buffer generated with CreateShaderResourceView

◆ setContext()

void SR::DX11WeaverBase::setContext ( ID3D11DeviceContext *  context)

Sets the device context for the weaver to use.

Parameters
contextDevice Context to be used for rendering commands

◆ setInputFrameBuffer()

void SR::DX11WeaverBase::setInputFrameBuffer ( ID3D11ShaderResourceView *  frameBuffer)

Sets the buffer that will be used to create a weaved image. This will release the internally created frame buffer.

Parameters
frameBufferFrame buffer to set

◆ setWindowHandle()

void SR::DX11WeaverBase::setWindowHandle ( HWND  handle)

Sets the window handle of the application window. If the weaver was created using a deprecated constructor, setting window handle has no effect.

Parameters
windowHandle of the application window

◆ weave() [1/2]

void SR::DX11WeaverBase::weave ( unsigned int  width,
unsigned int  height 
)

Can be called to render a weaved image of a certain size to the currently bound framebuffer A framebuffer must be set before calling this function.

Parameters
widthof the image to be rendered to the bound framebuffer
heightof the image to be rendered to the bound framebuffer

◆ weave() [2/2]

void SR::DX11WeaverBase::weave ( unsigned int  width,
unsigned int  height,
unsigned int  xOffset,
unsigned int  yOffset 
)

Can be called to render a weaved image of a certain size to the currently bound framebuffer A framebuffer must be set before calling this function.

Parameters
widthof the image to be rendered to the bound framebuffer
heightof the image to be rendered to the bound framebuffer
xOffsetof the image to be rendered to the bound framebuffer
yOffsetof the image to be rendered to the bound framebuffer

Member Data Documentation

◆ pimpl

std::unique_ptr<Impl> SR::DX11WeaverBase::pimpl
protected

Suppressing warning because if we don't want to export everything then solving the underlying problem requires modification of the API Warning Description: 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2' Candidate for deprecation


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