opengles3-book
opengles3-book copied to clipboard
Possible error (omission) related to compressed textures and glGenerateMipmap()
Page 265 says, "Once a texture has been loaded as a compressed texture, it can be used for texturing in exactly the same way as an uncompressed texture."
In my opinion, this statement about "exactly the same way" is not entirely true. Calling glGenerateMipmap() on a compressed texture returns an error in most drivers. This is not noted on page 265 or on page 242 where "Automatic Mipmap Generation" is covered. It would be helpful if the restriction on compressed texture mipmap generation is noted somewhere.
The ES 3.0 man page says that glGenerateMipmap() is unsupported on compressed base level:
GL_INVALID_OPERATION is generated if the levelbase array is stored in a compressed internal format.
http://docs.gl/es3/glGenerateMipmap