comparison 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
comparison
equal deleted inserted replaced
654:e92bcf2573cb 655:9c42ee1b7d77
231 video->gl_config.accum_red_size = 0; 231 video->gl_config.accum_red_size = 0;
232 video->gl_config.accum_green_size = 0; 232 video->gl_config.accum_green_size = 0;
233 video->gl_config.accum_blue_size = 0; 233 video->gl_config.accum_blue_size = 0;
234 video->gl_config.accum_alpha_size = 0; 234 video->gl_config.accum_alpha_size = 0;
235 video->gl_config.stereo = 0; 235 video->gl_config.stereo = 0;
236 video->gl_config.sample_buffers = 0;
237 video->gl_config.samples = 0;
236 238
237 /* Initialize the video subsystem */ 239 /* Initialize the video subsystem */
238 memset(&vformat, 0, sizeof(vformat)); 240 memset(&vformat, 0, sizeof(vformat));
239 if ( video->VideoInit(video, &vformat) < 0 ) { 241 if ( video->VideoInit(video, &vformat) < 0 ) {
240 SDL_VideoQuit(); 242 SDL_VideoQuit();
1418 video->gl_config.accum_alpha_size = value; 1420 video->gl_config.accum_alpha_size = value;
1419 break; 1421 break;
1420 case SDL_GL_STEREO: 1422 case SDL_GL_STEREO:
1421 video->gl_config.stereo = value; 1423 video->gl_config.stereo = value;
1422 break; 1424 break;
1425 case SDL_GL_SAMPLE_BUFFERS:
1426 video->gl_config.sample_buffers = value;
1427 break;
1428 case SDL_GL_SAMPLES:
1429 video->gl_config.samples = value;
1430 break;
1423 default: 1431 default:
1424 SDL_SetError("Unknown OpenGL attribute"); 1432 SDL_SetError("Unknown OpenGL attribute");
1425 retval = -1; 1433 retval = -1;
1426 break; 1434 break;
1427 } 1435 }