diff src/video/maccommon/SDL_macgl.c @ 1737:eacc5bc01d1c

Implemented bug #5 Added SDL_GL_ACCELERATED_VISUAL to guarantee hardware acceleration.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 27 Apr 2006 08:39:51 +0000
parents f1781c15934c
children 14717b52abc0
line wrap: on
line diff
--- a/src/video/maccommon/SDL_macgl.c	Thu Apr 27 07:59:16 2006 +0000
+++ b/src/video/maccommon/SDL_macgl.c	Thu Apr 27 08:39:51 2006 +0000
@@ -34,7 +34,7 @@
 #if SDL_VIDEO_OPENGL
 	AGLPixelFormat format;
    	int i = 0;
-	GLint attributes [ 24 ]; /* 24 is max possible in this setup */
+	GLint attributes [ 26 ]; /* 26 is max possible in this setup */
 	GLboolean noerr;
    
 	/* load the gl driver from a default path */
@@ -95,6 +95,11 @@
 		attributes[i++] = this->gl_config.multisamplesamples;
 	}	
 #endif
+	if ( this->gl_config.accelerated > 0 ) {
+		attributes[i++] = AGL_ACCELERATED;
+		attributes[i++] = AGL_NO_RECOVERY;
+	}
+
 	attributes[i++] = AGL_ALL_RENDERERS;
 	attributes[i]	= AGL_NONE;