Simulated Reality SDK 7500c78d v1.30.2.51085 2024-04-26T11:23:03Z
Stable
|
#include <dx12weaver.h>
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 |
SR::DX12WeaverBase::DX12WeaverBase | ( | ) |
SR::DX12WeaverBase::~DX12WeaverBase | ( | ) |
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.
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.
width | of the image to be rendered to the bound framebuffer |
height | of the image to be rendered to the bound framebuffer |
std::runtime_error | if the window handle (HWND) becomes invalid during the execution of canWeave |
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.
width | of the image to be rendered to the bound framebuffer |
height | of the image to be rendered to the bound framebuffer |
xOffset | of the image to be rendered to the bound framebuffer |
yOffset | of the image to be rendered to the bound framebuffer |
std::runtime_error | if the window handle (HWND) becomes invalid during the execution of canWeave |
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
.
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.
commandList | To add the weaver rendering commands to |
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.
frameBuffer | The 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. |
std::exception | if framebuffer is a texture resource created with a typeless format |
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.
frameBuffer | The 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. |
bufferViewFormat | The 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. |
std::exception | if framebuffer is a texture resource created with a typeless format and bufferViewFormat 's value is DXGI_FORMAT_UNKNOWN |
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.
frameBuffer | The 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. |
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.
window | Handle of the application window |
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)
commandList | to add the weaver rendering commands to |
width | of the image to be rendered to the bound rendertarget |
height | of the image to be rendered to the bound rendertarget |
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)
commandList | to add the weaver rendering commands to |
width | of the image to be rendered to the bound rendertarget |
height | of the image to be rendered to the bound rendertarget |
xOffset | of the image to be rendered to the bound rendertarget |
yOffset | of the image to be rendered to the bound rendertarget |
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.
width | of the image to be rendered to the bound rendertarget |
height | of the image to be rendered to the bound rendertarget |
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.
width | of the image to be rendered to the bound rendertarget |
height | of the image to be rendered to the bound rendertarget |
xOffset | of the image to be rendered to the bound rendertarget |
yOffset | of the image to be rendered to the bound rendertarget |
|
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