Personally I think you're making things needlessly difficult. Vectors aren't supposed to support this usage. Just block out your own memory (array/vector/whatever) and give the meshes a pointer and an offset. As far as the interleaving thing, just keep in mind that on-chip GPU bandwidth is gigantic and vertices are few. Interleaving unused attributes just means a bit of extra copy bandwidth. On the other hand, some hardware (all NV chips circa 2008, not sure what the situation is these days) can't use separated streams, so the driver has to go in and interleave the streams into spare memory before the draw is executed. I also suspect that using mismatched vertex formats between the vertex buffer and the shader will cause a few internal recompiles, though that's relatively minor.
PromitMember Since 29 Jul 2001
Offline Last Active Today, 08:00 PM
Game dev in Neuroscience @ Johns Hopkins Medicine, Max & Haley LLC. Built SlimDX, SlimTune. Moderator at https://t.co/fo7iKhCK8Y.
- Group Moderators
- Active Posts 15,561
- Profile Views 32,921
- Submitted Links 0
- Member Title Moderator - Graphics Programming and Theory | Baron von Bacon Po
- Age 29 years old
- Birthday March 30, 1987
Expert Community Member
- Website URL http://promitroy.com