Hi, Assuming you have a GL driver that supports multiple contexts (which is NOT the case on the G1), you can have several applications using GLES at the same time; but NOT on the same surface. You cannot bind 2 contexts to the same surface. Now, the framebuffer *is* a surface and it is used by SurfaceFlinger, so another application, like a game, cannot use it at the same time. Of course, if you were to stop the system first, then you could run a standalone OpenGL ES application directly against the framebuffer.
In practice, if you want to have an h/w accelerated game that plays "nice" with SurfaceFlinger, it needs to use a *different* surface, that's what happens when you use the Java APIs -- SurfaceView is a kind of Surface that can be used by EGL, but it is not the main framebuffer. Your application ends up drawing into the SurfaceView (which is h/w accelerated), and the SurfaceView is drawn to the screen by SurfaceFlinger (along with the other windows, statusbar, menus, dialogs), this operation is also H/W accelerated. As you can see, there is an extra copy of the surface the application is rendering into, but that is usually not an issue (on the G1 this copy is performed by a separate h/w 2D blitter, on other devices it is performed by the GPU). In the future we may support some special cases on h/w allowing it where we'll be able to render without the extra copy; however, it will be limited (the device will have to be in its native orientation, the window will need to be full screen, etc...). Mathias On May 21, 9:08 am, AbdulRahman <[email protected]> wrote: > Hi > > One Doubt: > I am looking in to Surface Flinger Design that is on top of OpenGL. > How does Surface Flinger work in synch with Gaming Application that > can directly interact with > OpenGL ? Whether Surface Flinger and the gaming application maintain > separate OpenGL context ? Any input on this would be helpful for me. > > Thanks in Advance. > > -- > Abdul --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---
