Re: Rendering in the overlay planes

New Message Reply Date view Thread view Subject view Author view

Aaron M. Hightower (aaron++at++skips.dseg.ti.com)
Fri, 28 Jan 94 16:00:34 CST


>From: John C Vanderburgh <jvanderb++at++afit.af.mil>
>Subject: Rendering in the overlay planes
>
> I'd like to render some text in the overlay planes on a (four-processor)
> 4D/440 VGXT from within a Performer 1.2 (Beta) application.
>
> 1. Does the pfInitGfx() call configure the overlay/underlay planes?
> (I assume it doesn't...)

Any configuration of GL stuff for your window needs to be done in the
callback from your pipe initialization callback, initFunc as in

/* From the man page for pfInitPipe */
pfNewPipe(pfPipe *pipe, void (*initFunc)(pfPipe* pipe))
                               ^^^^^^^^

Do any settings for the window here...

> 2. Do I need to use the GL "overlay(n)" call prior to pfInitGfx() in
> order to configure n bitplanes for the overlay planes?
> (I tried this...)

Since you are on a multi-process machine, if you try this (or any other
GL function) from any process other than the draw process, the result is
undefined. Thus the reason for the function pointer passed to pfInitPipe().
Even if you weren't on a multi-process machine, you should do GL functions
only in the proper places (in the draw callback or the function callback in
pfInitPipe() etc)...

> 3. Assuming that I can get past configuring some overlay planes, would
> I render in them via my "draw" callback?

Once everthing is set up, you can use the draw callback to draw your stuff
into the overlay planes. I would suggest, however, that you check Sharon
Fischler's response (in the Frequently Asked Questions) about drawing in
the overlay... You suffer significant performance hits for switching
from drawmode(NORMALDRAW) to drawmode(OVERLAY), and it is actually better
to stay in NORMALDRAW and draw all your stuff over the performer graphics
in a post draw callback for EACH frame. If you do have stuff that is always
staying up there (not changing much or at all) you may want to switch to
drawmode(OVERLAY)...

> I'm not having much luck...

Hope this helps!

>John Vanderburgh
>(Air Force Institute of Technology -- jvanderb++at++afit.af.mil)

                          aaron++at++dseg.ti.com
Aaron Hightower Voice: (214)575-6759
Visualization and Simulation Technology Department FAX: (214)575-6779
Texas Instruments Home: (214)517-9245


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:09 PDT

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