Hi Jason and David,

On Wed, Mar 3, 2010 at 10:09 PM, Jason Daly <jd...@ist.ucf.edu> wrote:

> Yeah, Performer wasn't written for OpenGL 2.0.  OSG wasn't originally
> either, which is why it defaults to resizing all images.  The resize hint
> was added for OpenGL 2.0 (actually for the ARB_texture_non_power_of_two
> extension) so the resize could be avoided if the hardware supported it.
>
> You could argue that it should default to not resize if the hardware
> supports it (i.e.: if the  extension is present in the driver's extension
> string), but drivers have been known to lie in the past :-)
>

For clarification, the OSG does enable the use of non power of two textures
by default because with the introduction of OpenGL 2.0 drivers would
implement non power of two textures as required by the spec, but do so in
software for some hardware + texture filter combinations and in hardware in
others, knowing whether hardware acceleration is present isn't possible
which is very frustrating for a SDK/app developer, but alas that's something
we just have to live with.

Performance with the OSG doing the scaling of a non power of two texture to
a power of two and still have rendering done in hardware results in far
better performance than dropping the driver down to software paths for
rendering due to use of non power of two textures, so the choice to assume
the worst w.r.t driver/hardware support of non power of two texture has
proven to be the best compromise.  If you do know that non power of two
textures are properly supported then you can enable this by setting

   texture->setResizeNonPowerOfTwoHint(false);

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to