View Full Version : Camera and Texturing problem

12-29-2003, 08:20 PM
Ok I have go around the net and read a bunch of tutorials now I have an few issues http://www.opengl.org/discussion_boards/ubb/smile.gif

First a camera issue, I can do 1st person and I can code 3rd person problem is I cant toggle. I use glutLookAt to move my camera around. Basically what I want is this:
(First going to Third)
(old view) P---->V
(new view)P--->V
My old camera position becomes my new viewing vector and then I move back to look over my model's "shoulder". Third to first is just the reverse where my old view becomes my new camera position and I need the new view.
Cant seem to find the simple equation to do this. The new position/view vector messes up depending on where I am in space and the equations code I use. Tried a bunch of formulas and now am lost.

Texture issue...how the heck do you tile?
If I have a HUGH quad and want to put a texture on it a few times how do you do this? (link?). Or do I have just have to chop the quad down and draw a bunch of them.

Thanks for any help!

12-29-2003, 08:21 PM
didnt draw the camera thing right thats
(old view)____P-->V
(new view)P-->V

12-29-2003, 11:33 PM
Read this, in very general terms it describes first and 3rd person viewing although it uses a higher level API than OpenGL. It shoudl give you a simple overview of one implementation in general terms.

12-29-2003, 11:39 PM
Use texture coordinates <0.0 and >1.0 and GL_REPEAT for texture parameters GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T and tiling will just happen automatically.