Hi robert,

We have detected two bugs regarding the use of etc1 compressed textures. We can 
observe this behavior on different target systems with different OpenGL ES 2.0 
implementations.

The first problem is wrong value of the block size of etc1 textures in the 
getCompressedSize call in Texture.cpp. With the current block size of 16 the 
target application crashes with a GL_INVALID_VALUE.  The reason is that the 
calculated size passed to OpenGL does not match the size of the passed 
data(data pointer,texture width,texture height,spec of etc1). 
With a block size of 8 in the getCompressedSize call this error dissapears.

The second problem is the handling of etc1 textures in the 
glCompressedTexSubImage2D and glCopyTexSubImage2D calls. Per default the 
current implementation  in Texture2D prefers to use subloads instead of 
complete reloads. The problem here is that the description of the etc1 
extension (see 
http://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt)
 declares that etc1 textures throw an GL_INVALID_OPERATION when used in subload 
calls:


>     INVALID_OPERATION is generated by CompressedTexSubImage2D,
>     TexSubImage2D, or CopyTexSubImage2D if the texture image level
>     bound to target has internal format ETC1_RGB8_OES.
> 


The workaround here is to avoid the subload calls in Texture2D in case a etc1 
compressed texture is used.

The attached fixes are based on today's trunk.

Cheers,
Johannes

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=43811#43811




Attachments: 
http://forum.openscenegraph.org//files/osg_545.zip


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

Reply via email to