• Advertisement

Archived

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

Bitmap as a resource

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

Hi I want to hide the bitmap that is used as a texture from the user. Here what I did I created a resource file in my project, then I inserted a bitmap. MSVC++ installed a blank bitmap with the name IDB_BITMAP1, I copied and pasted to that blank bitmap the bitmap I wanted.(I inserted resource.h to the project) This bitmap is supposed to be a texture as follows. D3DXCreateTextureFromFile( g_pd3dDevice,"banana.bmp",&g_pTexture ) Now how do I modify the code to get the texture from IDB_BITMAP1 instead of getting the texture from banana.bmp Best regards If love is illusion and hate is real, I would rather be crazy

Share this post


Link to post
Share on other sites
Advertisement
I''m thinking this would work:

D3DXCreateTextureFromResource(g_pd3dDevice, hInstance, MAKEINTRESOURCE(IDB_BITMAP1), &g_pTexture)

Share this post


Link to post
Share on other sites
Yes it does

Thanks

If love is illusion and hate is real, I would rather be crazy

Share this post


Link to post
Share on other sites

  • Advertisement