RandomTiger Posted June 22, 2003 Posted June 22, 2003 Hi there, Im having real trouble finding example code / tutorials using this function (D3DXCreateTextureFromResource). So far I have managed to get it working with a bmp from the resources. However I want to be able to load a jpg (which it says it supports) because I need to keep file sizes down, it says that the image must be registered as a custom resource but I dont know how to do that. Quote
*Experts* Nerseus Posted June 27, 2003 *Experts* Posted June 27, 2003 Can you post the sample project you're using that loads a bmp from a resource? I'll see if I can't get the JPG to load. -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
RandomTiger Posted June 28, 2003 Author Posted June 28, 2003 hr = D3DXCreateTextureFromResource(m_pd3dDevice, GetModuleHandle(NULL), MAKEINTRESOURCE( IDB_BITMAP), &m_texture); Heres the code, I would prefer not to post the whole code at this point. I think its something to do with how I include a resource in the project. Its more of a win32 problem. Even if I could just read it from the registry into memory and then pass it to 'D3DXCreateTextureFromMemory' but I just cant work out how to load a custom resource. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.