Get Maximum OpenGL ES 2.0 Texture Size Limit in Android

前端 未结 1 1099
耶瑟儿~
耶瑟儿~ 2020-12-19 04:22

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

相关标签:
1条回答
  • 2020-12-19 05:12

    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.

    0 讨论(0)
提交回复
热议问题