Advertisement Jump to content
Sign in to follow this  

D3DXCreateTextureFromFile and CBitmap

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

D3DXCreateTextureFromFile(g_pD3DDevice,"Texture.bmp",&g_pTexture); 如果要把讀.bmp改成讀CBitmap的話,要如何改? How to I change that input .bmp replace as input CBitmap For CreateTexture?

Share this post

Link to post
Share on other sites
Hi there akira32,
How are you doing?

[Why use CBitmap]
Maybe this is a akward question, but why would you want to use CBitmap, it's a helper function for loading bitmaps. Why not just use the IDirect3DTexture9 interface that supports alot of different kinds of formats other than just bmp?

[source lang = c++]
IDirect3DTexture9* pTex;
D3DXCreateTextureFromFile(device, "myFile.bmp", &pTex);

I hope this helps a bit.
Keep cool.

Share this post

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

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!