I just want know how many video memory I have on android device. For this I create many times opengl texture and check glGetError() but always have no error, but I don't belive that this is possible have so many textures in memory. So here code:
int COUNT = 100500;
int[] textureHandle = new int[COUNT];
Bitmap bitmap = BitmapFactory.decodeResource(m_activity.getResources(), R.drawable.space);
for(int i = 0; i < COUNT; i++)
{
GLES20.glGenTextures(1, textureHandle, i);
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, textureHandle[i]);
GLES20.glActiveTexture(textureHandle[i]);
GLUtils.texImage2D(GLES20.GL_TEXTURE_2D, 0, bitmap, 0);
System.out.println("Error code " + GLES20.glGetError());
}
Why I can't get opengl OutOfMemory? Or maybe there is another way know how many VRAM I have on my Android device.