PDA

View Full Version : Using opengl for large 2d datasets



04-26-2005, 09:53 AM
I need some clarification on how OpenGL works.
I'm trying to use OpenGL to display map data. To draw all the streets, boundries, etc. in a state, even as simple lines, can easily use 10 million vertices.
I want to be able to pan and zoom around the map. I also need to be able to draw a polygon on top of the map sections and be able to move/stretch it in real time.

I'm using gluOrtho2D to do the pan and zoom.
Is there any way to pan and zoom without reentering the data each time?
By this I mean is there anyway to do the pan and zoom without modifing the original vector data like gluOrto2D does? (such as separate input and output vector data spaces).
It takes about 350mS to update the screen using GlOrtho2D and glCallList.
How can I draw/move/strech a polygon in real time?
Updating the polygon as I drag with the mouse at 3 times a second isn't acceptable.
Will overlays do this?
I found some code to do overlays in windows, but it tells me that my video cards don't support overlays, yet nvidia's website says all of the later cards support overlays. I have a nvidia 5200 and 5600.

MMMovania
04-26-2005, 07:11 PM
Originally posted by <tpb>:
I need some clarification on how OpenGL works.
I'm trying to use OpenGL to display map data. To draw all the streets, boundries, etc. in a state, even as simple lines, can easily use 10 million vertices.
I want to be able to pan and zoom around the map. I also need to be able to draw a polygon on top of the map sections and be able to move/stretch it in real time.
I'm using gluOrtho2D to do the pan and zoom.
Is there any way to pan and zoom without reentering the data each time?
By this I mean is there anyway to do the pan and zoom without modifing the original vector data like gluOrto2D does? (such as separate input and output vector data spaces).
It takes about 350mS to update the screen using GlOrtho2D and glCallList.
How can I draw/move/strech a polygon in real time?
Updating the polygon as I drag with the mouse at 3 times a second isn't acceptable.
Will overlays do this?
I found some code to do overlays in windows, but it tells me that my video cards don't support overlays, yet nvidia's website says all of the later cards support overlays. I have a nvidia 5200 and 5600.Well I would not recommend you to actually draw the vertices onthe map i have seen maps and they can very easilt mess with zillions of lines. I think the better approach would be to keep the map as a raster image and add it to an orthogonal plane. U can create magnification quite easily in the map image by altering the texture coordinates and it can be panned and zoomed in and out by changing the eye coordinates. Have a go with this approach and see if it sorts your problem out.
Thanx
MMM