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

#include <dx12weaver.h>

Inheritance diagram for SR::DX12WeaverBase:
[legend]

Public Member Functions

 DX12WeaverBase ()
 
 ~DX12WeaverBase ()
 
ID3D12Resource * getFrameBuffer ()
 Returns the input buffer of the weaver. When weave(...) is called on this object, this buffer should contain a side-by-side view that will be used as input for the weaver. More...
 
void setInputFrameBuffer (ID3D12Resource *frameBuffer)
 Sets the input buffer of the weaver. When weave(...) is called on this object, this buffer should contain a side-by-side view that will be used as input for the weaver. More...
 
void setInputFrameBuffer (ID3D12Resource *frameBuffer, DXGI_FORMAT bufferViewFormat)
 Sets the input buffer of the weaver. This overload of the function should be used to specify the fully qualified format via bufferViewFormat when the framebuffer is a texture created with a typeless format When weave(...) is called on this object, this buffer should contain a side-by-side view that will be used as input for the weaver. More...
 
void setOutputFrameBuffer (ID3D12Resource *frameBuffer)
 Sets the output buffer of the weaver. After weave(...) has been called on this object, the weaved image will be written to this buffer. More...
 
void setCommandList (ID3D12GraphicsCommandList *commandList)
 Sets the command list for the weaver to use. Must be set before the weave() function can be called. 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. Always returns false if the input or output buffer is not set. 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. Always returns false if the input or output buffer is not set. 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. Always returns false if the input or output buffer is not set. More...
 
void weave (unsigned int width, unsigned int height)
 Can be called to render a weaved image of inputFramebuffer provided to DX12Weaver::DX12Weaver(...) (Must be D3D12_RESOURCE_STATE_UNORDERED_ACCESS) to the currently bound rendertarget (Must be D3D12_RESOURCE_STATE_RENDER_TARGET) A commandlist must be set before calling this function or weaving will not be executed. More...
 
void weave (unsigned int width, unsigned int height, unsigned int xOffset, unsigned int yOffset)
 Can be called to render a weaved image of inputFramebuffer provided to DX12Weaver::DX12Weaver(...) (Must be D3D12_RESOURCE_STATE_UNORDERED_ACCESS) to the currently bound rendertarget (Must be D3D12_RESOURCE_STATE_RENDER_TARGET) A commandlist must be set before calling this function or weaving will not be executed. More...
 
void weave (ID3D12GraphicsCommandList *commandList, unsigned int width, unsigned int height)
 Can be called to render a weaved image of inputFramebuffer provided to DX12Weaver::DX12Weaver(...) (Must be D3D12_RESOURCE_STATE_UNORDERED_ACCESS) to the currently bound rendertarget (Must be D3D12_RESOURCE_STATE_RENDER_TARGET) More...
 
void weave (ID3D12GraphicsCommandList *commandList, unsigned int width, unsigned int height, unsigned int xOffset, unsigned int yOffset)
 Can be called to render a weaved image of inputFramebuffer provided to DX12Weaver::DX12Weaver(...) (Must be D3D12_RESOURCE_STATE_UNORDERED_ACCESS) to the currently bound rendertarget (Must be D3D12_RESOURCE_STATE_RENDER_TARGET) More...
 

Protected Attributes

std::unique_ptr< Impl > pimpl
 

Constructor & Destructor Documentation

◆ DX12WeaverBase()

SR::DX12WeaverBase::DX12WeaverBase ( )

◆ ~DX12WeaverBase()

SR::DX12WeaverBase::~DX12WeaverBase ( )

Member Function Documentation

◆ canWeave() [1/3]

bool SR::DX12WeaverBase::canWeave ( )

Used to determine if software weaving is possible on this device. Always returns false if the input or output buffer is not set.

Deprecated:
Returns
bool indicating whether weaving can be done. Returns true when software weaving can be performed by DX12Weaver. When false is returned, you can output side-by-side manually or let DX12Weaver handle this if the input and output buffers are set.

◆ canWeave() [2/3]

bool SR::DX12WeaverBase::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. Always returns false if the input or output buffer is not set.

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 DX12Weaver. When false is returned, you can output side-by-side manually or let DX12Weaver handle this if the input and output buffers are set.

◆ canWeave() [3/3]

bool SR::DX12WeaverBase::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. Always returns false if the input or output buffer is not set.

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 DX12Weaver. When false is returned, you can output side-by-side manually or let DX12Weaver handle this if the input and output buffers are set.

◆ getFrameBuffer()

ID3D12Resource * SR::DX12WeaverBase::getFrameBuffer ( )

