HI Filipe,
On 23 October 2014 00:03, Filipe P <[email protected]> wrote:
> The image is now on the left-bottom side of the screen.
> Somehow, the image is scalling from 1600x900px to 2048x1024px. (reported
> on the OSG console)
>
> Someone can explain me what is missing?!
>
This message is probably osg::Texture2D rescaling the image to a power of
two when the osg::Image assigned to it is applied to OpenGL. Setting the
the non power of two hint in osg::Texture can prevent this. It used to be
that OpenGL only support power of two textures so has remained the default
for the OSG. From the include/osg/Texture header:
/** 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; }
Robert
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org