Archived

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

Militia

D3D FVF

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
It''s possible just not very feasible.
The big thing would be to make sure the variables are public.

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