diff options
author | Miika Hamalainen <blender@miikah.org> | 2011-11-05 12:04:49 +0400 |
---|---|---|
committer | Miika Hamalainen <blender@miikah.org> | 2011-11-05 12:04:49 +0400 |
commit | 2ed6f077b3952123d56916980d18a379ecb3e5ac (patch) | |
tree | 1aa273e5566c95214739fb224d4c6cf115417882 /source/blender/editors/interface/interface.c | |
parent | b9c83456b27da57a14bcf8d274b460e670d49990 (diff) | |
parent | 62f22185546e80b661424b45c88006f8b592d8b1 (diff) |
Merge with trunk r41545
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r-- | source/blender/editors/interface/interface.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 5b27fe88b4b..eff4d1f6397 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -962,6 +962,7 @@ void uiDrawBlock(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); @@ -971,6 +972,11 @@ void uiDrawBlock(const bContext *C, uiBlock *block) if(!block->endblock) uiEndBlock(C, block); + /* disable AA, makes widgets too blurry */ + multisample_enabled= glIsEnabled(GL_MULTISAMPLE_ARB); + if(multisample_enabled) + glDisable(GL_MULTISAMPLE_ARB); + /* we set this only once */ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -1015,6 +1021,9 @@ void uiDrawBlock(const bContext *C, uiBlock *block) glPopMatrix(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); + + if(multisample_enabled) + glEnable(GL_MULTISAMPLE_ARB); ui_draw_links(block); } @@ -2560,10 +2569,12 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str, if(block->curlayout) ui_layout_add_but(block->curlayout, but); +#ifdef WITH_PYTHON /* if the 'UI_OT_editsource' is running, extract the source info from the button */ if (UI_editsource_enable_check()) { UI_editsource_active_but_test(but); } +#endif return but; } |