Archived

This topic is now archived and is closed to further replies.

Position objects.. newbie question

This topic is 5779 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I''m very new to the OpenGL scene and have been following the NeHe tutorials but have found them to lack info on this simple area. Basically, lets say I have 5 balls/objects and I want to position them ? I thought glTranslatef() would do this but that does not appear to be the case or I''m doing something wrong. Most the NeHe tutorials are dealing with static objects or only 1 object. Basically I have the floor, just a quad, and I have a ball mesh/object/vertices. Basically when drawing the balls what is the best way to draw them ? I was Adding the position (which i''m grabbing from an array) to the vertices, but surely there has to be a better way, or an GL command to do this ? and as a side note, where can I get the Open GL SDK that explains all the functions, etc ? I''ve downloaded several things from opengl.org but none of them had this info. Thanks in advance!

Share this post


Link to post
Share on other sites
Glad you found your answer.
quote:
Original post by Darjk
and as a side note, where can I get the Open GL SDK that explains all the functions, etc ? I've downloaded several things from opengl.org but none of them had this info.




OpenGL® Reference Manual: The Official Reference Document to OpenGL, Version 1.2, 3/e


OpenGL Architecture Review Board

Publisher: Addison Wesley
Copyright: 2000
Format: Paper, 704 pp
ISBN: 0-201-65765-1
Status: Published 12/23/1999
Retail Price: $54.99 US





Edited by - Fruny on February 16, 2002 3:29:28 AM

Share this post


Link to post
Share on other sites
Ran into more problems, after scaling say, the floor..
Is it possible to "reset" the scale back to what ever the default is without reseting the whole view ?

Share this post


Link to post
Share on other sites
Just add more push/pop : set the view, push, scale the floor, pop.
Or do it the hard way with a second call to glScale*() with the complementary ratios.

Share this post


Link to post
Share on other sites
Ahhhh... cheers, that did the trick!
You have no idea how long I''ve been trying to figure out some of these glFunctions.

Been programming with DirectX for about 3 years but after seeing how much easier the coding was with OpenGL I figured I''d start to teach myself. I guess I''ll have to invest in that book you suggested above.

Thanks again.

Share this post


Link to post
Share on other sites
There is also the Red Book (OpenGL Programming Guide) which is actually geared to teach you OpenGL. The Blue Book is the complete reference, all the functions in alphabetical order, with the parameters, constants & everything (i.e. something that isn''t available for DX... I hate online manuals).

I know books are expensive, but when you are serious about programming, you quickly find out that you need them (at least the good ref manuals).

Share this post


Link to post
Share on other sites