Jump to content
  • Advertisement
Sign in to follow this  
0v3rloader

OpenGL Absolute/relative coordinates

This topic is 4156 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

Quote:
From OpenGL FAQ: 9.050 What are the pros and cons of using absolute versus relative coordinates? Some OpenGL applications may need to render the same object in multiple locations in a single scene. OpenGL lets you do this two ways: 1) Use “absolute coordinates". Maintain multiple copies of each object, each with its own unique set of vertices. You don't need to change the ModelView matrix to render the object at the desired location. 2) Use “relative coordinates". Keep only one copy of the object, and render it multiple times by pushing the ModelView matrix stack, setting the desired transform, sending the geometry, and popping the stack. Repeat these steps for each object. In general, frequent changes to state, such as to the ModelView matrix, can negatively impact your application’s performance. OpenGL can process your geometry faster if you don't wrap each individual primitive in a lot of changes to the ModelView matrix.
I'm a bit unsure as to what's meant by using "absolute coordinates" and "maintain[ing] multiple copies of each object" and particularly the "need [not] to change the ModelView matrix", as I thought you always have to specify the transform (change the modelview matrix) regardless of however you choose to hold object's in memory (duplicates or not.) Also how does this differ from the "use [of] relative coordinates?" [Edited by - 0v3rloader on July 25, 2007 10:07:34 PM]

Share this post


Link to post
Share on other sites
Advertisement
(1) refers to a situation where a program, to move a car 10 meters to the right, actually edits all the vertices of the car to add 10 to them. In this situation, a separate transformation matrix is not used. This is the approach generally used for particle systems. It is not widely used otherwise.

Share this post


Link to post
Share on other sites
Quote:
Original post by Sneftel
(1) refers to a situation where a program, to move a car 10 meters to the right, actually edits all the vertices of the car to add 10 to them. In this situation, a separate transformation matrix is not used. This is the approach generally used for particle systems. It is not widely used otherwise.


Good stuff! Confusion now gone, mind clear, future is bright again > thanks!

:-)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!