Image max resolution in Android

I use Android Pad AT100 to run android cocos2dx project.
It crash at a CCSprite , the image size is 1600x1600.
How to know Image max resolution in Android device?

int maxTextureSize = 0;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize);

maxTextureSize now contains the maximum texture size the OpenGL implementation can handle (usually this is between 1024 and 4096 nowadays)

Note that unless the GPU supports non-power-of-two textures your 1600x1600 image counts as a 2048x2048 texture.

1 Like

I would recommend not using textures larger than 1024, myself.

If I had something I wanted to treat as a sprite that was 1600 across I would be rethinking my design.

Consider breaking the image up into pieces perhaps?