Always do either FULL or NO acceleration for Windows OpenGL. SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Sun, 06 Nov 2011 16:34:32 -0500
branchSDL-1.2
changeset 6057d0b7c45e982e
parent 6056 c6041c61f9a6
child 6058 6144843db128
Always do either FULL or NO acceleration for Windows OpenGL.

Don't ever leave it to the OS to decide, because older ATI drivers apparently
break in this case, and generally apps want FULL by default anyhow.
src/video/wincommon/SDL_wingl.c
     1.1 --- a/src/video/wincommon/SDL_wingl.c	Fri Nov 04 17:44:17 2011 -0400
     1.2 +++ b/src/video/wincommon/SDL_wingl.c	Sun Nov 06 16:34:32 2011 -0500
     1.3 @@ -226,7 +226,18 @@
     1.4  	*iAttr++ = this->gl_config.green_size;
     1.5  	*iAttr++ = WGL_BLUE_BITS_ARB;
     1.6  	*iAttr++ = this->gl_config.blue_size;
     1.7 -	
     1.8 +
     1.9 +	/* We always choose either FULL or NO accel on Windows, because of flaky
    1.10 +	   drivers. If the app didn't specify, we use FULL, because that's
    1.11 +	   probably what they wanted (and if you didn't care and got FULL, that's
    1.12 +	   a perfectly valid result in any case. */
    1.13 +	*iAttr++ = WGL_ACCELERATION_ARB;
    1.14 +	if (this->gl_config.accelerated) {
    1.15 +		*iAttr++ = WGL_FULL_ACCELERATION_ARB;
    1.16 +	} else {
    1.17 +		*iAttr++ = WGL_NO_ACCELERATION_ARB;
    1.18 +	}
    1.19 +
    1.20  	if ( this->gl_config.alpha_size ) {
    1.21  		*iAttr++ = WGL_ALPHA_BITS_ARB;
    1.22  		*iAttr++ = this->gl_config.alpha_size;
    1.23 @@ -278,11 +289,6 @@
    1.24  		*iAttr++ = this->gl_config.multisamplesamples;
    1.25  	}
    1.26  
    1.27 -	if ( this->gl_config.accelerated >= 0 ) {
    1.28 -		*iAttr++ = WGL_ACCELERATION_ARB;
    1.29 -		*iAttr++ = (this->gl_config.accelerated ? WGL_FULL_ACCELERATION_ARB : WGL_NO_ACCELERATION_ARB);
    1.30 -	}
    1.31 -
    1.32  	*iAttr = 0;
    1.33  
    1.34  	for ( i=0; ; ++i ) {