Sign in to follow this  

D3DXCreateTextureFromResource

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

Real simple, all its supposed to do is load a .bmp file from a resource. Assume the resources are attached correctly. :P IDirect3DTexture8 *pTemp = 0; D3DXCreateTextureFromResourceA(pDevice, NULL, MAKEINTRESOURCE(IDB_BITMAP1), &pTemp); This fails, the error saying D3DXERR_INVALIDDATA, which tells me absolutely nothing. (error number -2005529767) The device is there, and it is ok. Im suspicious about the NULL. MAKEINTRESOURCE is the culprit I think. pTemp is ok I think. resource.h is attached to the c++ file where these statements occur. Ive looked at the MAKEINTRESOURCE macro, which leads to this define: #define MAKEINTRESOURCEA(i) (LPSTR)((DWORD)((WORD)(i))) Whats going on here? Whatever you send MAKEINTRESOURCE gets converted into a WORD, then a DWORD, then a LPSTR? Why? confused Jason

Share this post


Link to post
Share on other sites

This topic is 4832 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this