0
\$\begingroup\$

I'm trying to read and ultimately write a mesh from/to file. This mesh has 2 sets of texture coordinates. The second set I know are held within the FVFData{} block of the .x file. The second set of coordinates is the only data within this block...the block looks like this:

FVFData {
258;
60;
1050755713,
1060090006,
...
}

This is 30 sets of 2 floating point values...

258 is equal to 0x102... D3DFVF_TEX1( 1, 2-component vector ) is equal to 0x100... ...where does the extra 0x002 come from? is that just D3DFVF_XYZ..? ...why are they coupled for this data block when there is no position data in the block?

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

From the D3D9 headers (specifically, d3d9types.h), you can see that D3DFVF_TEX1 is indeed 0x100 and D3DFVF_XYZ is 0x2; that means the FVF for that line is equivalent to D3DFVF_XYZ | D3DFVF_TEX1.

That's not invalid, though it sounds like it doesn't make sense in your context. It's not really possible to determine how the value got there with the limited information you've provided. My first guess would be a faulty assumption in the exporter being used that assumes all flexible vertex specifications would include positional data.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .