Android Emulator provides the user with the GPU on option, which means using the GPU of Host (which is the PC running Emulator). Of course, the PC must have the OpenGL driver installed.
In the implementation is to replace the libglesv1_cm.so libglesv2.so, when the system calls GL's function, the call is packaged as a stream, and through the pipe sent to the host side processing, into the conversion to host OpenGL call.
Light is not enough, but also to Libegl, Libgralloc are replaced, because to call the host side of OpenGL must have rendercontext, so to the Android Egl also converted to host XGL call (if you use Ubuntu) .
Create
Normally, when an APK process needs to create a form, it calls the EGL function to create the Surface, also calls the Gralloc function to create the memory to hold the raster required by the Surface, and then associate the two, which is done in this process, but in the Android 3D emulation architecture, the form cannot be created directly, but must be created by sending a command to the host side render to invoke the XGL command .
Surface corresponds to the windowsurface in the 3D Emulation, and the raster memory corresponds to Colorbuffer in 3D Emulation.
The FrameBuffer is a virtual FrameBuffer in 3D emulation, and he centrally manages Colorbuffer, Windowsurface, and Rendercontext.
Update
When the APK calls Swapbuffers (that is, the screen that has already been painted, which requires each surface to provide image memory, Surfaceflinger to be processed and displayed on the screen), you can imagine that the drawing with OpenGL is over, and now it's a series of memory copy, Colorbuffer the image of OpenGL to draw the image read out.
The eglmakecurrent parameter of Elg provides the first surface to draw things, and the second is to read
public boolean eglmakecurrent (Egldisplay display, Eglsurface draw, Eglsurface read, eglcontext context);
The application should use Eglsurface draw when drawing something, this surface is backstage, invisible, just to be able to successfully call OpenGL for hardware rendering
Now on the screen, you need to read back the surface raster data from the previous draw, of course this is provided by the Eglmakecurrent parameter
Read the surface raster memory for Surfaceflinger operation, the last generated screen image in Framebuffer, can be directly on the screen
At last you're in the emulator, and there's no problem running a racing game.