Closed denghe closed 1 year ago
Hi Denghe. I took a look. I'm not sure yet TBH. That code above may be a little copyright-encumbered (there are 6 copyright lines without conditions, and then a 7th that states 'All Rights Reserved' which would be in direct contradiction to a 'BSD-Style' license). I did manage to find:
https://arm-software.github.io/opengl-es-sdk-for-android/etc_texture.html
and
under MIT, but the specification is a bit vague. The header is referred to as 16 bits, which I assume means 16 bytes, but the MailSDK::ETCHeader only seems to have 8 bytes -- and things like the internalFormat is not there in any obvious form (maybe it's stored with the texture data?)
I'll leave the issue open for now -- in case it becomes clearer at some point ;)
Found some reference code under Apache 2.0 that looks promising: https://android.googlesource.com/platform/frameworks/native/+/master/opengl/include/ETC1/etc1.h
https://android.googlesource.com/platform/frameworks/native/+/master/opengl/libs/ETC1/etc1.cpp
As of 66e6a92a0af072f8e9cbfb92b03fa63b5c2d025c Tacent View can now load PKM files with all supported ETC encodings: EACR11, EACR11-Signed, EACRG11, EACRG11-Signed, ETC1, ETC2RGB, ETC2sRGB, ETC2RGBA, ETC2sRGBA, ETC2RGBA1, and ETC2sRGBA1.
please, thanks ! more information here: https://github.com/axmolengine/axmol/blob/dev/core/base/etc2.cpp