X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=vid_glx.c;h=ff98510818116e663898d39b73ba7d81776ae714;hp=ad52b4a0ef1f0dc2bf78de985d7f1e8ca2ff1dfd;hb=ecddae3859018ea01887528f3248f03a138be6c3;hpb=42c36cf531913b0b13afab1d0f386c44ae2cc761 diff --git a/vid_glx.c b/vid_glx.c index ad52b4a0..ff985108 100644 --- a/vid_glx.c +++ b/vid_glx.c @@ -613,7 +613,7 @@ void VID_Init(void) mouse_avail = false; } -void VID_BuildGLXAttrib(int *attrib, qboolean stencil, qboolean stereobuffer) +void VID_BuildGLXAttrib(int *attrib, qboolean stencil, qboolean stereobuffer, int samples) { *attrib++ = GLX_RGBA; *attrib++ = GLX_RED_SIZE;*attrib++ = 1; @@ -629,10 +629,17 @@ void VID_BuildGLXAttrib(int *attrib, qboolean stencil, qboolean stereobuffer) } if (stereobuffer) *attrib++ = GLX_STEREO; + if (samples) + { + *attrib++ = GLX_SAMPLE_BUFFERS_ARB; + *attrib++ = 1; + *attrib++ = GLX_SAMPLES_ARB; + *attrib++ = samples; + } *attrib++ = 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) { int i; int attrib[32]; @@ -693,7 +700,7 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp, int refreshrate return false; } - VID_BuildGLXAttrib(attrib, bpp == 32, stereobuffer); + VID_BuildGLXAttrib(attrib, bpp == 32, stereobuffer, samples); visinfo = qglXChooseVisual(vidx11_display, vidx11_screen, attrib); if (!visinfo) {