Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

renqilin

a problem with D3D8LoadTextureFromFile()

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

I notice that Andypike used a function in his tutorials: D3D8LoadTextureFromFile(const char *bitmapFileName); but when I use this function in my program, the compiler output an error: undeclared function D3D8LoadTextureFromFile(),so can somebody tell me which file includes the prototype of this function?

Share this post


Link to post
Share on other sites
Advertisement
check a fuction called:
HRESULT WINAPI
D3DXCreateTextureFromFileEx(
LPDIRECT3DDEVICE8 pDevice,
LPCSTR pSrcFile,
UINT Width,
UINT Height,
UINT MipLevels,
DWORD Usage,
D3DFORMAT Format,
D3DPOOL Pool,
DWORD Filter,
DWORD MipFilter,
D3DCOLOR ColorKey,
D3DXIMAGE_INFO* pSrcInfo,
PALETTEENTRY* pPalette,
LPDIRECT3DTEXTURE8* ppTexture);

sample:

D3DXCreateTextureFromFileEx( myD3DDevice, "picture.bmp"
D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFNT_UNKNOWN,
D3DPOOL_DEFAULT, D3DX_FILTER_NONE, D3DX_FILTER_NONE, NULL, NULL,
NULL, &myTexture );

Share this post


Link to post
Share on other sites
Thanks.That is the very function I want!
I''m a beginner of D3D, would you give me some advice about studing D3D? Thank you.

Share this post


Link to post
Share on other sites

  • 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!