• Advertisement

Archived

This topic is now archived and is closed to further replies.

Guest Anonymous Poster

Load mesh from resource

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

Guest Anonymous Poster
IDR_MYMESH is the mesh resource
"MESH" is the section its located under
the quotes are part of the name.

This code SHOULD work.

D3DRMLOADRESOURCE resinfo;
resinfo.hModule = 0;
resinfo.lpName=MAKEINTRESOURCE(IDR_MYMESH);
resinfo.lpType="MESH";

d3drm->CreateMeshBuilder( &mesh );

mesh->Load(&resinfo, 0, D3DRMLOAD_FROMRESOURCE, 0, 0);

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I need help loading a mesh from a resource using meshbuilder.

I added a custom resource to my applications resources called "MESH" and inserted a directx file IDR_MYMESH (mymesh.x).

Then I created a D3DRMLOADRESOURCE:
myResource.hModule = NULL;
myResource.lpName = MAKEINTRESOURCE(IDR_MYMESH);
myResource.lpType = "MESH"

then I called the meshbuilder load method:
myBuilder->Load( &myResource, NULL, D3DRMLOAD_FROMRESOURCE, NULL, NULL);

The problem seems to be that lpName isn't receiving the IDR_MYMESH resource name. It contains "".

Thanks...

Share this post


Link to post
Share on other sites

  • Advertisement