Sign in to follow this  

Simple Question about Vertex Arrays

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

I have multiple objects each with their own array of Vertices that need to be drawn to the screen. How should I approuch this, a) Use one vertex buffer and just compact the vertices together even though its NOT the same object, and use a little trickery witht he index buffer? <----The more I think about it, the more this makes sense...... b)Create a Vertex buffer for each object, BUT that might get crazy, becuase lets say I have 5 objects of 1 type, and 1 object of another and 3 objects more left, that would be 10 Vertex Buffers. Can I assign each buffer to a different "source" for the D3D device? or is there a max? Well once I figure this out and my other problem I can start loading my models into my FG - Sonic 2-2(1/2)D w000t... THanks in Advance

Share this post


Link to post
Share on other sites
Hi,

both is doable. But I would only use a) if it was for static objects.

Your b) statement is not quite right. It's very well possible to use the same vertex buffer if you have 5 objects of type 1. You simply have to decouple your vertex data from your objects and instead let your objects reference to the vertex data. Like this all your type 1 object would refer to the same vertex data.

Metron

Share this post


Link to post
Share on other sites
So when its time to "render" the objects just re-user the vertex buffer but draw them in a differnt place? to simulate different Objects.....uh yes I think I'm seeing this.

Well IS there a Maxium Vertex Source? like only 8 vertex buffers can be used per-scene? I never thought about it, I might just google that question, but does anybody know on the top of their head?

Share this post


Link to post
Share on other sites

This topic is 4868 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.

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