Re: Three channels -> draw_callback function run three times????

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++bitch.reading.sgi.com)
Tue, 25 Feb 1997 03:15:18 +0000


On Feb 24, 12:00am, Ren-Jye Yu wrote:
> Subject: Three channels -> draw_callback function run three times????
> Hello,
> I am creating three channels to show three views and then use the draw
> callback fuction to draw the Head Up Display(HUD). I found that my HUD
> subroutine will run three times. Two of them are redundant. I only pass data
> into channel one. I print out the calculation result of HUD subroutine. The
> same variable will print out three times. Only the first one affects the HUD.
> Do you have any suggestion to avoid these two redundant calculations?

Use call data or the channel pointer to identify the channel and toggle the
call to draw the hud.

> Do you have any idea why pfDrawChanStats cannot show the statistics
> diagram after my HUD subroutine became complex?

Sounds like the state you are leaving the GL in. Try to leave things in
a reasonably sane state after the HUD, maybe try simplifying the HUD to
troubleshoot what's causing the problem.

> ... Can you tell me which command
> also can show the frame rate?

Drawintg the channel statistics should be able to give you this info,
the trouble is drawing the statistics can affect the frame rate, perhaps
much more so than your HUD.

> ...I need to know how the HUD subroutine affects the
> frame rate.

Use pfGetTime() in your draw to time when you enter the same piece of code
each frame. You could time isolated drawing like the HUD code but you have
to make sure you flush the calls and you have to be carefull how you
interpret the information.

Cheers,
Angus.
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


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:54:43 PDT

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