MAX_FVF_DECL_SIZE

Started by
3 comments, last by wolfcom 16 years, 5 months ago
The DirectX Software development Kit define it as the following code: typedef enum { MAX_FVF_DECL_SIZE = MAXD3DDECLLENGTH + 1, } MAX_FVF_DECL_SIZE; is it right or wrong? thank you
Advertisement
Do you have any reason to believe it would be wrong?? Is it breaking your software in some way?

I'm not aware of there ever being problems with constants and enum flags shipped as part of SDK header files.


Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

i am confused with the syntax
MAX_FVF_DECL_SIZE has been used twice

i cannot do the same thing that uses the syntax in my application
so i think the header has some problem :)

The syntax is fairly standard, so I'm still not sure what your problem is.

A common usage of this is similar to that of MAX_PATH under regular Win32. See this function for example - setting a maximum upper limit on the returned array simplifies the functions usage. The alternatives are to make two calls, one to query the size and another to fill the data (assuming the app has sized the array appropriately) or to just take an array and a size and either hope it's big enough or to truncate the data once the destination array is full. Whilst the former may be neater for resource usage it has more potential for errors.

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

d3dx9mesh.h

the following is the definition of MAX_FVF_DECL_SIZE:

enum _MAX_FVF_DECL_SIZE
{
MAX_FVF_DECL_SIZE = MAXD3DDECLLENGTH + 1 // +1 for END
};

thanks :)

This topic is closed to new replies.

Advertisement