D3D FVF

Started by
1 comment, last by Militia 22 years, 11 months ago
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
Advertisement
It''s possible just not very feasible.
The big thing would be to make sure the variables are public.
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

This topic is closed to new replies.

Advertisement