Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

lor3

Vertex drawing order - does it matter?

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

Quick question... things are beginning to move on my 3d framework (or engine if u like . Things are showing onscreen! Anyway, my question. I now have 3dObject''s that register with my objectmanager class, and get get called to render at the appriate time, to the passed vertex buffer. Reason for this being to stay within limits of vertex buffers, and was (in theory) to pass different vertex buffers to objects, depending on their "depth" within the scene. The problem with this idea is that sometimes, "far" buffers will actually cover closer objects, think the ground with a tree behind a hill or something. Now the question : Should i worry about draw order, seeing that z-buffers are always accelerated (on the hardware im targetting)? Another question; is the way im going about thing good program design for a 3d game? I am planning to implement index buffers at some point, probably by having each object use a function of the "object manager" to draw vertices, and that to organise the index?? Any comments very welcome! Thanks!

Share this post


Link to post
Share on other sites
Advertisement
yes it can be useful to implement a draw-order algorithm... One example being alpha blending - where the final result can be affected by whats already rendered/behind it. in those cases you may want to draw back-front.

but in general, you dont need to bother about it much! hw zbuffers tend to do the job...

but if you sorted them front-back then I''d guess it may go a fair bit faster...

Jack;

DirectX 4 VB: All you need for multimedia programming in Visual Basic
Formula 1 Championship Manager, My Game Project.

Share this post


Link to post
Share on other sites
Alpha blending, hmm good point. If that''s the case, anyone know any decent algos for sorting vertex draw-ordering ... ?

ATM think i might just have special flag for objects requiring alpha blending, and draw those last.

Share this post


Link to post
Share on other sites
For some case, drawing transparent last without ordering will work (ie additive ONE ONE blending). But in some case you may have to order alpha blended from back to front.

Share this post


Link to post
Share on other sites

  • 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!