diff src/video/SDL_video.c @ 655:9c42ee1b7d77

Date: Thu, 24 Apr 2003 15:13:47 -0400 From: Shawn Kirst Subject: SDL-1.2.5 patch to add ARB_multisample support Attached is a patch I have written for SDL-1.2.5 that adds ARB_multisample support. I only have the X11 and Win32 video patched. The Win32 patch also adds support for WGL_ARB_pixel_format, as it was required for getting a multisample capable pixel format. No additional GL header files are required to compile on either platform (though you need an up-to-date glx.h for X11). Requesting a multisample pixel format is made possible using SDL_GL_SetAttribute with the two new SDL_GLattr's I've added (SDL_GL_SAMPLE_BUFFERS and SDL_GL_SAMPLES). I've been using SDL in my projects for quite a while now, so I am happy to contribute back to the project. Now you can have and control FSAA in your SDL/GL apps at the application level!
author Sam Lantinga <slouken@libsdl.org>
date Tue, 22 Jul 2003 15:10:06 +0000
parents fe445b59d307
children 864e2d2a9a55
line wrap: on
line diff
--- a/src/video/SDL_video.c	Tue Jul 22 14:01:21 2003 +0000
+++ b/src/video/SDL_video.c	Tue Jul 22 15:10:06 2003 +0000
@@ -233,6 +233,8 @@
 	video->gl_config.accum_blue_size = 0;
 	video->gl_config.accum_alpha_size = 0;
 	video->gl_config.stereo = 0;
+	video->gl_config.sample_buffers = 0;
+	video->gl_config.samples = 0;
 	
 	/* Initialize the video subsystem */
 	memset(&vformat, 0, sizeof(vformat));
@@ -1420,6 +1422,12 @@
 		case SDL_GL_STEREO:
 			video->gl_config.stereo = value;
 			break;
+		case SDL_GL_SAMPLE_BUFFERS:
+			video->gl_config.sample_buffers = value;
+			break;
+		case SDL_GL_SAMPLES:
+			video->gl_config.samples = value;
+			break;
 		default:
 			SDL_SetError("Unknown OpenGL attribute");
 			retval = -1;