Jump to content

  • Log In with Google      Sign In   
  • Create Account

Vertex and index buffers


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Chris_F   Members   -  Reputation: 2461

Like
0Likes
Like

Posted 08 February 2012 - 01:31 AM

Currently I am simply using an array of vertex structs in my vertex buffer. Each struct contains my position, normal and UV coordinates. Is there a way with D3D11 to separate this into 3 different buffers and render it using an index buffer with multiple indexes?

Sponsor:

#2 Hodgman   Moderators   -  Reputation: 31799

Like
1Likes
Like

Posted 08 February 2012 - 01:43 AM

AFAIK, using multiple index buffers at once (to index different vertex attributes) isn't possible. You could emulate it however, e.g. by storing indices inside your vertex structure (instead of values), and storing the values inside a tbuffer etc.

#3 MJP   Moderators   -  Reputation: 11737

Like
0Likes
Like

Posted 08 February 2012 - 03:14 AM

You would have to manually sample a structured buffer in the vertex shader, since the IA only supports one index buffer at a time.

#4 mhagain   Crossbones+   -  Reputation: 8276

Like
0Likes
Like

Posted 08 February 2012 - 02:48 PM

Separating into three separate buffers is also bad for performance - GPUs don't like to recieve data in that kind of layout (it's something that was valid back in the old software T&L days for sure, but it's both redundant and harmful today). This is a clear case where there is a tradeoff between performance and memory usage, so remember: memory is cheap and plentiful, performance isn't.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS