Stereo Buffer API module

Contents

The Stereo Buffer API handles left/right frame detection. Use zcCreateStereoBuffer() to create the buffer. Call zcBeginStereoBufferFrame() at the beginning of the frame on the rendering thread.

Enums

enum ZCRenderer { ZC_RENDERER_QUAD_BUFFER_GL = 0, ZC_RENDERER_QUAD_BUFFER_D3D9 = 1, ZC_RENDERER_QUAD_BUFFER_D3D10 = 2, ZC_RENDERER_QUAD_BUFFER_D3D11 = 3, ZC_RENDERER_QUAD_BUFFER_D3D11_1 = 4 }

Typedefs

using ZCRenderer = enum ZCRenderer

Functions

auto zcCreateStereoBuffer(ZCContext context, ZCRenderer renderer, void* reserved, ZCHandle* bufferHandle) -> ZCError
auto zcDestroyStereoBuffer(ZCHandle bufferHandle) -> ZCError
auto zcSetStereoBufferFullScreen(ZCHandle bufferHandle, ZSBool isFullScreen) -> ZCError
auto zcIsStereoBufferFullScreen(ZCHandle bufferHandle, ZSBool* isFullScreen) -> ZCError
auto zcBeginStereoBufferFrame(ZCHandle bufferHandle) -> ZCError
auto zcSyncStereoBuffer(ZCHandle bufferHandle) -> ZCError

Enum documentation

Typedef documentation

typedef enum ZCRenderer ZCRenderer

Defines the renderer used by the Stereo Buffer API.

Function documentation

ZCError zcCreateStereoBuffer(ZCContext context, ZCRenderer renderer, void* reserved, ZCHandle* bufferHandle)

Parameters
context in A handle to the internal state of the zSpace SDK.
renderer in The application's graphics API.
reserved in A reserved argument depending on the ZCRenderer:
ZC_RENDERER_QUAD_BUFFER_GL - NULL
ZC_RENDERER_QUAD_BUFFER_D3D9 - Pass in IDirect3DDevice9*
ZC_RENDERER_QUAD_BUFFER_D3D10 - Pass in IDXGISwapChain*
ZC_RENDERER_QUAD_BUFFER_D3D11 - Pass in IDXGISwapChain*
ZC_RENDERER_QUAD_BUFFER_D3D11_1 - Pass in IDXGISwapChain1*
bufferHandle out A handle for the buffer.

Creates a stereo buffer for left/right frame detection.

ZCError zcDestroyStereoBuffer(ZCHandle bufferHandle)

Parameters
bufferHandle in A handle to the buffer.

Destroys the stereo buffer.

ZCError zcSetStereoBufferFullScreen(ZCHandle bufferHandle, ZSBool isFullScreen)

Parameters
bufferHandle in A handle to the stereo buffer.
isFullScreen in True for full screen mode, false otherwise.

Sets the stereo buffer to full screen or windowed mode.

ZCError zcIsStereoBufferFullScreen(ZCHandle bufferHandle, ZSBool* isFullScreen)

Parameters
bufferHandle in A handle to the stereo buffer.
isFullScreen out True for full screen mode, false otherwise.

Checks if the stereo buffer is in full screen or windowed mode.

ZCError zcBeginStereoBufferFrame(ZCHandle bufferHandle)

Parameters
bufferHandle in A handle to the buffer.

Signals the beginning of the frame. Handles the initial synchronization and any pending synchronization requests for left/right frame detection. This must be called on the application's rendering thread.

ZCError zcSyncStereoBuffer(ZCHandle bufferHandle)

Parameters
bufferHandle in A handle to the buffer.

Synchronizes the left and right frames. Call this function to force a left/right frame synchronization.