diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-10-31 18:08:14 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-10-31 18:08:14 +0400 |
commit | 56421d869dd080c0c3e715736dbc6de6e03526e5 (patch) | |
tree | 02d2eaabcb0ab60c4b06c5d9f5dbaa283f25d327 /source/blender/editors/space_view3d/view3d_draw.c | |
parent | a664e779ac8be0f926221d4c064394f9b3b6a801 (diff) |
Fix: selecting with z-buffer hiding did not work when graphics card settings
enabled antialiasing, overriding application settings.
The fix for this got lost when the FSAA option was added and later disabled
again. Added it back now, and also disable AA for UI widgets since it makes
them look too blurry, they already do their own AA.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 32e553262e2..6b5e7792e85 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1226,6 +1226,7 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d) { RegionView3D *rv3d= ar->regiondata; struct Base *base = scene->basact; + int multisample_enabled; rcti winrct; BLI_assert(ar->regiontype == RGN_TYPE_WINDOW); @@ -1252,8 +1253,13 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d) if(v3d->drawtype > OB_WIRE) v3d->zbuf= TRUE; + /* dithering and AA break color coding, so disable */ glDisable(GL_DITHER); + multisample_enabled= glIsEnabled(GL_MULTISAMPLE_ARB); + if(multisample_enabled) + glDisable(GL_MULTISAMPLE_ARB); + region_scissor_winrct(ar, &winrct); glScissor(winrct.xmin, winrct.ymin, winrct.xmax - winrct.xmin, winrct.ymax - winrct.ymin); @@ -1272,9 +1278,8 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d) G.f |= G_BACKBUFSEL; - if(base && (base->lay & v3d->lay)) { + if(base && (base->lay & v3d->lay)) draw_object_backbufsel(scene, v3d, rv3d, base->object); - } v3d->flag &= ~V3D_INVALID_BACKBUF; ar->swap= 0; /* mark invalid backbuf for wm draw */ @@ -1283,6 +1288,8 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d) v3d->zbuf= FALSE; glDisable(GL_DEPTH_TEST); glEnable(GL_DITHER); + if(multisample_enabled) + glEnable(GL_MULTISAMPLE_ARB); if(rv3d->rflag & RV3D_CLIPPING) view3d_clr_clipping(); |