I need to check dynamically if the used device supports openGL ES 2.0. How can i do that?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Never used OpenGL ES, but saw it has the same
glGetString
method as OpenGL. It should do the trick:http://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetString.xml
Yes. The following code will do the trick:
Read this for more info: http://www.learnopengles.com/android-lesson-one-getting-started/
You may also require want to restrict devices that don't support 2.0 from seeing your app in the marketplace by adding the following to your manifest:
See also the doc of
uses-feature
.In addition to checking in code in the ways that others have mentioned, if you want to restrct it in market to ONLY those devices with 2.0 then in manifest:
You should do both, I've had people install the apk directly on to unsuitable devices and had to deal with strange exceptions. Now I throw a runTime:
You can use this code in your code:
This code working Fine..
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:
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.