Jump to content
  • Advertisement

Archived

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

_sudo

Extra data in verticies

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

Is there anyway to put extra data in the vertex buffer and have D3D ignore it when reading? For example, I set the vertex format to use only position and diffuse color. However, I want 4 extra floats in my structure so I tried to set the vertex stride to represent this difference. This doesn''t work as Direct3D complains that the stride doesn''t match the specified vertex format? Any ways around this? _sudo

Share this post


Link to post
Share on other sites
Advertisement
there are some good reasons not to do that and store the information somewhere else (an array of vertexdata structs or something). first: if you read/write that data quite often you cant place it in vidmem without poor access times. if you place it in agp or sysmem you will have to send it all to the card. of course you can say ''agp 4x is fast enough'', but i wouldnt send more data than necessary and i wouldnt make swiss cheese out of a tightly packed buffer.

Share this post


Link to post
Share on other sites
I agree with your points, and it looks like that''s what I''m gonna have to do wether I like it or not. The only reason I asked is because I wanted to be able to use the same vertex structure for rendering either to D3D or OpenGL. I guess I can just convert the color data for OpenGL whenever the buffer is updated. Thanks for the reply.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!