0
我想知道一个Android设备是否有GPU,有没有什么办法从代码中确定?我看着cpufeatures.h
在NDK但似乎不是关于GPU如何确定Android设备是否具有GPU代码?
我想知道一个Android设备是否有GPU,有没有什么办法从代码中确定?我看着cpufeatures.h
在NDK但似乎不是关于GPU如何确定Android设备是否具有GPU代码?
这里是招什么,
final ActivityManager activityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
final ConfigurationInfo configurationInfo = activityManager
.getDeviceConfigurationInfo();
final boolean supportsEs2 = configurationInfo.reqGlEsVersion >= 0x20000;
if (supportsEs2) {
Log.i("JO", "configurationInfo.reqGlEsVersion:"
+ configurationInfo.reqGlEsVersion + "supportsEs2:"
+ supportsEs2);
// Request an OpenGL ES 2.0 compatible context.
myGlsurfaceView.setEGLContextClientVersion(2);
final DisplayMetrics displayMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
// Set the renderer to our demo renderer, defined below.
myRenderer = new MyRenderer(this, myGlsurfaceView);
所有的Android设备有GPU,据我所知。 – CommonsWare
请问,请告诉我这些信息的来源?我很确定我的HTC Wildfire没有。 –
我是这些信息的来源。显然我错了,尽管我非常有信心,*广大的Android设备都有GPU。你的野火是一个异常值。 – CommonsWare