Updating Ortho vs Updating Vertices
Im writing a program that displays a stream of coordinates. The program is designed to center on the newest point. This means that the points are constantly moving (relative to the screens coordinate system, the points themselves never change their geographical coordinates).
My question is is it more efficient set update glOrtho it everytime a new point comes in (in an attempt to keep the projection centered on the newest point) or map glOrtho once and convert each point to a new relative position everytime a new point comes in.
To clarify... My viewport represent a 50mx50m plot of land, I am recieving a stream from a GPS. My viewport centers on the newest point. Should I:
1. Set GlOrtho(-25,25,-25,25,0,1) and draw vertex's by their geographical location. Everytime a new point comes in I would restate GlOrtho to center on the next point. Or
2. Set GlOrtho(0,50,0,50,0,1) and draw vertex's relative to the newest point (the newest point is (2 m, 2 m) would draw at (25,25) and another point at (3 m, 3 m) would draw at (26, 26). Everytime a new point comes in I would have to reconvert each point to their new relative coordinates.
The number of coordinates increase the longer the program is running I expect to reach millions of coordinates.
Last edited by Beiufin; 06-25-2012 at 02:08 PM.