Jump to content
  • Advertisement
Sign in to follow this  
Drexl

The ID3DXSprite-interface cant handle large bitmaps?

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

Im using this graphics-interface in my game. It works very well when I use small bitmaps, but when I want to use bitmaps larger than 200*200 (approx) the picture gets distorted - stretched out horizontally. Am I doing something wrong or cant the interface handle large bitmaps?

Share this post


Link to post
Share on other sites
Advertisement
Make sure you use textures of a power of 2. Or you can simply load them with D3DX_FILTER_NONE parameter for the mipfilter and filter in D3DCTFFEx():

HRESULT WINAPI D3DXCreateTextureFromFileEx(  
LPDIRECT3DDEVICE9 pDevice,
LPCTSTR pSrcFile,
UINT Width,
UINT Height,
UINT MipLevels,
DWORD Usage,
D3DFORMAT Format,
D3DPOOL Pool,
DWORD Filter, //D3DX_FILTER_NONE
DWORD MipFilter, //D3DX_FILTER_NONE
D3DCOLOR ColorKey,
D3DXIMAGE_INFO *pSrcInfo,
PALETTEENTRY *pPalette,
LPDIRECT3DTEXTURE9 *ppTexture
);


That will automatically create the borders for you.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net 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!