[osg-users] Set resize NPOT hint -- add to osgUtil Optimizer?

Jean-Sébastien Guay jean-sebastien.guay at cm-labs.com
Mon Mar 2 19:30:33 PST 2009


Hi Paul,

> If I understand correctly (I've heard this, but I haven't confirmed it in
> the OpenGL spec), using NPOT textures turns off hardware mipmapping; mipmaps
> must be created on the host, or not used at all. Is that correct?

By 'created on the host', you mean embedded in the texture files (.dds 
format generally) instead of generated on the fly by OpenGL, is that right?

Not sure, but it would be somewhat logical. Mipmaps are most efficient 
when powers of two are used, and it might be that the hardware doesn't 
want to make assumptions as to how you want to scale if non-standard 
conditions are present...

> If so, I'll likely suggest an alternative to my client, which would be a
> NodeVisitor that resizes any NPOT textures to a power of 2. Maybe this is
> another candidate for being added to the Optimizer?

You mean resizes the textures and then re-saves the model? (otherwise it 
already exists :-) )

Yes, that's also a good idea, though each would have its potential uses. 
But if NPOT textures really turn off hardware mipmapping then the resize 
and re-save would be more useful in general, I agree.

J-S
-- 
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com
                                http://www.cm-labs.com/
                         http://whitestar02.webhop.org/



More information about the osg-users mailing list