Skip to main content
Tweeted twitter.com/#!/StackGameDev/status/39555636677181440
edited tags
Link
Notabene
  • 6.1k
  • 1
  • 33
  • 40
Source Link
user5584
  • 171
  • 1
  • 5

View matrix in opengl

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?