View Full Version : [SDL2.0 & OpenGL] When camera control goes bad...

05-15-2015, 06:26 PM
Good morning,

I have read several tutorials about Free Fly Cameras : based on SDL2.0 to grab input and control camera look with the mouse. I then tried to make my own but I obviously failed somehow.

What I have is a camera with a weird behaviour : when I try to look around, the entire space seems translating and rotating around something I do not know.
Should it be caused from a matrix mode mistake or a matrix calculation error, I am definitely struggling with this one and hope you guys will know how to give me a hint.

The bad point is that I have absolutely no clue about where it may come from, I'm not a bad C programmer I promise, but this one gives me a hard time ^^. Besides, you will find the source code as an attached document commented with Doxygen.

Should you need any more information, just ask :)

05-17-2015, 02:55 AM
Solution : the first gluLookAt call was executed on GL_PROJECTION matrix, hence entire 3D environment corruption.