PVRTTextureLoadFromPointer bug in 2.10

There’s a bug in 2.10 PVRTTextureAPI.cpp PVRTTextureLoadFromPointer() fn in the iOS and Android SDK sample code. On Android, it fails to load ETC textures correctly.





The problem is this line:





#ifndef TARGET_OS_IPHONE //TODO


          else if (eTextureFormat==GL_ETC1_RGB8_OES)





should be





#ifndef TARGET_OS_IPHONE //TODO


          else if (eTextureInternalFormat==GL_ETC1_RGB8_OES)





eTextureFormat is always 0 because PVRTGetOGLES2TextureFormat only sets eTextureInternalFormat, not eTextureFormat





Posting here in case others run into same problem.





Hi Kris,

Thanks for catching this - we don’t typically use ETC, so hadn’t noticed the problem. I’ve fixed this for our next release, in the meantime your fix is exactly the correct thing to do.

Thanks,

Tobias