Jump to content
  • Advertisement
Sign in to follow this  
datadawgx

vertex buffers vs immediate mode

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

vertex buffers vs immediate mode drawing what are the major practical advantages and disadvantages of using one style over the other? when are either appropriate? i have books to read about both, but they say little to the practical application of either technique. thanks guys!

Share this post


Link to post
Share on other sites
Advertisement
I thinks the main diference is the speed of the technique. the vertex buffer is perhaps a litle more complex to use but he is a lot more fast. The immediate mode must send all the data by the video port (agp,PCI express) and the speed of processing of the GPU is superior to the bandwith of the port. so the GPU don't work at it's peek. You can want to use immediate mode for test, but dont use it in true application. The only exception i see (and it's not a true one) is if each vertex of an object move independently (morphing by example). But, with vertex programme, you can do advanced morphing. If you really need to send all the vertice, prefer a dynamic vbo I think.

--
Cédric
Sorry for the language, I am french and I havn't often to use english(for the moment so...)

Share this post


Link to post
Share on other sites
Even for objects whose vertices undergo changes (morphing ones for example as mentioned), move the verts around in the application proper, upload the new updated vertex positions via a vertex array and render it like that.

*never* use immediate mode for anything but testing - it is horribly ineffecient.

Share this post


Link to post
Share on other sites
indeed, immediate mode does have its uses, mostly for low poly things like GUIs when it comes to drawing and setting a sticky per-object state (such as a general colour) where a per-vertex array would be a waste of memory.

All the OGL functions have their place, you just have to learn when the right time to use them is [smile]

Share this post


Link to post
Share on other sites
Il have to add one more thing.

The vertex buffers main advantage like said above is the use of Video Card memory which means better performance. The main disadvantage I think that it is not supported by old video cards, don't know exactly what cards are supported, maybe someone can find a list of supported cards.

Share this post


Link to post
Share on other sites
i think _the_phantom_ sums it up best.

to say using vertex buffers is faster than immediate mode is simply untrue ...it depends on the situation ..for e.g, when rendering say a static mesh such as brute force terrain algo ...the fastest way to render that is with a display list using immediate mode, i have tried testing this ...the fastest method i found was using GL_TRIANGLE_STRIP, with the vertex buffer way i created a VBO for both the vertex buffer and indice buffer but the display list was still faster. Take away the display list and u all know what happens than, the vertex buffer way slays it ...obviouslly with dynamic situations vertex buffer way is faster

Share this post


Link to post
Share on other sites
I was obviously talking about sending a bunch of glVertexX commands. A glColor4f here and there to set a 'sticky state' as _the_phantom calls it is certainly OK. there's no need to do anything fancy there.

The performance gains for something like a quad (for GUIs) from immediate mode to VARS or VBOs are negligible or non-existent.

As far as rendering your terrain, have you tried using a vertex array in a display list? display lists aren't immediate mode anyway, so the point doesn't hold anyway.

For any geometry of considerable complexity I advocate using vertex arrays or VBOs. Perhaps my statement of *never* was too strong...i should have said 90.43352% of the time don't use immediate.

Share this post


Link to post
Share on other sites
Quote:
Original post by Aeluned
As far as rendering your terrain, have you tried using a vertex array in a display list?

Since the needed data from enabled arrays is calculated and baked into the display list during the creation ... just like the regular operations during the 'compilation' of immediate mode... how would that change the display list performance in any way? o.O;

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!