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

Paul Martz pmartz at skew-matrix.com
Mon Mar 2 18:09:23 PST 2009

Hi J-S -- I'm having some second thoughts on this.

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?

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?

Let me know what you think.

Paul Martz
Skew Matrix Software LLC
+1 303 859 9466

-----Original Message-----
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of
Jean-Sébastien Guay
Sent: Monday, March 02, 2009 3:18 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Set resize NPOT hint -- add to osgUtil Optimizer?

Hi Paul,

> Hi Robert -- I've got a client with some models that use NPOT textures. 
> Just loading the models and rendering them causes OSG to resize the 
> textures to powers of 2, even though NPOT is supported on their 
> hardware. We need a visitor that will walk the scene graph and call
> setResizeNonPowerOfTwoHint(false) on each texture. I was wondering if 
> there was a larger need for such functionality? And if so, would this 
> fit in the Optimizer as part of the OPTIMIZE_TEXTURE_SETTINGS flag?

This precise functionality was on my todo list of items to do when I have a
bit of free time. If you get to it first (or if you can get funding for it)
be my guest, but otherwise I think I would have gotten to it in the next 2
months or so.

Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com
osg-users mailing list
osg-users at lists.openscenegraph.org

More information about the osg-users mailing list