From 4121e4b7e7420bfafe218da501162c8eae22a158 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sat, 10 Nov 2012 11:55:45 +0000 Subject: Added UI support to set OpenGL MultiSample. Code to support it was lying around for long already, but not controlled by UI nicely. Now you have in user preferences "System" tab an option to set it. NOTE: - it only works saving as User startup.blend, and restart Blender. - your system should support it, no check for it is visible in UI - tested only on iMac OSX 10.7 Screenshot: http://www.blender.org/bf/chinchilla.blend.png --- source/blender/editors/space_view3d/view3d_draw.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index db74179b569..24fc6adae6d 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -2985,10 +2985,10 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const v3d->zbuf = FALSE; /* enables anti-aliasing for 3D view drawing */ -#if 0 - if (!(U.gameflags & USER_DISABLE_AA)) - glEnable(GL_MULTISAMPLE_ARB); -#endif + if (U.ogl_multisamples) + if (!(U.gameflags & USER_DISABLE_AA)) + glEnable(GL_MULTISAMPLE_ARB); + /* needs to be done always, gridview is adjusted in drawgrid() now */ rv3d->gridview = v3d->grid; @@ -3101,12 +3101,12 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const BIF_draw_manipulator(C); -#if 0 /* Disable back anti-aliasing */ - if (!(U.gameflags & USER_DISABLE_AA)) - glDisable(GL_MULTISAMPLE_ARB); -#endif + if (U.ogl_multisamples) + if (!(U.gameflags & USER_DISABLE_AA)) + glDisable(GL_MULTISAMPLE_ARB); + if (v3d->zbuf) { v3d->zbuf = FALSE; glDisable(GL_DEPTH_TEST); -- cgit v1.2.3