Hi Mike,
The osg::Texture class has a method:
/** Sets whether to force the texture to resize images that
have dimensions
* that are not a power of two. If enabled, NPOT images will
be resized,
* whether or not NPOT textures are supported by the
hardware. If disabled,
* NPOT images will not be resized if supported by hardware. */
inline void setResizeNonPowerOfTwoHint(bool flag) {
_resizeNonPowerOfTwoHint = flag; }
The can be used to hint to the texture whether to do the rescale or
not. For compatibility with old hardware this still defaults to
false, and the OpenFlight plugin doens't have an option for setting it
on Texture's it creates. You can however, traverse the loaded
subgraph and set the above hint on all the texturtes you find.
Robert.
On 11 June 2013 13:05, Mike Fournigault <[email protected]> wrote:
> I have some troubles with loading FLT models in my osg program.
> For some models, if their textures have dimensions that are not power of two,
> the plugin enters in a case where it rescale those textures with the greatest
> power of two.
> And the result is that finally the model is not mapped with textures who were
> "badlly dimensioned".
>
> My program run on linux, with opengl 4.2, on a nvidia quadro 600.
> Of course, my system supportes the ARB extension for textures with dimensions
> that are not power of two.
>
> Is there any flt option that I can tune to avoid this problem ?
> Or is there anyone that solved this kind of problem ?
>
> Thank you for your replies and ideas !
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org