Archived

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

D3D FVF

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

Meandering thoughts of a man whos been up way too many hours here.. I was wondering if there was some way of using a class instead of a struct for a flexible vertex format? Sounds improbable, but I''ll just pimp the knowledge pool anyways. - Militia

Share this post


Link to post
Share on other sites
Well , I think you could use a class , whose members are the first members in the class itself.

I don''t think they have to be public , because D3D functions such as SetStreamSource don''t care about the vertex pool paramter. I think it''s a void or something equivalent. The function totally depends on the given FVF to access the memory in the given struct/class.

So just make sure you pass the correct stride , and put your data members first in the class.

"Nothing''s too hard , but everything''s too consuming"
www.geocities.com/coder_eg

Share this post


Link to post
Share on other sites