View matrix in opengl
- by user5584
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?