Re: [info-performer] pfChannel::clear() versus pfClear()

New Message Reply Date view Thread view Subject view Author view

From: Paolo Farinelli (paolo++at++sgi.com)
Date: 03/14/2003 19:26:20


Hi,

You can actually provide a pfVec4 color to pfClear()..

 From 'man pfClear' :

    void pfClear(int which, const pfVec4 color);

    color specifies the red, green, blue, and alpha components of the color
    buffer clear color. Each component is defined in the range 0.0 to
1.0.
    If color is NULL then a black fully opaque color will be used.

Note that the function prototype is different for C and C++.
 From /usr/include/Performer/pr.h :

#if !PF_CPLUSPLUS_API
extern DLLEXPORT void pfClear(int _which, const pfVec4 _col);
#else
extern DLLEXPORT void pfClear(int _which, const pfVec4 *_col);
#endif /* !PF_CPLUSPLUS_API */

Hope this helps,
Regards,
Paolo

Goncalo Carvalho wrote:

>How about in the channel draw callback do a
>glClearColor(...) and glClear(...) and not use the channel->clear?
>
>The obvious drawback is if you have an EarthSky.
>
>The other solution is, as you noted, to use an EarthSky.
>
>Goncalo
>
>
>Bram Stolk wrote:
>
>>Hello,
>>
>>I understand that pfChannel::clear() will, among other things,
>>make a call to pfClear(PFCL_COLOR | PFCL_DEPTH, NULL)
>>
>>However, what if I want to control the clear color?
>>pfClear() let's you do this, but how can I have the Channel use
>>a non-black clear color?
>>
>>I tried some meddling with callbacks and clearing, but I could
>>not get it to work in a quad buffered multi pipe setup. Can it be
>>done without resorting to the use of an earth-sky model?
>>

-- 
Paolo Farinelli                                           paolo++at++sgi.com
Member of Technical Staff, OpenGL Performer              1-650-933-1808
Silicon Graphics        1600 Amphitheatre Pkwy, Mountain View, CA 94043


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Mar 14 2003 - 19:26:46 PST

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