From Johannes Baeuerle, "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."
This commit is contained in:
Robert Osfield
2012-02-07 12:02:04 +00:00
parent 2a36e51eed
commit 4d69577228

View File

@@ -1563,7 +1563,7 @@ void Texture::getCompressedSize(GLenum internalFormat, GLint width, GLint height
else if (internalFormat == GL_COMPRESSED_RGBA_S3TC_DXT3_EXT || internalFormat == GL_COMPRESSED_RGBA_S3TC_DXT5_EXT)
blockSize = 16;
else if (internalFormat == GL_ETC1_RGB8_OES)
blockSize = 16;
blockSize = 8;
else if (internalFormat == GL_COMPRESSED_RED_RGTC1_EXT || internalFormat == GL_COMPRESSED_SIGNED_RED_RGTC1_EXT)
blockSize = 8;
else if (internalFormat == GL_COMPRESSED_RED_GREEN_RGTC2_EXT || internalFormat == GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT)