45 printf(
"Trying to get the display config\n");
54 for (viewer = 0; viewer < viewers; ++viewer) {
55 printf(
"Viewer %d\n", viewer);
60 for (eye = 0; eye < eyes; ++eye) {
61 printf(
"\tEye %d\n", eye);
67 for (surface = 0; surface < surfaces; ++surface) {
68 printf(
"\t\tSurface %d\n", surface);
74 printf(
"Library shut down, exiting.\n");
uint32_t OSVR_SurfaceCount
The integer type specifying the number of surfaces seen by a viewer's eye.
OSVR_ClientContext osvrClientInit(const char applicationIdentifier[], uint32_t flags=0)
Initialize the library.
OSVR_ReturnCode osvrClientShutdown(OSVR_ClientContext ctx)
Shutdown the library.
#define OSVR_RETURN_FAILURE
The "failure" value for an OSVR_ReturnCode.
OSVR_ReturnCode osvrClientGetNumSurfacesForViewerEye(OSVR_DisplayConfig disp, OSVR_ViewerCount viewer, OSVR_EyeCount eye, OSVR_SurfaceCount *surfaces)
Each eye of each viewer in a display config has one or more surfaces (aka "screens") on which content...
OSVR_ReturnCode osvrClientGetNumEyesForViewer(OSVR_DisplayConfig disp, OSVR_ViewerCount viewer, OSVR_EyeCount *eyes)
Each viewer in a display config can have one or more "eyes" which have a substantially similar pose: ...
uint32_t OSVR_ViewerCount
The integer type specifying a number of viewers in a system.
struct OSVR_ClientContextObject * OSVR_ClientContext
Opaque handle that should be retained by your application. You need only and exactly one...
OSVR_ReturnCode osvrClientUpdate(OSVR_ClientContext ctx)
Updates the state of the context - call regularly in your mainloop.
OSVR_ReturnCode osvrClientGetDisplay(OSVR_ClientContext ctx, OSVR_DisplayConfig *disp)
Allocates a display configuration object populated with data from the OSVR system.
OSVR_ReturnCode osvrClientFreeDisplay(OSVR_DisplayConfig disp)
Frees a display configuration object. The corresponding context must still be open.
OSVR_ReturnCode osvrClientGetNumViewers(OSVR_DisplayConfig disp, OSVR_ViewerCount *viewers)
A display config can have one (or theoretically more) viewers: retrieve the viewer count...
uint8_t OSVR_EyeCount
The integer type specifying the number of eyes (viewpoints) of a viewer.
struct OSVR_DisplayConfigObject * OSVR_DisplayConfig
Opaque type of a display configuration.