Question: Non Pow2 Textures

Started by
3 comments, last by The Frugal Gourmet 18 years, 9 months ago
I have a video card that supports non-pow2 textures according to the "caps". However, when I attempt to load a non-pow2 texture it still rescales it. Is there any way I can turn this functionality off?
Co-creator of Star Bandits -- a graphical Science Fiction multiplayer online game, in the style of "Trade Wars'.
Advertisement
You can try loading your images with D3DX with D3DX_FILER_NONE as the filter flag, so when it resizes the image to be n^2, it will blit the original image with it's original size and the rest will be black (with 0 alpha if it is a specified format).
Projects:> Thacmus - CMS (PHP 5, MySQL)Paused:> dgi> MegaMan X Crossfire
I could do that, but I'd really like to just not rescale the sucker at all.

This game is for a very specific platform that I know supports NON-POW2 textures.

Possible?
Co-creator of Star Bandits -- a graphical Science Fiction multiplayer online game, in the style of "Trade Wars'.
Quote:Original post by The Frugal Gourmet
I have a video card that supports non-pow2 textures according to the "caps". However, when I attempt to load a non-pow2 texture it still rescales it. Is there any way I can turn this functionality off?

Hi Frugal,
Use the D3DXCreateTextureFromFileEx function and use explicit values for the width and height parameters (not D3DX_DEFAULT).

Or in later versions of the SDK use D3DX_DEFAULT_NONPOW2 for the width and height parameters.

HTH,
Cambo_frog

[Edited by - Cambo_frog on July 22, 2005 1:24:07 PM]
For the love of god, please tell me that you've just omitted your error checking code for brevity, and you don't really assume that all those functions succeed.
Thank you very much. The latter solution works perfectly.
Co-creator of Star Bandits -- a graphical Science Fiction multiplayer online game, in the style of "Trade Wars'.

This topic is closed to new replies.

Advertisement