Returns the input buffer of the weaver. When weave(...) is called on this object, this buffer should contain a side-by-side view that will be used as input for the weaver.

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
Pointer to the frame buffer resource that is currently set as input buffer.

◆ setCommandList()

void SR::DX12WeaverBase::setCommandList ( ID3D12GraphicsCommandList *  commandList)

Sets the command list for the weaver to use. Must be set before the weave() function can be called.

Parameters
commandListTo add the weaver rendering commands to

◆ setInputFrameBuffer() [1/2]

void SR::DX12WeaverBase::setInputFrameBuffer ( ID3D12Resource *  frameBuffer)

Sets the input buffer of the weaver. When weave(...) is called on this object, this buffer should contain a side-by-side view that will be used as input for the weaver.

Parameters
frameBufferThe frame buffer resource that will be used as input buffer after this function call. A reference to this resource will be maintained by the object until this function is called again or until the object is destroyed.
Exceptions
std::exceptionif framebuffer is a texture resource created with a typeless format

◆ setInputFrameBuffer() [2/2]

void SR::DX12WeaverBase::setInputFrameBuffer ( ID3D12Resource *  frameBuffer,
DXGI_FORMAT  bufferViewFormat 
)

Sets the input buffer of the weaver. This overload of the function should be used to specify the fully qualified format via bufferViewFormat when the framebuffer is a texture created with a typeless format When weave(...) is called on this object, this buffer should contain a side-by-side view that will be used as input for the weaver.

Parameters
frameBufferThe frame buffer resource that will be used as input buffer after this function call. A reference to this resource will be maintained by the object until this function is called again or until the object is destroyed.
bufferViewFormatThe fully qualified shader resource view format for the input frame buffer. This specification is required for textures created with typeless format. It can also be used to cast an already specified fully qualified format to another.
Exceptions
std::exceptionif framebuffer is a texture resource created with a typeless format and bufferViewFormat's value is DXGI_FORMAT_UNKNOWN

◆ setOutputFrameBuffer()

void SR::DX12WeaverBase::setOutputFrameBuffer ( ID3D12Resource *  frameBuffer)

Sets the output buffer of the weaver. After weave(...) has been called on this object, the weaved image will be written to this buffer.

Parameters
frameBufferThe frame buffer resource that will be used as output buffer after this function call. No reference to the output framebuffer is kept by the weaver object.

◆ setWindowHandle()

void SR::DX12WeaverBase::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/4]

void SR::DX12WeaverBase::weave ( ID3D12GraphicsCommandList *  commandList,
unsigned int  width,
unsigned int  height 
)

Can be called to render a weaved image of inputFramebuffer provided to DX12Weaver::DX12Weaver(...) (Must be D3D12_RESOURCE_STATE_UNORDERED_ACCESS) to the currently bound rendertarget (Must be D3D12_RESOURCE_STATE_RENDER_TARGET)

Deprecated:
Parameters
commandListto add the weaver rendering commands to
widthof the image to be rendered to the bound rendertarget
heightof the image to be rendered to the bound rendertarget

◆ weave() [2/4]

void SR::DX12WeaverBase::weave ( ID3D12GraphicsCommandList *  commandList,
unsigned int  width,
unsigned int  height,
unsigned int  xOffset,
unsigned int  yOffset 
)

Can be called to render a weaved image of inputFramebuffer provided to DX12Weaver::DX12Weaver(...) (Must be D3D12_RESOURCE_STATE_UNORDERED_ACCESS) to the currently bound rendertarget (Must be D3D12_RESOURCE_STATE_RENDER_TARGET)

Deprecated:
Parameters
commandListto add the weaver rendering commands to
widthof the image to be rendered to the bound rendertarget
heightof the image to be rendered to the bound rendertarget
xOffsetof the image to be rendered to the bound rendertarget
yOffsetof the image to be rendered to the bound rendertarget

◆ weave() [3/4]

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

Can be called to render a weaved image of inputFramebuffer provided to DX12Weaver::DX12Weaver(...) (Must be D3D12_RESOURCE_STATE_UNORDERED_ACCESS) to the currently bound rendertarget (Must be D3D12_RESOURCE_STATE_RENDER_TARGET) A commandlist must be set before calling this function or weaving will not be executed.

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

◆ weave() [4/4]

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

Can be called to render a weaved image of inputFramebuffer provided to DX12Weaver::DX12Weaver(...) (Must be D3D12_RESOURCE_STATE_UNORDERED_ACCESS) to the currently bound rendertarget (Must be D3D12_RESOURCE_STATE_RENDER_TARGET) A commandlist must be set before calling this function or weaving will not be executed.

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

Member Data Documentation

◆ pimpl

std::unique_ptr<Impl> SR::DX12WeaverBase::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: