I am trying to replay GLES 3.0 traces. Following are the order of APIs
glGenTextures(n = 1, textures = &10)
glBindTexture(target = GL_TEXTURE_2D, texture = 10)
glTexStorage2D(target = GL_TEXTURE_2D, levels = 12, internalformat = GL_COMPRESSED_RGB8_ETC2, width = 2048, height = 2048)
glGenBuffers(n = 1, buffer = &74)
glBindBuffer(target = GL_PIXEL_UNPACK_BUFFER, buffer = 74)
glBufferData(target = GL_PIXEL_UNPACK_BUFFER, size = 2796216, data = blob(2796216), usage = GL_STATIC_DRAW)
glCompressedTexSubImage2D(target = GL_TEXTURE_2D, level = 0, xoffset = 0, yoffset = 0, width = 2048, height = 2048, format = GL_COMPRESSED_RGB8_ETC2, imageSize = 2097152, data = NULL)
All APIs except glCompressedTexSubImage2D works fine.Please confirm if ARM GLES 3.0 emulator supports GL_COMPRESSED_RGB8_ETC2 format and this API.
Hi sunilrpandey,
The GLES3 emulator supports ETC2 yes, it's mandatory in GLES3. There doesn't seem to be anything wrong with the CompressedTexSubImage2D call itself, but I'm still reading the spec just in case. That said, specifying 12 levels in TexStorage2D implies you want a 2x2 and a 1x1 level, which as ETC2 only supports 4x4 pixel blocks, I'm not sure what you'd be specifying for levels 10 and 11, or do you intend to call GenerateMipmap? If you change the levels parameter in TexStorage2D to be 10, does that change the behavior? The emulator guys are out of the office at the moment so I'm just firing from the hip, but I will follow this up with them when they are back on Monday.
Thanks,
Chris