Stereo Viewport API module

Contents

You can create as many stereo viewports as you need. In other words, your application has a 1-to-many relationship with stereo viewports. Each viewport has its own frustum, which the SDK creates for you.

Functions

auto zcCreateViewport(ZCContext context, ZCHandle* viewportHandle) -> ZCError
auto zcDestroyViewport(ZCHandle viewportHandle) -> ZCError
auto zcSetViewportPosition(ZCHandle viewportHandle, ZSInt32 x, ZSInt32 y) -> ZCError
auto zcGetViewportPosition(ZCHandle viewportHandle, ZSInt32* x, ZSInt32* y) -> ZCError
auto zcSetViewportSize(ZCHandle viewportHandle, ZSInt32 width, ZSInt32 height) -> ZCError
auto zcGetViewportSize(ZCHandle viewportHandle, ZSInt32* width, ZSInt32* height) -> ZCError

Function documentation

ZCError zcCreateViewport(ZCContext context, ZCHandle* viewportHandle)

Parameters
context in A handle to the internal state of the zSpace SDK.
viewportHandle out A handle to the viewport.

Creates a stereo viewport.

ZCError zcDestroyViewport(ZCHandle viewportHandle)

Parameters
viewportHandle in A handle to the viewport.

Destroys a stereo viewport.

ZCError zcSetViewportPosition(ZCHandle viewportHandle, ZSInt32 x, ZSInt32 y)

Parameters
viewportHandle in A handle to the viewport.
in The x coordinate for the upper left corner of the viewport.
in The y coordinate for the upper left corner of the viewport.

Sets the viewport's absolute virtual desktop coordinates (top-left corner).

ZCError zcGetViewportPosition(ZCHandle viewportHandle, ZSInt32* x, ZSInt32* y)

Parameters
viewportHandle in A handle to the viewport.
out The x coordinate for the upper left corner of the viewport.
out The y coordinate for the upper left corner of the viewport.

Gets the viewport's absolute virtual desktop coordinates (top-left corner).

ZCError zcSetViewportSize(ZCHandle viewportHandle, ZSInt32 width, ZSInt32 height)

Parameters
viewportHandle in A handle to the viewport.
width in The width of the viewport in pixels.
height in The height of the viewport in pixels.

Sets the viewport's size in pixels.

ZCError zcGetViewportSize(ZCHandle viewportHandle, ZSInt32* width, ZSInt32* height)

Parameters
viewportHandle in A handle to the viewport.
width out The width of the viewport in pixels.
height out The height of the viewport in pixels.

Gets the viewport's size in pixels.