Jump to content
  • Advertisement
Sign in to follow this  
wolfcom

MAX_FVF_DECL_SIZE

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

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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 :)

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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 :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!