Re: 12 bit color buffer

New Message Reply Date view Thread view Subject view Author view

Don Burns (don_burns++at++peru.csd.sgi.com)
Tue, 22 Dec 1998 13:01:35 -0800 (PST)


On Dec 22, 2:24pm, Charles Paik wrote:
> Subject: 12 bit color buffer
> I was wondering if anyone knows how to increase the number of bits in
> the color buffer. Currently, I have a double-buffered, 32 bit RGBA color
> buffer (8 bits per color). I'd like to bump up the RGB to 12 bits per color
> or at least 10 bits (and I am willing to give up zbuffer memory and other
> frame buffer memory). I have seen some example code using
> pfFBCinfigX() calls, but I have not been able to make those pieces of
> code work for me.
>
> I was wondering if anyone knows how to increase color resolution
> using performer, openGL, or any tool, and/or where I can find
> documentation on how to accomplish this goal.
>
> Thanks in advance.
>
> -Charles Paik
> charles.c.paik++at++boeing.com
>
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>-- End of excerpt from Charles Paik

Charles,

What you need is to choose the right visual for your pfPipeWindow (pfPipeWindow
refers to these as FBConfigs). You may do so, before calling
pipeWindow->config(), by calling any of

        pfPipeWindow::setFBConfig( XVisualInfo *)
        pfPipeWindow::setFBConfigAttrs( int *)
or
        pfPipeWindow::setFBConfigId( int id)

You may query what visuals are available on your current system/configuration
by the command "glxinfo", which will list each visual by id. If you pick the
visual you want you may pass it's id into setFBConfigId() - Not recommended
because it is not portable.

Or, you may call glXChooseVisual(3G), passing it a list of attributes as
specified in the man page. glXChooseVisual() will return an XVisualInfo *,
which you may pass to setFBConfig().

Or you may pass a similar list of attributes (defined in
/usr/include/Performer/pr.h as PFFB_ tokens) as passed to glXChooseVisual to
setFBConfigAttrs().

For example, in your case you might do something like :

    pfPipeWindow *pw = new pfPipeWindow( pfGetPipe( 0 ) );

    int visualAttributes[] = {
        PFFB_RGBA,
        PFFB_RED_SIZE, 12,
        PFFB_GREEN_SIZE, 12,
        PFFB_BLUE_SIZE, 12,
        PFFB_ALPHA_SIZE, 0,
        PFFB_DEPTH_SIZE, 24,
        PFFB_STENCIL_SIZE, 8,
                0,
    };

    pw->setFBConfigAttrs( visualAttributes );

-don


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Tue Dec 22 1998 - 13:02:44 PST

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