I am using a .tga file which i want to embed into my executable (dll). I did the following in my .rc file
#define ID_TEXTURE_CIRCLE 106
ID_TEXTURE_CIRCLE RT_RCDATA "circle.tga"
The .rc file gets compiled successfully. Then i am doing the following in the source file
V(D3DXCreateTextureFromResource( m_pDevice, NULL, MAKEINTRESOURCE(ID_TEXTURE_CIRCLE), &m_pPointTexture));
it gives "D3DERR_INVALIDDATA" !!!
I also tried
V(D3DXCreateTextureFromResource( m_pDevice, GetModuleHandle(NULL), MAKEINTRESOURCE(ID_TEXTURE_CIRCLE), &m_pPointTexture));
Still it gives it gives "D3DERR_INVALIDDATA" !!!
Could someone please give me some idea how to include a tga file into the .rc file and make D3D load it from the resource.