Jump to content
  • Advertisement
Sign in to follow this  
RpgActioN

Createtexturefromfile Problem...

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

In the line...
  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".

Share this post


Link to post
Share on other sites
Advertisement
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?

Share this post


Link to post
Share on other sites
D3DXCreateTextureFromFile() is NOT a member of IDirect3DTexture9. Just call it like this:

D3DXCreateTextureFromFile(g_pD3DDevice, "Texture.bmp", &g_pTexture);

-Mezz

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!