From 7028a11db9ec3d29282739f7ad9a0343711ebc24 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 13 Feb 2018 19:15:34 +0100 Subject: GPU: don't use multisample for entire window, only for offscreen 3D viewport. Now that the new 3D viewport draws to a multisample offscreen buffer, there is no good reason anymore to create an entire multisample window and pay the performance/memory cost for other regions that don't need it. GL_MULTISAMPLE now only gets enabled for offscreen buffers, so we don't need to check for it throughout the UI code anymore. Differential Revision: https://developer.blender.org/D3062 --- source/blender/editors/interface/interface.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'source/blender/editors/interface/interface.c') diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 9e6d9f23442..6e86c56fd62 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1393,7 +1393,6 @@ void UI_block_draw(const bContext *C, uiBlock *block) ARegion *ar; uiBut *but; rcti rect; - int multisample_enabled; /* get menu region or area region */ ar = CTX_wm_menu(C); @@ -1403,11 +1402,6 @@ void UI_block_draw(const bContext *C, uiBlock *block) if (!block->endblock) UI_block_end(C, block); - /* disable AA, makes widgets too blurry */ - multisample_enabled = glIsEnabled(GL_MULTISAMPLE); - if (multisample_enabled) - glDisable(GL_MULTISAMPLE); - /* we set this only once */ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -1451,9 +1445,6 @@ void UI_block_draw(const bContext *C, uiBlock *block) gpuPopProjectionMatrix(); gpuPopMatrix(); - if (multisample_enabled) - glEnable(GL_MULTISAMPLE); - ui_draw_links(block); } -- cgit v1.2.3