PDA

View Full Version : Fastest/Best way of moving



Dies_Irae
11-30-2001, 04:51 AM
Hello,

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 http://www.opengl.org/discussion_boards/ubb/smile.gif Create the scene, and the enter the GL_PROJECTION mode and move the cam?.

Or is there another faster way?


/ Thanks, Per

Bob
11-30-2001, 05:10 AM
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.

Dies_Irae
11-30-2001, 08:47 AM
Ok tx,

So its not a bad thing to have my own function that will move the objects then?

Bob
12-01-2001, 04:13 AM
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.

rixed
12-05-2001, 04:53 AM
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.