dungeon_crawler

diff prototype/src/camera.cc @ 18:5c41e6fcb300

- commandline arguments - stereoscopic rendering - FBO fixed
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 21 Aug 2012 03:17:48 +0300
parents 77c302306206
children aa9e28670ae2
line diff
     1.1 --- a/prototype/src/camera.cc	Mon Aug 20 06:11:58 2012 +0300
     1.2 +++ b/prototype/src/camera.cc	Tue Aug 21 03:17:48 2012 +0300
     1.3 @@ -15,25 +15,6 @@
     1.4  	*mat = matrix().inverse();
     1.5  }
     1.6  
     1.7 -void Camera::set_glmat(const Matrix4x4 &mat) const
     1.8 -{
     1.9 -#ifdef SINGLE_PRECISION_MATH
    1.10 -	if(glLoadTransposeMatrixfARB) {
    1.11 -		glLoadTransposeMatrixfARB((float*)&mat);
    1.12 -	} else {
    1.13 -		Matrix4x4 tmat = mat.transposed();
    1.14 -		glLoadMatrixf((float*)&tmat);
    1.15 -	}
    1.16 -#else
    1.17 -	if(glLoadTransposeMatrixdARB) {
    1.18 -		glLoadTransposeMatrixdARB((double*)&mat);
    1.19 -	} else {
    1.20 -		Matrix4x4 tmat = mat.transposed();
    1.21 -		glLoadMatrixd((double*)&tmat);
    1.22 -	}
    1.23 -#endif
    1.24 -}
    1.25 -
    1.26  const Matrix4x4 &Camera::matrix() const
    1.27  {
    1.28  	if(!mcache.valid) {
    1.29 @@ -54,12 +35,12 @@
    1.30  
    1.31  void Camera::use() const
    1.32  {
    1.33 -	set_glmat(matrix());
    1.34 +	mult_matrix(matrix());
    1.35  }
    1.36  
    1.37  void Camera::use_inverse() const
    1.38  {
    1.39 -	set_glmat(inv_matrix());
    1.40 +	mult_matrix(inv_matrix());
    1.41  }
    1.42  
    1.43  void Camera::input_move(float x, float y, float z)