D3DXCreateTextureFromFile and CBitmap
D3DXCreateTextureFromFile(g_pD3DDevice,"Texture.bmp",&g_pTexture);
如果要把讀.bmp改成讀CBitmap的話,要如何改?
How to I change that input .bmp replace as input CBitmap For CreateTexture?
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?
[Example]
I hope this helps a bit.
Keep cool.
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?
[Example]
[source lang = c++]IDirect3DTexture9* pTex;D3DXCreateTextureFromFile(device, "myFile.bmp", &pTex);
I hope this helps a bit.
Keep cool.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement