Eric,
 
    I see that you have CVS access and made a few changes over the weekend.  Would you be so kind as to put in the change set below?
 
    Thank you very much.  And there's more where that came from.
 

John F. Fay
Technical Fellow, Jacobs/Sverdrup TEAS Group
850-883-1294
john.fay@eglin.af.mil
 

 


From: freeglut-developer-bounces@lists.sourceforge.net [mailto:freeglut-developer-bounces@lists.sourceforge.net] On Behalf Of Fay John F Dr CTR USAF AFSEO/SK
Sent: Wednesday, June 28, 2006 8:01 AM
To: FreeGLUT developers list
Subject: [Freeglut-developer] Alpha bits under Windows

Folks,

        Here is the first change that needs to go into a new release in order to support alpha planes under Windows.  In "freeglut_window.c" starting around line 194:

      /* Specify which pixel format do we opt for... */
      pfd.nSize           = sizeof(PIXELFORMATDESCRIPTOR);
      pfd.nVersion        = 1;
      pfd.dwFlags         = flags;
      pfd.iPixelType      = PFD_TYPE_RGBA;
+
+     if( fgState.DisplayMode & GLUT_INDEX )
+     {
+         pfd.iPixelType = PFD_TYPE_COLORINDEX;
+         pfd.cRedBits        = 0;
+         pfd.cGreenBits      = 0;
+         pfd.cBlueBits       = 0;
+         pfd.cAlphaBits      = 0;
+     }
+     else
+     {
+         pfd.iPixelType = PFD_TYPE_RGBA;
+         pfd.cRedBits        = 8;
+         pfd.cGreenBits      = 8;
+         pfd.cBlueBits       = 8;
+         if ( fgState.DisplayMode & GLUT_ALPHA )
+             pfd.cAlphaBits      = 8;
+         else
+             pfd.cAlphaBits      = 0;
+     }
+
      pfd.cColorBits      = 24;
-     pfd.cRedBits        = 0;
      pfd.cRedShift       = 0;
-     pfd.cGreenBits      = 0;
      pfd.cGreenShift     = 0;
-     pfd.cBlueBits       = 0;
      pfd.cBlueShift      = 0;
-     pfd.cAlphaBits      = 0;
      pfd.cAlphaShift     = 0;
      pfd.cAccumBits      = 0;

SourceForge is presently on the fritz, but when it comes up again I would appreciate it if somebody were to put the changes in.

John F. Fay
Technical Fellow, Jacobs/Sverdrup TEAS Group
850-883-1294
john.fay@eglin.af.mil