[osg-submissions] Bug in Texture2DArray
Art Tevs
stud_info2 at yahoo.de
Sun Sep 9 13:03:46 PDT 2007
Hi, Robert.
Please correct Texture2DArray in the method exture2DArray::applyTexImage2DArray_subload() as following:
from Line 385 -----------------------------------------------------
numMipmapLevels = image->getNumMipmapLevels();
int width = image->s();
int height = image->t();
for( GLsizei k = 0 ; k < numMipmapLevels && (width || height ) ;k++)
{
if (width == 0)
width = 1;
if (height == 0)
height = 1;
extensions->glTexImage3D( target, k, _internalFormat,
width, height, indepth, _borderWidth,
(GLenum)image->getPixelFormat(),
(GLenum)image->getDataType(),
image->getMipmapData(k));
width >>= 1;
height >>= 1;
}
---------------------
Before there was also a change in the depth, which is wrong. Depth parameter (of glTexImage3D) is the layer number and should stay constant for all mipmap levels.
Thanks.
Cheers, Art
---------------------------------
Wissenswertes für Bastler und Hobby Handwerker.BE A BETTER HEIMWERKER!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20070909/b402f9e8/attachment.htm
More information about the osg-submissions
mailing list