severity 320375 normal
retitle 320375 conquest-gl: require visual with at least 1bit of alpha channel
quit

On Fri, Apr 21, 2006 at 11:37:39PM +0200, [EMAIL PROTECTED] wrote:
> On Fri, Apr 21, 2006 at 07:34:32PM +0200, Bill Allombert wrote:
> > Once upgrading (only) freeglut3 to 2.4.0-5, I get
> > freeglut (conquestgl):  ERROR:  Internal error <Visual with necessary
> > capabilities not found> in function fgOpenWindow
> > X Error of failed request:  BadWindow (invalid Window parameter)
> >   Major opcode of failed request:  4 (X_DestroyWindow)
> >   Resource id in failed request:  0x0
> >   Serial number of failed request:  29
> >   Current serial number in output stream:  33
> > 
> > Once upgrading (only) conquest-gl to 8.1.2-2 I get
> > 
> > conquestgl: symbol lookup error: conquestgl: undefined symbol: dspInitData
> 
> After upgrading conquest-libs to 8.1.2-2 I get:
> 
> freeglut (conquestgl):  ERROR:  Internal error <Visual with necessary 
> capabilities not found> in function fgOpenWindow
> X Error of failed request:  BadWindow (invalid Window parameter)
>   Major opcode of failed request:  4 (X_DestroyWindow)
>   Resource id in failed request:  0x0
>   Serial number of failed request:  23
>   Current serial number in output stream:  26
> 
> So it seems conquest-gl need a versionned dependency on conquest-libs
> (or conquest-libs shlibdeps should be bumped) to allow for partial
> upgrades.
> 
> The code before this error:
> GL.c:962
> 
>   glutInit(argc, argv);
>   glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA);
> 
>   glutInitWindowPosition(0,0);
> 
>   glutInitWindowSize(dConf.initWidth, dConf.initHeight);
> 
>   dConf.mainw = glutCreateWindow(CONQUESTGL_NAME);
> 
> Removing GLUT_ALPHA from glutInitDisplayMode in this file allow to 
> bypass the error message and get a window. (I am not sure whether
> conquestgl really work but it does not crash).
> 
> According to the OPENGL GLUT spec: 
> 
>    GLUT_ALPHA
>           Bit mask to select a window with an alpha component to the
>           color buffer(s).
> 
> So Jamie, does the error means that my GL driver does not support 
> alpha transparency, or is it a bug in freeglut ? 

By looking at the code, glutInitDisplayMode call 
glXChooseVisual with attribute GLX_ALPHA_SIZE=1 which according to
glXChooseVisual manpage do

  glXChooseVisual returns a pointer to an XVisualInfo structure describing
  the visual that best meets a minimum specification. The boolean GLX
  attributes of the visual that is returned will match the specified
  values, and the integer GLX attributes will meet or exceed the specified
  minimum values. If all other attributes are equivalent, then TrueColor
  and PseudoColor visuals have priority over DirectColor and StaticColor
  visuals, respectively. If no conforming visual exists, NULL is returned. 
  
  GLX_ALPHA_SIZE
      Must be followed by a nonnegative minimum size specification. If
      this value is zero, the smallest available alpha buffer is
      preferred. Otherwise, the largest available alpha buffer of at least
      the minimum size is preferred.

This means that conquest-gl require a visual with at least on bit of
alpha channel. 

Since

1) There are Debian systems that support visuals with at least 1bit of
   alpha channel and conquest-gl works fine there,

2) The freeglut error message has been changed to something better than
   a assert.

I am downgrading this bug to normal.

What I could not determine with my hardward is whether alpha channel is
strictly required for correct conquest-gl operation and whether freeglut
allows an application to request alpha channel only when available (I
don't think it does).

Cheers,
-- 
Bill. <[EMAIL PROTECTED]>

Imagine a large red swirl here. 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to