Hi Christian,

On Mon, Sep 26, 2011 at 9:47 AM, Christian Buchner
<[email protected]> wrote:
>> OpenGL is used to do the compression.  If the textures are resized and
>> compressed they won't have the original image size.  Perhaps you are
>> seeing a bug, perhaps you are mis-interpreting things.  From your
>> posts I can't work out exactly what is happening.
>
> The issue seems to be that the osg::image object seems to retain its
> original size, even when sending the texture to OpenGL and when
> reading it back. How compressed texture data would survive this
> scaling step, I don't know.


"Seems to", doesn't really tell me much.  Any chance you could post a
model that illustrates what you see as a problem.


>> I couldn't work out what you snippet did.
>
> The code would resize the osg::image to a power of 2, bounded by
> OSG_MAX_TEXTURE_SIZE
> before doing the compression step.
>
> A proper way to do it might be to query the OpenGL texture for its
> size, and adjusting the osg::image accordingly.

The OSG sets up the max texture size by checking OpenGL, unless you've
set the value with the env var OSG_MAX_TEXTURE_SIZE if which case this
value is taken.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to