diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-13 17:45:45 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-13 17:45:45 +0400 |
commit | 10474c324dcc0c66d55e5b86a683f47f23d7fd76 (patch) | |
tree | 3520b6d2f9aab62bfe86cdc81a2b36044423ad19 | |
parent | 281c1565b94948ad1d5339b9e8bf1157598aa199 (diff) |
Fix #35342: multisample antialiasing makes tooltips look blurry.
-rw-r--r-- | source/blender/editors/interface/interface_regions.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index a5f96f98949..3d149d9951a 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -365,7 +365,12 @@ static void ui_tooltip_region_draw_cb(const bContext *UNUSED(C), ARegion *ar) float background_color[3]; float tone_bg; - int i; + int i, multisample_enabled; + + /* disable AA, makes widgets too blurry */ + multisample_enabled = glIsEnabled(GL_MULTISAMPLE_ARB); + if (multisample_enabled) + glDisable(GL_MULTISAMPLE_ARB); /* draw background */ ui_draw_tooltip_background(UI_GetStyle(), NULL, &bbox); @@ -402,6 +407,9 @@ static void ui_tooltip_region_draw_cb(const bContext *UNUSED(C), ARegion *ar) bbox.ymin -= data->lineh + data->spaceh; bbox.ymax -= data->lineh + data->spaceh; } + + if (multisample_enabled) + glEnable(GL_MULTISAMPLE_ARB); } static void ui_tooltip_region_free_cb(ARegion *ar) |