RE: pfMQuerySys question

New Message Reply Date view Thread view Subject view Author view

From: Simon Hayhurst (simon++at++cthulhu.engr.sgi.com)
Date: 03/11/2000 17:49:48


Soren,

You are in effect asking for the max supported of each type, which
may well not be a supported visual.

"glxinfo" shows you the actual supported visuals.

Back off your requirements on something you don't need to the max
supported level, and you'll find your request meets with a supported
visual.

Ciao,
Simon
> -----Original Message-----
> From: Soren Vorre Therkildsen [mailto:svorre++at++daimi.au.dk]
> Sent: Saturday, March 11, 2000 9:40 AM
> To: info-performer++at++sgi.com
> Subject: pfMQuerySys question
>
>
>
> Hi there!
>
> I am having some trouble setting up a framebuffer.
>
> I want to query the system for the max number of
> bits for color, depth, stencil and so on.
> I have added a code example of how I do this.
> I am running the program on an ONYX2 IR, using
> Performer2.2.7 Execution Environment.
>
> My problem is that i still get a:
> -------------------------------------------------------
> PF Notice: pfChooseFBConfig: failed to make
> configuration matching specified attributes
> -------------------------------------------------------
> when I set up the framebuffer.
>
> The answers I get from pfMQuerySys are:
>
> PFQSYS_MAX_DBL_ALPHA_BITS = 12
> PFQSYS_MAX_MS_DEPTH_BITS = 23
> PFQSYS_MAX_MS_STENCIL_BITS = 8
> PFQSYS_MAX_MS_SAMPLES = 8
>
> The only thing I can do to avoid the error message
> above is to hardcode PFFB_SAMPLES to 4.
>
> What am I doing wrong ?
>
> Regards
> Soeren Vorre
>
> code example:
> ------------------------------------------------
> void
> SimpleDisplay::setFrameBufferAttributes ()
> {
> int colorBits;
> int depthBits;
> int stencilBits;
> int multiSampleBits;
> int query[5] = {PFQSYS_MAX_DBL_ALPHA_BITS,
> PFQSYS_MAX_MS_DEPTH_BITS,
> PFQSYS_MAX_MS_STENCIL_BITS,
> PFQSYS_MAX_MS_SAMPLES,
> 0};
> int result[4];
>
> pfMQuerySys (query, result);
> colorBits = result[0];
> depthBits = result[1];
> stencilBits = result[2];
> multiSampleBits = result[3];
>
> int FBAtrributes[17] = {
> PFFB_RGBA,
> PFFB_DOUBLEBUFFER,
> PFFB_RED_SIZE, colorBits,
> PFFB_GREEN_SIZE, colorBits,
> PFFB_BLUE_SIZE, colorBits,
> PFFB_ALPHA_SIZE, colorBits,
> PFFB_DEPTH_SIZE, depthBits,
> PFFB_STENCIL_SIZE, stencilBits,
> PFFB_SAMPLES, multiSampleBits,
> 0
> };
>
> this->frameBufferAttributes = (int *) pfMalloc(17 * sizeof(int),
> pfGetSharedArena());
> memcpy(this->frameBufferAttributes,FBAtrributes,17 * sizeof(int));
> }
>
> void
> SimpleDisplay::create ()
> {
> pfPipeWindow *w;
>
> setFrameBufferAttributes ();
> this->pipe = pfGetPipe (0);
> w = new pfPipeWindow (this->pipe);
> w->setScreen (0);
> w->setName ("test");
> w->setWinType (PFWIN_TYPE_X);
> w->setFBConfigAttrs (this->frameBufferAttributes);
> w->setOriginSize ( 0, 0, this->windowWidth, this->windowHeigth);
> w->config ();
> w->addChan (leftChannel);
> leftChannel = new pfChannel (this->pipe);
>
> this->window = w;
> }
> --------------------------------------------------------------
> ---------
> List Archives, FAQ, FTP: http://www.sgi.com/software/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 2b29 : Sat Mar 11 2000 - 17:45:48 PST

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