Jeroen,

 

There is an issue in FXGLVisual.cpp which is keeping OpenGL with FOX 1.6.x from working with my video card. (ATI Xpress 128).  The issue is that not all visual numbers returned by DescribePixelFormat() work with my video card.  The following code adds a test of the visual number to make sure it is valid before ranking the visual.  See code below.

 

Was:

 

  void FXGLVisual::create(){

 

  …

 

  for(i=1; i<=nvi; i++) {

 

    // Get info about this visual

    DescribePixelFormat(hdc,i,sizeof(PIXELFORMATDESCRIPTOR),&pfd);

 

      …

 

Should be:

 

  void FXGLVisual::create(){

 

  …

 

 

  int chosen;

 

  …

 

  for(i=1; i<=nvi; i++) {

 

    // Get info about this visual

    DescribePixelFormat(hdc,i,sizeof(PIXELFORMATDESCRIPTOR),&pfd);

 

    // Make sure this visual is valid

    chosen = ChoosePixelFormat(hdc, &pfd);

    if (chosen != i)

    {

       continue;

    }

 

Please strongly consider this change as I’m guessing it will increase your OpenGL compatibility over a much larger range of video cards. Also, I can’t use FOX 1.6.x until it is fixed. :(

 

Thanks for your consideration,

Ryan

 

 

 

 

P.S. Also an interesting tidbit:

OpenGL worked for me with FOX 1.2.x and FOX 1.4.x because of the following code:

 

  // May the best visual win

  if(dmatch<bestmatch){

    bestmatch=dmatch;

    bestvis=i;

  }

 

Between 1.4 and 1.6 the (dmatch<bestmatch) was changed to (dmatch<=bestmatch).   Before the code was choosing visual 11 which works and afterwards it started choosing visual 19.  I don’t think this change was a bad one but interestingly it is what led me to the true problem.