Jump to content
  • Advertisement
Sign in to follow this  
RuneLancer

Vertex Arrays and Display Lists

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

Hi, I've recently started considering how to handle models in my game and hit somewhat of an issue. Essentially, I was planning on chopping up my models into a couple of blocks that I'd shove into display lists. Each display list would hold static objects and I'd move/rotate them independantly (say, I'd have a foot, leg, and thigh, each being in a different display list.) Seemed a decent application for low-poly models, but then I hit a bit of a snag. Suppose I want to have a slime enemy, this technique hardly makes it possible to pull this off properly. Display lists cannot be altered once created, so making the slime wobble about would be impossible (short of some pretty crummy scaling effects, which I just plain won't settle for ;) ) Vertex arrays seemed very interesting because they allow such a model to exist, so I started looking into those. Now I'm not sure which to pick. Given that most enemies could just rely on a few display lists, but that I would still need to alter others on the fly, I'm not sure wether I should use vertex arrays for everything, or to have two possible rendering methods. What are the pros and cons of using both, and of using vertex arrays even when a display list would do the trick? (Quick background on the game, I'm aiming for low to middle-end PCs. Mid P3 era, sorta. So I'm staying away from relatively new things older graphics cards may not support, such as VBOs. I'll eventually use those things and make the game gracefully decline in terms of features, but for now I plan on just getting it to work for my target audience. ;) )

Share this post


Link to post
Share on other sites
Advertisement
Hmm if I remember right GF3 has vertex shaders or vertex programs? You can use DL with what you want to do you just need to use a vertex shader or vertex program and move/animate your vertices of you models...

Share this post


Link to post
Share on other sites
Display List are very similar to vertex arrays; the main difference is that you can store also commands, state changings, ...

Display List

  • pros


    • Simple

    • Well supported by every implementation

    • Fast



  • cons


    • You can modify them but probably you achieve worse results than immediate mode

    • 'old-fashioned'

    • the complexity to manage multiple and nested display lists grows exponentially

    • When you pass vertices you create a new copy of your data in the client-system memory





Vertex arrays

  • pros


    • Well supported by a lot of implementations (at least every card < 3 years old)(who remember the glorious 3dfx?)

    • Very efficient (memory usage and speed)

    • You can use VBOs without change your code (see my post)



  • cons


    • Not very simple and you have to organize your data

    • You have to pay attention to all those client states




My opinion :
- use VA for dynamic data and/or large blocks
- use DL for other stuff (simple and static models, materials, lights, states)
- you can also try to insert VA in disp list (only DrawElements/Arrays)

see Display List faq (opengl.org)


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!