View Full Version : Quick Question

Preston Chaderton
03-23-2004, 11:49 AM
Hello Everyone,

First, since I just joined, I might as well introduce myself. My name is Preston "NWC_Omega" Chaderton. I have been programming since Christmas of 2002. My primary language of choice is Dark Basic Professional. But I am looking to change that. For christmas of 2003 I got Microsoft Visual C++ .net Standard Edition 2003 and with it the ability to program OpenGL. It is only up to now that I have even bothered to make any progress with it, considering I have school and another project in DBPro I'm working on (which is a 3D modeller I've named Kaiser3D (that is until someone tells me that the name is taken and cannot be found with a google search, its old name was Decoy3D until I was notified by Desgraff and was notified the name was taken (and ever since I've searched high and low for someone else using the name Kaiser3D to no discovery of it being used))).

Now, I've started from NeHe's OpenGL tutorials. They have helped me along quite well, but one thing confuses me. Controlling the viewpoint. Before I've been acustomed to controlling the viewpoint (or camera) using simple commands such as position camera (camera),(x position),(y position),(z position) and rotate camera (camera),(x angle),(y angle),(z angle). But I just cannot completely grasp the concept of positioning the camera first and then drawing the world out onto the scene one triangle (or quad) at a time based on the cameras location, I've just been too used to it otherwise. So, my question is, are there any other commands (other than glTranslatef and glRotatef) that I am not aware of that could help me with this (such as positioning the camera after the world has been layed out)? If there is, could you please tell me what it is, and its full syntax (and explanation of variables with names that are not completely clear)? Thanks in advance for all that do.


03-23-2004, 01:53 PM
What is the problem with glRotatef and glTranslatef? The OpenGL commands map directly onto what's going on in the pipeline. It's not too complicated. I'd suggest getting OpenGL Pograming Guide.

03-23-2004, 05:31 PM
You might want to take a look at gluLookat.

The documentation is all over the Net, Google's your best friend in that department.

I agree with endash -- you definitely want to get the OpenGL Programming Guide.

(Edited for typos)

03-24-2004, 03:47 AM
Had similar problem myself. The thing is the OpenGL does what it does very efficiently. This becomes quite abvious when you start doing more complicates rendering of scene, for instance assemblies of bodies, articulated stuff, etc.

I suggest you forget what you know, and get into OpenGL thinking; the sooner the better for you.

The red book is a must. Actually, if you want to program OpenGL, the red book is more essential than .NET! I'd also suggest not to stick to a single source of tutorials. Having said that, NeHe is a very boog start.


Preston Chaderton
03-24-2004, 11:08 AM
Thanks everyone for the prompt reply. I'll try and buy the OpenGL Programming Guide soon. As for my camera problem, I've thought a bit at school and using two commands I found through a forum search (glPushMatrix() glPopMatrix()) and using a few arrays and structs (as well as a few functions here or there of my own creation) I may have an answer to it. If I get anything worthwhile done, I'll share it with everyone (if only there was a showcase board here or something).