X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=vid_agl.c;h=2cf7194bc1edc202d9a5b6677575774c0713d497;hp=1bf5995b11b91463796e4dbbfcf0e52010a2c8eb;hb=ecddae3859018ea01887528f3248f03a138be6c3;hpb=42c36cf531913b0b13afab1d0f386c44ae2cc761 diff --git a/vid_agl.c b/vid_agl.c index 1bf5995b..2cf7194b 100644 --- a/vid_agl.c +++ b/vid_agl.c @@ -499,7 +499,7 @@ static void VID_ProcessPendingAsyncEvents (void) Sys_Quit(0); } -static void VID_BuildAGLAttrib(GLint *attrib, qboolean stencil, qboolean fullscreen, qboolean stereobuffer) +static void VID_BuildAGLAttrib(GLint *attrib, qboolean stencil, qboolean fullscreen, qboolean stereobuffer, int samples) { *attrib++ = AGL_RGBA; *attrib++ = AGL_RED_SIZE;*attrib++ = 1; @@ -518,10 +518,22 @@ static void VID_BuildAGLAttrib(GLint *attrib, qboolean stencil, qboolean fullscr *attrib++ = AGL_FULLSCREEN; if (stereobuffer) *attrib++ = AGL_STEREO; +#ifdef AGL_SAMPLE_BUFFERS_ARB +#ifdef AGL_SAMPLES_ARB + if (samples > 1) + { + *attrib++ = AGL_SAMPLE_BUFFERS_ARB; + *attrib++ = 1; + *attrib++ = AGL_SAMPLES_ARB; + *attrib++ = samples; + } +#endif +#endif + *attrib++ = AGL_NONE; } -int VID_InitMode(int fullscreen, int width, int height, int bpp, int refreshrate, int stereobuffer) +int VID_InitMode(int fullscreen, int width, int height, int bpp, int refreshrate, int stereobuffer, int samples) { const EventTypeSpec winEvents[] = { @@ -592,7 +604,7 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp, int refreshrate GetEventTypeCount(winEvents), winEvents, window, NULL); // Create the desired attribute list - VID_BuildAGLAttrib(attributes, bpp == 32, fullscreen, stereobuffer); + VID_BuildAGLAttrib(attributes, bpp == 32, fullscreen, stereobuffer, samples); if (!fullscreen) {