|
某人???3DXSPRITE要求?理??次?纾?@是?解!只要硬件支持,就??Σ挥?次?纾 驹??】
首先不管是D3DXSPRITE?是用??,都要用D3DXCreateTextureFromFileEx等方法?入?理。
???就在於D3DXCreateTextureFromFileEx的??瞪希?旅媸且恍╆P系到2次?绲??到忉?:
Width
[in] Width in pixels. If this value is zero or D3DX_DEFAULT, the dimensions are taken from the file and rounded up to a power of two. If the device supports non-power of 2 textures and D3DX_DEFAULT_NONPOW2 is specified, the size will not be rounded.
Height
[in] Height, in pixels. If this value is zero or D3DX_DEFAULT, the dimensions are taken from the file and rounded up to a power of two. If the device supports non-power of 2 textures and D3DX_DEFAULT_NONPOW2 is sepcified, the size will not be rounded.
MipLevels
[in] Number of mip levels requested. If this value is zero or D3DX_DEFAULT, a complete mipmap chain is created. If D3DX_FROM_FILE, the size will be taken exactly as it is in the file, and the call will fail if this violates device capabilities.
根???到忉?Width、Height 如果?置??3DX_DEFAULT的?,尺寸就??蛔?永???次?纾???榱四愫眠?是?⑺???置??3DX_DEFAULT_NONPOW2吧。接著是MipLevels,如上面?的一?樱?绻?O置??3DX_DEFAULT的?,就??l生很不幸的事情,因此?榱四愫谜??⑵湓O置??3DX_FROM_FILE。
THANK YOU!
http://hi.baidu.com/%C7%E5%CF%C4%C1%B9%B7%E7/blog/item/d02de4a1ce2f1f8147106411.html |
|