LeiaSR SDK 720218b2 v1.32.7.6322 2025-02-13T14:55:38Z
Stable
Public Member Functions | Static Public Member Functions | List of all members
SR::DXWeaver Class Reference

#include <dxweaver.h>

Inheritance diagram for SR::DXWeaver:
[legend]
Collaboration diagram for SR::DXWeaver:
[legend]

Public Member Functions

 DXWeaver (SR::SRContext &context, ID3D11Device *device, ID3D11DeviceContext *deviceContext, unsigned width, unsigned height)
 
 ~DXWeaver ()
 
ID3D11RenderTargetView * getFrameBuffer ()
 
bool canWeave ()
 
void weave (unsigned width, unsigned height)
 
- Public Member Functions inherited from SR::DX11Weaver
 DX11Weaver (SR::SRContext &context, ID3D11Device *device, ID3D11DeviceContext *deviceContext, unsigned int width, unsigned int height)
 Constructs a class to be used for weaving an input image of a certain size. More...
 
 DX11Weaver (SR::SRContext &context, ID3D11Device *device, ID3D11DeviceContext *deviceContext, unsigned int width, unsigned int height, HWND window)
 Constructs a class to be used for weaving an input image of a certain size. More...
 
 DX11Weaver (SR::SRContext &context, ID3D11Device *device, ID3D11DeviceContext *deviceContext, unsigned int width, unsigned int height, DXGI_FORMAT format)
 Constructs a class to be used for weaving an input image of a certain size and format. More...
 
 DX11Weaver (SR::SRContext &context, ID3D11Device *device, ID3D11DeviceContext *deviceContext, unsigned int width, unsigned int height, DXGI_FORMAT format, HWND window)
 Constructs a class to be used for weaving an input image of a certain size and format. More...
 
 ~DX11Weaver ()
 Handles proper destruction of all weaver related classes and buffers. More...
 
- Public Member Functions inherited from SR::DX11WeaverBase
 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...
 
void enableLateLatching (bool enable)
 Enables late latching. Note that late latching requires applications to call weave() once per frame, and does not work with deferred contexts. More...
 
bool isLateLatchingEnabled () const
 Determines if late latching is enabled. More...
 
void setContrast (float contrast)
 Sets the weaving contrast. More...
 
float getContrast () const
 Gets the current weaving contrast. More...
 
void setShaderSRGBConversion (bool read, bool write)
 Sets whether to apply shader sRGB<->Linear color space conversions to the input framebuffer during weaving. More...
 
void setACTMode (WeaverACTMode mode)
 Sets the anti-crosstalk mode. More...
 
WeaverACTMode getACTMode () const
 Gets the anti-crosstalk mode. More...
 
void setCrosstalkStaticFactor (float factor)
 Sets the anti-crosstalk factor. More...
 
float getCrosstalkStaticFactor () const
 Gets the anti-crosstalk factor. More...
 
void setCrosstalkDynamicFactor (float factor)
 Sets the anti-crosstalk dynamic factor. More...
 
float getCrosstalkDynamicFactor () const
 Gets the anti-crosstalk dynamic factor. 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...
 

Static Public Member Functions

static DXWeavercreate (SR::SRContext &context, ID3D11Device *device, ID3D11DeviceContext *deviceContext, unsigned int width, unsigned int height)
 Constructs a class to be used for weaving an input image of a certain size. More...
 

Additional Inherited Members

- Protected Attributes inherited from SR::DX11WeaverBase
std::unique_ptr< Impl > pimpl
 

Constructor & Destructor Documentation

◆ DXWeaver()

SR::DXWeaver::DXWeaver ( SR::SRContext context,
ID3D11Device *  device,
ID3D11DeviceContext *  deviceContext,
unsigned  width,
unsigned  height 
)

◆ ~DXWeaver()

SR::DXWeaver::~DXWeaver ( )

Member Function Documentation

◆ canWeave()

bool SR::DXWeaver::canWeave ( )

◆ create()

static DXWeaver * SR::DXWeaver::create ( SR::SRContext context,
ID3D11Device *  device,
ID3D11DeviceContext *  deviceContext,
unsigned int  width,
unsigned int  height 
)
static

Constructs a class to be used for weaving an input image of a certain size.

Deprecated:
Calling delete on the returned pointer causes crashing, developers should use the constructor of DX11Weaver directly
Parameters
contextto connect to
deviceinterface used to create resources
deviceContextto be used for rendering commands
widthof the side-by-side image to be weaved together
heightof the side-by-side image to be weaved together
Returns
pointer to new DXWeaver instance

◆ getFrameBuffer()

ID3D11RenderTargetView * SR::DXWeaver::getFrameBuffer ( )

◆ weave()

void SR::DXWeaver::weave ( unsigned  width,
unsigned  height 
)

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