Jump to content
  • Advertisement
Sign in to follow this  
TGPrankster

X file resources

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

OOOOOkay I'm stuck again. How do I load an x file as a resource, and load it into a mesh? I know to use the D3DXLoadMeshFromXResource function, but I can't get it to work beyond that. Anyone know how to do this?

Share this post


Link to post
Share on other sites
Advertisement
Hey there,

You might want to take a look at this article, that shows how to use resources.
You can also check out my answer in that previous thread. Note the use of RCDATA that seems to be mandatory for some DirectX resource accessor functions...
Cheers
StratBoy61

Share this post


Link to post
Share on other sites
I searched around the links you gave and got the resource to work, but now I have another question.

When I use the D3DXLoadMeshFromXResource function, it will only work if I supply the ID number of the resource ("#100") for the Name parameter. It won't load correctly if I use the ID name ("ID_TUXEDO"). Can you help me with that?

Share this post


Link to post
Share on other sites
Haved you tried D3DXLoadMeshFromXResource(NULL, MAKEINTRESOURCE(ID_TUXEDO), etc.) ?
MAKEINTRESOURCE is a macro defined in WINUSER.H as #define MAKEINTRESOURCE(i) (LPSTR)((DWORD)((WORD)(i)))

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!