pBuffer

New Message Reply Date view Thread view Subject view Author view

Ruediger Westermann (Ruediger.Westermann++at++informatik.uni-erlangen.de)
Thu, 10 Dec 1998 10:44:41 +0000


Hello,
i'm actually trying to use the SGI PBuffer on several different
machines.

  // find an OpenGL-capable visual
  if (((fbConfigList = glXChooseFBConfigSGIX(
    PixBuffer::display, // connection to X server
    DefaultScreen(PixBuffer::display), // default screen number
    PixBuffer::configAttribList, // list of attributes
    &nitems)) != NULL) && (nitems > 0)) {

    // find an FBconfig in list with RGB == 8 and Zbuffer > 1
    int match = 0, a[5];
    for(int i = 0; i < nitems; i++) {

    glXGetFBConfigAttribSGIX(PixBuffer::display, fbConfigList[i], GLX_RED_SIZE,
&a[0]);
    glXGetFBConfigAttribSGIX(PixBuffer::display, fbConfigList[i],
GLX_GREEN_SIZE, &a[1]);
    glXGetFBConfigAttribSGIX(PixBuffer::display, fbConfigList[i],
GLX_BLUE_SIZE, &a[2]);
    glXGetFBConfigAttribSGIX(PixBuffer::display, fbConfigList[i],
GLX_ALPHA_SIZE, &a[3]);
    glXGetFBConfigAttribSGIX(PixBuffer::display, fbConfigList[i],
GLX_DEPTH_SIZE, &a[4]);

    printf("r = %d, b = %d g = %d a = %d z = %d\n",
            a[0],a[1],a[2],a[3],a[4]);
    if((a[0] == 8) && (a[1] == 8) && (a[2] == 8) && (a[3] == 0) && (a[4] > 1))
{
      match = i;
      printf("fbConfigList[%d] matches the selected attribList\n", i);
      break;
    }
  }

On some machines it does work, on others i get the message that the only
visual that is available is r=12 g=12 b=12 a=12 d=24 but the X-Server
can't allocate the requested resource.

Does someone knows about a workaround ?

Thanks
Ruediger

-- 

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Thu Dec 10 1998 - 01:45:43 PST

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