Is there a way to check if Android device supports openGL ES 2.0?

后端 未结 7 996
轻奢々
轻奢々 2020-12-02 23:16

I need to check dynamically if the used device supports openGL ES 2.0. How can i do that?

相关标签:
7条回答
  • 2020-12-03 00:03

    Determining OpenGL extensions :

    Implementations of OpenGL vary by Android device in terms of the extensions to the OpenGL ES API that are supported. These extensions include texture compressions, but typically also include other extensions to the OpenGL feature set.

    To determine what texture compression formats, and other OpenGL extensions, are supported on a particular device:

    Run the following code on your target devices to determine what texture compression formats are supported:

      String extensions = javax.microedition.khronos.opengles.GL10.glGetString(GL10.GL_EXTENSIONS);
    

    Warning: The results of this call vary by device! You must run this call on several target devices to determine what compression types are commonly supported. Review the output of this method to determine what OpenGL extensions are supported on the device.

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