, (), , , (RGB565), , , , opengl.
, 2 /, opengl 2 ( 513/513 1024/1024), , vram. opengl, , "teximage2d" / , ( ).
.
, , opengl. ( ) ( , C/++, java). , , .
,
, (C/++)
( vram ) , , ETC1, PVRTC, ATC , vram .
( ), , .
EDIT:
4.. () , , .
5.. " ", .
6.. opengl ( ), . , opengl, ( ).
7.. - , , , "glCompressedTexImage2D" "texImage2D". PVRTC GPU PowerVR; ATC AMD GPU; ASTC ; ETC1 ( android 2.2 +).
8.. opengl, . ().
EDIT2:
5.. http://http.download.nvidia.com/developer/NVTextureSuite/Atlas_Tools/Texture_Atlas_Whitepaper.pdf
7.. , ETC (: , - ), "glCompressedTexImage2D" opengl (, textureId1, textureId2), :
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, textureId1);
glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D, textureId2);
:
uniform sampler2D sTexture1;
uniform sampler2D sTexture2;
varying mediump vec2 vTexCoord;
void main()
{
gl_FragColor.rgb = texture2D(sTexture1, vTexCoord).rgb;
gl_FragColor.a = texture2D(sTexture2, vTexCoord).r;
}
, ( ETC):
GLint texture1Sampler = glGetUniformLocation(programObject, "sTexture1");
GLint texture2Sampler = glGetUniformLocation(programObject, "sTexture2");
glUniform1i(texture1Sampler, GL_TEXTURE0);
glUniform1i(texture2Sampler, GL_TEXTURE1);
8.. -, ( ) , GL_OUT_OF_MEMORY, (, ,...).