if(FAILED(g_pTexture->D3DXCreateTextureFromFile(g_pD3DDevice, "Texture.bmp",
&g_pTexture)))
return FALSE;
...Dev-Cpp gives me the error "'struct IDirect3DTexture9' has no member named 'D3DXCreateTextureFromFileA'"
"D3DXCreateTextureFromFileA" has not been called, to my knowledge, in this program... only "D3DXCreateTextureFromFile".
Createtexturefromfile Problem...
In the line...
D3DXCreateTextureFromFileA is the same as D3DXCreateTextureFromFile except that your compiler has resolved it to the ANSI version (D3DXCreateTextureFromFileA) instead of the Unicode version (D3DXCreateTextureFromFileW).
That said I am not sure what the actual problem is... what version of the SDK are you working with?
That said I am not sure what the actual problem is... what version of the SDK are you working with?
D3DXCreateTextureFromFile() is NOT a member of IDirect3DTexture9. Just call it like this:
D3DXCreateTextureFromFile(g_pD3DDevice, "Texture.bmp", &g_pTexture);
-Mezz
D3DXCreateTextureFromFile(g_pD3DDevice, "Texture.bmp", &g_pTexture);
-Mezz
You also need to link to d3dx9.lib or d3dx9d.lib (the debug version of d3dx9.lib). If that doesn't work, what linker errors are you getting?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement