# HG changeset patch # User John Tsiombikas # Date 1446701136 -7200 # Node ID c994aa032e3c7470728b73bc818504e71cbfb379 start planing the goatvr1 api diff -r 000000000000 -r c994aa032e3c include/goatvr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/goatvr.h Thu Nov 05 07:25:36 2015 +0200 @@ -0,0 +1,35 @@ +#ifndef GOATVR_H_ +#define GOATVR_H_ + +int gvr_init(void); +void gvr_cleanup(void); + +/* Enter VR rendering mode. GoatVR will assume control of your output, go fullscreen, + * reposition your window to show up on the VR device, or whatever is needed depending + * on the selected vr module. + */ +int gvr_enter_vr(void); +/* Leave VR rendering mode and return to the previous rendering state */ +int gvr_leave_vr(void); + +/* ---- rendering ---- */ +void gvr_begin(int eye); +void gvr_end(void); +void gvr_present(void); + +/* expose internal render target objects, usually not needed */ +void gvr_get_viewport(int *vp); +unsigned int gvr_get_fbo(void); +unsigned int gvr_get_fbo_texture(void); +unsigned int gvr_get_fbo_depth(void); + +/* ---- tracking ---- */ + +int gvr_position(float *vec, int track_id); +int gvr_rotation(float *quat, int track_id); +int gvr_matrix(float *mat, int track_id); + +int gvr_view_matrix(float *mat, int eye); /* equivalent to inverse of gvr_matrix(mat, eye) */ +int gvr_proj_matrix(float *mat, int eye, float znear, float zfar); + +#endif /* GOATVR_H_ */