[osg-users] NPOT Textures
robert.osfield at gmail.com
Wed Jul 9 01:48:53 PDT 2008
It's the rendering thread that does the resize, and does so using glu,
something that can only be called from a thread with a valid graphics
To do rescale in a loader we'd need to implement scaling without the use of glu.
The other alternative is to just use the non power of two texture extension.
On Wed, Jul 9, 2008 at 1:47 AM, Jim Vaughan <jimv at fxpal.com> wrote:
> I have a related question; it seems that my textures are scaled as they
> are loaded, for example if I move the camera, I get messages like:
> Scaling image 'D:\DOTSModels\kmz\images\texture0.JPG' from (1600,1200) to (1024,
> Is there an easy way to cause all textures to be loaded and rescaled as the
> model is loaded?
>> -----Original Message-----
>> From: osg-users-bounces at lists.openscenegraph.org
>> [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf
>> Of Robert Osfield
>> Sent: Monday, July 07, 2008 6:50 AM
>> To: OpenSceneGraph Users
>> Subject: Re: [osg-users] NPOT Textures
>> Hi Paul,
>> On Mon, Jul 7, 2008 at 1:15 PM, <paul1492 at yahoo.com> wrote:
>> > If my hardware supports NPOT textures, how do I turn off
>> resizeNonPowerOfTwo when loading an OpenFlight file?
>> > I don't see an easy way to do this..
>> Using NPOT textures is only sensible to on hardware that genuinely
>> supports it, otherwise it can force one down it software rendering.
>> The Nvidia Gefore 6 series onwards all support proper NPOT. I don't
>> know the status of ATI yet though.
>> As for disable the automatic resize of non power of two textures,
>> you'll need to write a NodeVisitor that goes through the scene graph
>> and calls texture->setResizeNonPowerOfTwoHint(false);. Perhaps the
>> easiest step would be to be to extend the
>> osgUtil::Optimizer::TextureVisitor so that it has an option for
>> setting this value on/off, as this visitor already finds all the
>> textures for you.
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
> osg-users mailing list
> osg-users at lists.openscenegraph.org
More information about the osg-users