What is the fastest/best way of moving the camera/objects in a scene, like if you just want to walk around in the space.
I created my own function that will move the objects relative to my possition since i didnt know better, now i have seen the GL_PROJECTION Create the scene, and the enter the GL_PROJECTION mode and move the cam?.
Or is there another faster way?
/ Thanks, Per
Whatever you do, DO NOT transform the projection matrix. As for speed, go with whatever you feel is best for you. You won’t notice any difference in performance.
So its not a bad thing to have my own function that will move the objects then?
Depends on what you mean by your own functions to move an object. You can create your own transformation matrices, and upload them to OpenGL. How you create them doesn’t make much difference. That won’t be any slower than letting OpenGL create them. In the end, you will always get only one modelview and projection matrix. However, you should not transfrom each vertex yourself, and pass pretransformed vertices to OpenGL.
The more natural way and the more efficent (althrough this is rarely the bottleneck) is to push the trasposed camera position on the bottom of the modelview stack.