[maemo-developers] Fremantle OpenGL wrapper?

From: Kimmo Hämäläinen kimmo.hamalainen at nokia.com
Date: Wed Jun 3 08:00:06 EEST 2009
Hi,

On Wed, 2009-06-03 at 00:53 +0200, ext Qole wrote:
> 
> 
> On Tue, Jun 2, 2009 at 3:04 PM, David Greaves <david at dgreaves.com>
> wrote:
>         
>         
>         I understood that GL wasn't going to be available to the apps
>         on the device...
>         something about the window manager permanently taking the only
>         viewport?
>         
>         I am not sure if this is a beta-phase bug or a hardware or
>         GLES issue.
>         
>         David
>         --
>         "Don't worry, you'll be fine; I saw it work in a cartoon
>         once..."
> 
> 
> I think you are referring to the following two posts, both by Kimmo
> Hämäläinen. I don't believe they say that GL won't be available, but
> that there will be a performance hit

OpenGL is not available in the device but OpenGL ES2 is. Notice that
this is a big problem when porting OpenGL applications from the desktop
PC world.  Some kind of OpenGL to OpenGLES conversion layers are
possible but with some FPS cost, I assume.

>  because the apps will have to go through Hildon-Desktop to render,
> rather than rendering directly.

Yes, about 30% penalty with the compositor, but I'm working on "non-
composited" or "game mode" for hildon-desktop that allows shutting down
the compositor and rendering directly to the screen (without killing
hildon-desktop).  I still need to get it working with dialogs and menus
popping on top of the non-composited application, but I guess it'll work
in the end somehow.

BR; Kimmo

> 
> http://lists.maemo.org/pipermail/maemo-developers/2009-
> March/018639.html
> 
>         As Kate has already proven, multi-context works.
>         But as long as you have hildon-desktop running in the
>         background, you
>         will not render directly to the screen even if you use
>         Clutter/QtGraphicsView/EGL+OpenGLES2.0/whatnot in your
>         application. When
>         hildon-desktop is running, it is the only one drawing on the
>         screen
>         (with the exception of XVideo). So, killing hildon-desktop is
>         the only
>         way to get direct rendering to the screen at the moment. (We
>         might have
>         something more elegant for this in the future...)
> 
> http://lists.maemo.org/pipermail/maemo-developers/2009-
> March/018645.html
> 
>         Keeping the compositor around has some performance impact,
>         because after
>         the application draws to an offscreen pixmap (the window), the
>         X server
>         sends Damage events (saying "this part of the pixmap changed")
>         to
>         hildon-desktop, and hildon-desktop asks the 3D HW to use this
>         pixmap in
>         a OpenGL texture and draw it to the screen. So, there is some
>         extra
>         delay (maybe 10-25ms) after the application's drawing is
>         visible. 
>         
>         Second implication is that you cannot use HW accelerated
>         zooming and
>         moving of textures for the whole graphical pipeline. You can
>         use it for
>         drawing into your window, but when hildon-desktop draws to the
>         screen,
>         it cannot use it (e.g. it cannot say "move this content to
>         there"). It
>         will just get a big damage area that is updated by updating
>         the OpenGL
>         texture content.
>         
>         Third implication: to save memory, we are using the texture-
>         from-pixmap
>         GL extension to allow the X server and 3D HW share the pixmap
>         data. This
>         means that while 3D HW is accessing the pixmap data (while
>         transferring
>         it to the 3D chip), X server cannot access it. Thus, while the
>         compositor is updating the screen, it is slowing down X
>         drawing.
>         However, it's not mandatory to use texture-from-pixmap, but
>         then you are
>         paying the price in increased RAM usage.
>         
> 
> 
> 
> -- 
> enthusiast, n. "One whose mind is wholly possessed and heated by what
> engages it; one who is influenced by a peculiar fervor of mind; an
> ardent and imaginative person."


More information about the maemo-developers mailing list