goatvr1

changeset 0:c994aa032e3c

start planing the goatvr1 api
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 05 Nov 2015 07:25:36 +0200
parents
children 3698f7b31ee6
files include/goatvr.h
diffstat 1 files changed, 35 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/include/goatvr.h	Thu Nov 05 07:25:36 2015 +0200
     1.3 @@ -0,0 +1,35 @@
     1.4 +#ifndef GOATVR_H_
     1.5 +#define GOATVR_H_
     1.6 +
     1.7 +int gvr_init(void);
     1.8 +void gvr_cleanup(void);
     1.9 +
    1.10 +/* Enter VR rendering mode. GoatVR will assume control of your output, go fullscreen,
    1.11 + * reposition your window to show up on the VR device, or whatever is needed depending
    1.12 + * on the selected vr module.
    1.13 + */
    1.14 +int gvr_enter_vr(void);
    1.15 +/* Leave VR rendering mode and return to the previous rendering state */
    1.16 +int gvr_leave_vr(void);
    1.17 +
    1.18 +/* ---- rendering ---- */
    1.19 +void gvr_begin(int eye);
    1.20 +void gvr_end(void);
    1.21 +void gvr_present(void);
    1.22 +
    1.23 +/* expose internal render target objects, usually not needed */
    1.24 +void gvr_get_viewport(int *vp);
    1.25 +unsigned int gvr_get_fbo(void);
    1.26 +unsigned int gvr_get_fbo_texture(void);
    1.27 +unsigned int gvr_get_fbo_depth(void);
    1.28 +
    1.29 +/* ---- tracking ---- */
    1.30 +
    1.31 +int gvr_position(float *vec, int track_id);
    1.32 +int gvr_rotation(float *quat, int track_id);
    1.33 +int gvr_matrix(float *mat, int track_id);
    1.34 +
    1.35 +int gvr_view_matrix(float *mat, int eye); /* equivalent to inverse of gvr_matrix(mat, eye) */
    1.36 +int gvr_proj_matrix(float *mat, int eye, float znear, float zfar);
    1.37 +
    1.38 +#endif	/* GOATVR_H_ */