D3DXCreateTextureFromFile and CBitmap

Started by
1 comment, last by akira32 18 years, 8 months ago
D3DXCreateTextureFromFile(g_pD3DDevice,"Texture.bmp",&g_pTexture); 如果要把讀.bmp改成讀CBitmap的話,要如何改? How to I change that input .bmp replace as input CBitmap For CreateTexture?
akira32 編程之家 Yahoohttp://tw.myblog.yahoo.com/akira32-akira32
Advertisement
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]
[source lang = c++]IDirect3DTexture9* pTex;D3DXCreateTextureFromFile(device, "myFile.bmp", &pTex);


I hope this helps a bit.
Keep cool.
becuase I want to use my file format(not .bmp) that transfer from .bmp to .akbmp.
akira32 編程之家 Yahoohttp://tw.myblog.yahoo.com/akira32-akira32

This topic is closed to new replies.

Advertisement