[fluxus] non-square textures

dave dave at pawfal.org
Wed Sep 6 15:06:23 PDT 2006


On Mon, 2006-09-04 at 16:25 +0100, Claude Heiland-Allen wrote:
> Hi,
> 
> What are the limits on texture dimensions?
> 
> I have a dir full of images, not all of which are square, and the 
> non-square ones don't like to be used as textures it seems - there is a 
> shearing effect.
> 
> Are there other limits, like powers of two?

I'm not an authority on the specifics of this, but I think fluxus should
support any size of texture up to the amount you can fit on the card. It
uses gluBuild2DMipmaps which resizes the texture for you and builds
mipmaps automatically. Having said this, I always use power of two
square, partly because this will always be efficient - squaring non
square textures can use up memory (by internally adding black to expand
it to fit) and because they are always guarenteed to work. There maybe
some card/driver differences going on here. (I just tried loading a non
square png and it works here (ATI Radeon X300))

These days some cards also support rectangular textures properly, but
not (as far as I am aware) without extensions yet.

Exposing options for the texture generation (mip map generation and all
the glTexEnv settings) is something I'd like to do at some point.

> Anyone know the voodoo to ImageMagick 'convert' that stretches an image 
> to be square?

Not sure, would be good to know though - I use gimp for this sort of
thing.

cheers,

dave




More information about the Fluxus mailing list