Android ICS: What does Force GPU Rendering really do?

I found that when I enable this developer option, my OpenGL project stops working. A little worrying, to say the least.

Logcat shows two million:

E/libEGL ( 1022): called unimplemented OpenGL ES API E/libEGL ( 1022): called unimplemented OpenGL ES API E/libEGL ( 1022): called unimplemented OpenGL ES API ... 

The first scene looks great, but after this first swapbuffers() all the suspicious GL ES APIs (even glSetMatrixMode() ) do nothing but the "unimplemented API" log.

All this works fine (that is, implemented), if the option "Force GPU rendering" is disabled.

So what does this option do?

+6
source share
4 answers

This option is intended for developers so that they can easily test their applications with H / W acceleration enabled. As far as I understand, a 2D application using Canvas Apis can benefit from this option, since enabling this will force the system to create its own GLES2.0 context in another thread and have a Canvas class that uses GLES h / w backend acceleration instead of Skia . This natural GLES2.0 context creation occurs in the Native C code, and the application developer has no control over this.

Returning to your problem, the “failed error message caused” basically says that either (1) you are really using the wrong GL context (for example, making calls to GLES1.1 with the GLES2.0 context or vice versa) or (2) your device could not load the GLES drivers and therefore the system could not find the actual GL function pointer. The system knows what to load by reading the egl.cfg file found in / system / lib / egl /, ​​and the GL driver itself is located in the / system / vendor / lib / directory.

I will follow Google, as this may just be a mistake.

+3
source

It forces hardware acceleration in all applications. You can read more about this here: http://developer.android.com/guide/topics/graphics/hardware-accel.html

Be sure to check for activities that are not supported, and the likelihood that you encounter problems.

+2
source

The acceleration mode in ICS is no more special than in Honeycomd. By default, acceleration mode is enabled for all applications oriented to api 14 or higher. But at the same time, there are applications targeting other versions of the SDK. Thus, you can enable hardware acceleration in these applications by installing "Force GPU Rendering". There is a great explanation and post from Dianne that explains this.

0
source

As already mentioned, this option forces Graphics Hardware Acceleration and, presumably, to be used by default at API level 14 or 15, I mean ICS.

I do not recommend testing this on an emulator because it will make your computer and Eclipse dull and / or crash. I tried this setting on emulators with a wide range of resource configurations (different sizes for display, cache, processor and RAM) with API levels 14 and 15 and it always crashes .

It would be better to test your application on a dual-core device, such as the recent Samsung Galaxy 10.1, 8.9 Tablet or Motorola Xoom Tablet, which has actual hardware like the nVidia Tegra GPU to support acceleration with Honeycomb, which makes it better for OpenGL ES Apps ... And since there are no tablets with ICS on the market, you cannot match the specified configuration of API level 14 with ICS.

I would end by agreeing that the Google error has not yet been resolved / resolved on the SDK.

0
source

Source: https://habr.com/ru/post/904196/


All Articles