45 printf(
"Trying to get the display config\n");
51 osvrClientGetNumViewers(display, &viewers);
54 for (viewer = 0; viewer < viewers; ++viewer) {
55 printf(
"Viewer %d\n", viewer);
57 osvrClientGetNumEyesForViewer(display, viewer, &eyes);
60 for (eye = 0; eye < eyes; ++eye) {
61 printf(
"\tEye %d\n", eye);
63 osvrClientGetNumSurfacesForViewerEye(display, viewer, 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.
uint32_t OSVR_ViewerCount
The integer type specifying a number of viewers in a system.
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.
uint8_t OSVR_EyeCount
The integer type specifying the number of eyes (viewpoints) of a viewer.