View Full Version : complicated polygons
01-21-2004, 10:40 PM
Hi,i am rendering 2d vector map from thousands (~10.000) of polygons. Each polygon consists of up to 3.000 points. Source data file is about 100 mb. Polygons are mostly non-convex sometimes with holes so i tesselate em using glut (v1.3). This is very slow so i am trying to put em to display lists but after some amount of display lists is created others are creating incredible slowly (unusable). Now I am creating display lists only for polygons with more then 1024 points but rendering is still very slow. What makes me mad is other apps without opengl are drawing this 2d vector map much faster http://www.opengl.org/discussion_boards/ubb/redface.gif( Any ideas how to speed up ? Plz hlp, thx.
01-22-2004, 12:15 AM
I would suggest that you use VBO instead of display lists. Should be a good deal faster.
01-22-2004, 12:20 AM
Ypu must have in mind that OpenGl implementations usually don't worry about such excentric cases. They are made to draw traingles and quads fast.
And I really don't know if it's not faster to make the tesselation yourself (you may hava some sort of data, or semantic information that makes it easier).
And then probably using VAO or other vertex array model you may probably reduce the problem of feeding 100MB of data!!!
01-23-2004, 04:31 AM
Hey, thx for advice. I changed tesselation so I am getting triangle list for every non-convex polygon and now i am rendering it using glDrawArrays() instead calling display lists. Its much better now. I want advance to VBO but my tesselated data are little big - about 300 MB in memory. Is there any way to use VBO in this case ? Or any other way to improve ?
01-23-2004, 06:28 AM
I really don't know how it will behave with such large load (and I can't teste now).
But theoreticaly it should be possible to do it anyway. What are the sizes of each triangle list? You could make a VBO for each one if a single one is TOO big.
01-23-2004, 06:55 AM
average is 3.000 polygons per list
max 30.000 polygons in one list
in worst case i have ~15.000 lists
rendered in one plane - only x,y (without z)
01-24-2004, 11:29 AM
Level of Detail + Culling
(drawing ~30M vertices may be overkill for screen resolutions containing 1M to 2M pixels).
My guess is that whether you use display lists or VBO, you're going to exceed your AGP and video RAM for most cards and whatever parts exceed will be exceedingly slow. Only define those portions you need and only at a resolution you need them.
[This message has been edited by Cyranose (edited 01-24-2004).]
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.