Re: [info-performer] Overlay to screen

New Message Reply Date view Thread view Subject view Author view

From: Allan Schaffer (allan++at++sgi.com)
Date: 06/14/2002 16:36:54


Rob Body wrote:
> Do overlays work using Linux Performer 2.5, demo version with the Powered by
> OpenGL Performer overlay displayed ??
>
> I need to display an elapsed time on the screen and so far haven't
> succeeded. I just wanted to check whether it was possible before I
> continued debugging.

The most common (and typically, best-performing) way to do an overlay is
to just put some extra code after pfDraw() in the channel draw callback.
 You load an orthographic matrix, set some Z-buffer flags, draw your
overlay, and restore everything back. There is an example of precisely
this in /usr/share/Performer/src/pguide/libpf/C/text.c .. replace the
part that actually draws text (e.g. drawXFontString) with whatever
you've got.

I mention "most common" in the example above because there's another
way, which is to actually use the Overlay bitplanes on platforms which
support separate Overlays. [I can't remember if there are any Linux
systems which do]. But unless the overlay is static, this is generally
a bad idea -- the overhead of switching back & forth between the regular
framebuffer & the overlay bitplanes is usually or at least historically
much higher than that of the "most common" method above.

By the way, Performer 3.0 will make this all trivially simple by
providing an Overlay module with a nice clean API. Can't wait.. :-)

Allan

-- 
Allan Schaffer                                            allan++at++sgi.com
Engr. Manager, Core Rendering                            1-650-933-2160
Silicon Graphics                                     http://www.sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Jun 14 2002 - 16:40:38 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.