Does Cocos2d-x support ETC2 textures? -
i'm building game , i'm supporting following texture formats:
- atc
- dxt
- png
- pvr
i'd add support etc2 (etc1 won't work because of our graphics require alpha channel). cocos2d-x support etc2 textures?
no.
but 2 things.
cocos2d-x doesn't have etc2 defines in cctexture2d.h. need add etc2 defines yourself.
- https://github.com/cocos2d/cocos2d-x/blob/v4-develop/cocos/renderer/cctexture2d.h#l95-l96
https://github.com/cocos2d/cocos2d-x/blob/v4-develop/cocos/renderer/cctexture2d.cpp#l60-l110
//! 2-bit pvrtc-compressed texture: pvrtc2 (has alpha channel) pvrtc2a, //! etc-compressed texture: etc etc, //! s3tc-compressed texture: s3tc_dxt1 s3tc_dxt1,
and cocos2d-x uses opengl es 2.0 context, @ least, on android.
this.seteglcontextclientversion(2);
so using etc2 glcompressedteximage2d needs these extensions.
oes_compressed_etc2_rgb8_texture oes_compressed_etc2_srgb8_texture oes_compressed_etc2_punchthrougha_rgba8_texture oes_compressed_etc2_punchthrougha_srgb8_alpha_texture oes_compressed_etc2_rgba8_texture oes_compressed_etc2_srgb8_alpha8_texture
Comments
Post a Comment