nuclear@4: #ifndef VR_H_ nuclear@4: #define VR_H_ nuclear@4: nuclear@5: enum { nuclear@5: VR_EYE_LEFT, nuclear@5: VR_EYE_RIGHT nuclear@5: }; nuclear@5: nuclear@4: #ifdef __cplusplus nuclear@4: extern "C" { nuclear@4: #endif nuclear@4: nuclear@4: int vr_init(void); nuclear@4: void vr_shutdown(void); nuclear@4: nuclear@4: int vr_module_count(void); nuclear@4: const char *vr_module_name(int idx); nuclear@4: nuclear@4: int vr_use_module(int idx); nuclear@4: int vr_use_module_named(const char *name); nuclear@4: nuclear@5: /* if we're using a vr module which requires a specific output resolution, vr_display_size nuclear@5: * returns non-zero, and writes the size through the xsz/ysz pointers. Otherwise returns 0 nuclear@5: */ nuclear@5: int vr_display_size(int *xsz, int *ysz); nuclear@5: int vr_eye_texture_size(int eye, int *xsz, int *ysz); nuclear@5: nuclear@4: /* returns non-zero if the active vr module provides this kind of matrix nuclear@4: * information, otherwise it returns zero, and sets mat to identity nuclear@4: */ nuclear@4: int vr_view_matrix(int eye, float *mat); nuclear@4: int vr_proj_matrix(int eye, float *mat); nuclear@4: nuclear@5: void vr_begin(int eye); nuclear@5: void vr_end(void); nuclear@5: void vr_present(void); nuclear@4: nuclear@4: #ifdef __cplusplus nuclear@4: } nuclear@4: #endif nuclear@4: nuclear@4: #endif /* VR_H_ */