Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


Load mesh from resource


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 02 September 1999 - 07:53 AM

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...


Sponsor:

#2 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 02 September 1999 - 07:53 AM

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);






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS