oculus1

diff src/main.cc @ 5:681046a82ed2

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 15 Sep 2013 05:01:38 +0300
parents bb81990dc7c8
children d6dd6372add6
line diff
     1.1 --- a/src/main.cc	Sun Sep 15 04:47:12 2013 +0300
     1.2 +++ b/src/main.cc	Sun Sep 15 05:01:38 2013 +0300
     1.3 @@ -63,7 +63,7 @@
     1.4  	glEnable(GL_LIGHTING);
     1.5  
     1.6  	if(vr_init(VR_INIT_OCULUS) == -1) {
     1.7 -		//return false;
     1.8 +		return false;
     1.9  	}
    1.10  	return true;
    1.11  }
    1.12 @@ -83,6 +83,8 @@
    1.13  	vr_get_rotation(quat);
    1.14  	vr_get_rotation_euler(euler);
    1.15  
    1.16 +	Quaternion qrot(quat[3], quat[0], quat[1], quat[2]);
    1.17 +
    1.18  	static unsigned int prev_print;
    1.19  	if(msec - prev_print > 1000) {
    1.20  		printf("q(%.3f + %.3fi + %.3fj %.3fk)", quat[3], quat[0], quat[1], quat[2]);