I'm using OpenGL ES 3.0 libs that came with AdrenoSDK 3.6 for Windows7 64 bits.
glCompressedTexImage2D does not work as expected: 2348 KB are allocated when calling this function with the following setup:
Code :glPixelStorei(GL_UNPACK_ALIGNMENT, 1); GLuint handle; glGenTextures(1, &handle); glBindTexture(GL_TEXTURE_2D, handle); GLenum _format = GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC; dword _width = 128, _height = 128, _bpp = 8; dword _size = (128*128*_bpp)/8; byte *_pdata = (byte*)malloc(_size); memset(_pdata, 0, _size); glCompressedTexImage2D( GL_TEXTURE_2D, 0, _format, _width, _height, 0, _size, _pdata );
Does anyone has any idea what am I doing wrong?
Help would be much appreciated,