View matrix in opengl

Posted by user5584 on Game Development See other posts from Game Development or by user5584
Published on 2011-02-20T20:43:28Z Indexed on 2011/02/20 23:33 UTC
Read the original article Hit count: 472

Filed under:
|
|

Hi! Sorry for my clumsy question. But I don't know where I am wrong at creating view matrix.

I have the following code:

 createMatrix(vec4f(xAxis.x, xAxis.y, xAxis.z, dot(xAxis,eye)), 
 vec4f(  yAxis.x_, yAxis.y_, yAxis.z_, dot(yAxis,eye)), 
 vec4f(-zAxis.x_, -zAxis.y_, -zAxis.z_, -dot(zAxis,eye)), 
 vec4f(0, 0, 0, 1)); //column1, column2,...

I have tried to transpose it, but with no success. I have also tried to use gluLookAt(...) with success. At the reference page, I watched the remarks about the to-be-created matrix, and it seems the same as mine. Where I am wrong?

© Game Development or respective owner

Related posts about opengl

Related posts about matrix