I am trying to get the maximum texture size limit in Android for OpenGL 2.0. But I\'ve found that the next instruction only works if I\'m currently within the OpenGL Contex
PBUFFER max size is unfortunately not related to max texture size (but may be the same).
I believe the best way to obtain max texture size is to create GL context (on the same context as one on which You will actually use this textures) and ask for GL_MAX_TEXTURE_SIZE.
There is strong reason behind this: the ogl driver is not initialized for current process before surface (and context) creation. Some drivers perform underlying HW/SKU detection on initialization and calculate max surface sizes depending on HW capabilities.
Furthermore, max texture size is permitted to vary depending on context (and EGLConfig context was created on).
And one more thing: eglGetConfigs will get You all EGLconfigs, even these from default, software android renderer, or theese from OpenGL ES 1.1CM HW driver (if there are separate drivers for 1.1 and 2.0 on target platform). Drivers are sort of independent in graphics stack and can return different max-es.