Hi Robert,

I have found a minor bug with image scaling.  I have a texture that is 1024x768 
that is being resized to 1024x1024 for a Texture2D.  
Texture::applyTexImage2D_load() detects the need to resize and tries to do so 
through gluScaleImage(), which is implemented in src/osg/glu/libutil/mipmap.cpp.

All that works great for most of my images, but this image is greyscale with 
alpha.  GL spec deprecates GL_LUMINANCE_ALPHA and requires use of GL_RG for 
these images types.  But the code in gluScaleImage() does not respect GL_RG 
(though it supports many other formats).

This patch treats GL_RG identically to GL_LUMINANCE; a simple 2 element format.

After this patch, my image shows up fine.  Mipmap.cpp supports many other 
similar types, like GL_RED.  Risk of this change seems pretty low.

PR is up at https://github.com/openscenegraph/OpenSceneGraph/pull/566

Thanks,

 - Dan

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

Reply via email to