Weaver base class for all graphics APIs.
More...
#include <IWeaverBase.h>
|
virtual void | setWindowHandle (HWND handle)=0 |
| Sets the new window handle of the window that will present the backbuffer. Note: the backbuffer size should match the client size of the window or the user will see artifacts. More...
|
|
virtual void | weave ()=0 |
| Performs weaving from the provided stereo texture to the current render-target using currently setup viewport and scissor rect. More...
|
|
virtual void | enableLateLatching (bool enable)=0 |
| Enables late latching. Note that late latching requires applications to call weave() once per frame. When enabled, the user's position will be updated for frames still in flight, reducing weaving latency This feature might not be available for all graphics API's. More...
|
|
virtual bool | isLateLatchingEnabled () const =0 |
| Determines if late latching is currently enabled. More...
|
|
virtual void | setShaderSRGBConversion (bool read, bool write)=0 |
| Sets whether to apply shader sRGB/Linear color space conversions during weaving. When input is already linear or set for hardware conversion, set read to false. When output is treated as linear (set for hardware conversion), set write to false. More...
|
|
virtual void | setLatencyInFrames (uint64_t latencyInFrames)=0 |
| Set the latency to match the expected duration of the full rendering pipeline in number of frames. The latency in time is calculated using these number of frames based on the refresh rate of the monitor that the application is running on, this will be dynamically updated when the window changes monitor. For this it requires the weaver to be given a valid window handle of the running application. More...
|
|
virtual void | setLatency (uint64_t latency)=0 |
| Set the latency to match the expected duration of the full rendering pipeline. More...
|
|
virtual uint64_t | getLatency () const =0 |
| Get the latency that is used by the weaver. If setLatency has been called, the value set by that function will be returned. If setLatencyInFrames has been called, the latency will be calculated based on the refresh rate of the monitor and the application. By default setLatencyInFrames is used when no latency is explicitly set. More...
|
|
virtual void | getPredictedEyePositions (float *left, float *right)=0 |
| Gets the tracked eye positions. Intended to be used by virtual cameras Note: the latency set by setLatency() is also used for predicting these eye positions. Note: The returned positions might not be fully compensating for all latencies. More...
|
|
Weaver base class for all graphics APIs.
◆ IWeaverBase1() [1/3]
SR::IWeaverBase1::IWeaverBase1 |
( |
| ) |
|
|
protecteddefault |
◆ ~IWeaverBase1()
virtual SR::IWeaverBase1::~IWeaverBase1 |
( |
| ) |
|
|
protectedvirtualdefault |
◆ IWeaverBase1() [2/3]
◆ IWeaverBase1() [3/3]
◆ enableLateLatching()
virtual void SR::IWeaverBase1::enableLateLatching |
( |
bool |
enable | ) |
|
|
pure virtual |
Enables late latching. Note that late latching requires applications to call weave() once per frame. When enabled, the user's position will be updated for frames still in flight, reducing weaving latency This feature might not be available for all graphics API's.
- Parameters
-
enable | Whether to turn late latching on |
◆ getLatency()
virtual uint64_t SR::IWeaverBase1::getLatency |
( |
| ) |
const |
|
pure virtual |
Get the latency that is used by the weaver. If setLatency has been called, the value set by that function will be returned. If setLatencyInFrames has been called, the latency will be calculated based on the refresh rate of the monitor and the application. By default setLatencyInFrames is used when no latency is explicitly set.
- Returns
- The latency in microseconds
◆ getPredictedEyePositions()
virtual void SR::IWeaverBase1::getPredictedEyePositions |
( |
float * |
left, |
|
|
float * |
right |
|
) |
| |
|
pure virtual |
Gets the tracked eye positions. Intended to be used by virtual cameras Note: the latency set by setLatency() is also used for predicting these eye positions. Note: The returned positions might not be fully compensating for all latencies.
- Parameters
-
left | 3D vector of the left eye position. |
right | 3D vector of the right eye position. |
◆ isLateLatchingEnabled()
virtual bool SR::IWeaverBase1::isLateLatchingEnabled |
( |
| ) |
const |
|
pure virtual |
Determines if late latching is currently enabled.
- Returns
- Whether late latching is enabled.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ setLatency()
virtual void SR::IWeaverBase1::setLatency |
( |
uint64_t |
latency | ) |
|
|
pure virtual |
Set the latency to match the expected duration of the full rendering pipeline.
The eye positions should be predicted to the timepoint at which the frame is visible to the user Internally the prediction is already taking care of all other latency, only the rendering pipeline latency is application dependent A low latency app would have 1 framebuffer latency, so 16666 microseconds (the generated frame will be presented at next v-sync) When using v-sync, the driver adds at least 1 buffer latency, and maybe the windows display manager also adds a buffer latency. Typically, the latency is n * 1000*1000/framerate microseconds
- Parameters
-
latency | The latency from the moment when weave() is called until presenting the current frame to the user, in microseconds |
◆ setLatencyInFrames()
virtual void SR::IWeaverBase1::setLatencyInFrames |
( |
uint64_t |
latencyInFrames | ) |
|
|
pure virtual |
Set the latency to match the expected duration of the full rendering pipeline in number of frames. The latency in time is calculated using these number of frames based on the refresh rate of the monitor that the application is running on, this will be dynamically updated when the window changes monitor. For this it requires the weaver to be given a valid window handle of the running application.
The eye positions should be predicted to the timepoint at which the frame is visible to the user Internally the prediction is already taking care of all other latency, only the rendering pipeline latency is application dependent A low latency app would have 1 framebuffer latency, the generated frame will be presented at next v-sync) When using v-sync, the driver adds at least 1 buffer latency, and maybe the windows display manager also adds a buffer latency.
- Parameters
-
latencyInFrames | The expected number of frames before presenting the current generated frame to the user. |
◆ setShaderSRGBConversion()
virtual void SR::IWeaverBase1::setShaderSRGBConversion |
( |
bool |
read, |
|
|
bool |
write |
|
) |
| |
|
pure virtual |
Sets whether to apply shader sRGB/Linear color space conversions during weaving. When input is already linear or set for hardware conversion, set read to false. When output is treated as linear (set for hardware conversion), set write to false.
- Parameters
-
read | Convert from sRGB to Linear color space after sampling the input texture. |
write | Convert from Linear to sRGB color space before writing into output. |
◆ setWindowHandle()
virtual void SR::IWeaverBase1::setWindowHandle |
( |
HWND |
handle | ) |
|
|
pure virtual |
Sets the new window handle of the window that will present the backbuffer. Note: the backbuffer size should match the client size of the window or the user will see artifacts.
- Parameters
-
handle | Handle to the window that will present the backbuffer |
◆ weave()
virtual void SR::IWeaverBase1::weave |
( |
| ) |
|
|
pure virtual |
Performs weaving from the provided stereo texture to the current render-target using currently setup viewport and scissor rect.
The documentation for this class was generated from the following file: