Sign in to follow this  
ViperG

Display Lists/VBO/Point Sprites

Recommended Posts

ViperG    206
Currently I'm using immediate mode for everything, all are rendered quads in my game. Since I'm in 2D ortho mode, the most quads I will ever draw will be about 5,000 on the scene at once. I'm undecided if I should go ahead and switch everything into Display Lists or VBO's, and switch all my particles into point sprites. For instance, your normal scene during game play you will see about 100 quads. 100 quads is nothing, and it won't make any difference what method im using to draw them. I'm just wondering if I should take the time to do this, when the performance difference won't be seen unless someone is trying to play on a 500mhz computer :/. The only calls I make are pretty much transform and rotate. And sometimes a glscale (zooming or explosions etc). and are point sprites a good way to do explosions? (movement, scaling, rotating) Should I just do it, or am I wasting time?

Share this post


Link to post
Share on other sites
V-man    813
I don't think you will get a performance boost if that is what you mean because 5000 quads means 20000 vertices, which is nothing at all for the GPU.
The advantage of using VBO or display list is that you make less functions calls so it reduces CPU usage.

Share this post


Link to post
Share on other sites
purpledog    163
btw, forget about display list, vbo is far more "openGL 3.0 friendly".

Instead of quads or point sprites, you can use instancing. Google for "gl_InstanceID" (the last time I tried I could not make it work...)

Share this post


Link to post
Share on other sites
Lord_Evil    680
Well, if you draw 5000 quads in a frame, you'd need 20000+ OGL calls. If you moved this to VBO you'd get some advantages:
- vertex data is stored in video memory, i.e. it doesn't have to be passed over the bus every frame if it doesn't change
- the vertex data is compiled already and thus can be reused (if it doesn't change)

As a side note, if your transformations don't change that often you could calculate the transformation matrix once and provide this to OGL instead of recalculating it every frame.

Share this post


Link to post
Share on other sites
zedz    291
even slow (<500mhz) computers can handle 5000 quads with immediate mode easily
but if u say theres only gonna be 100 visable at once then even more so, u will see no difference by changing over the DL or VBO

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this