Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2012-11-11 16:02:39 +0400
committerTon Roosendaal <ton@blender.org>2012-11-11 16:02:39 +0400
commit886dcf617e573862c45db8dc77316adcb6db0b05 (patch)
tree60d1d96bc151110bf600f373739a0e594a1df059 /source/blender/windowmanager
parent66b488acc3de8c2591fc92f16d445cdf131aaf14 (diff)
MultiSample feature: added provision that requires a restart in order to get
it work properly - you cannot set/disable it in a running program with windows open. In short: Multisample setting is static, set on first time running of Blender, after reading the user preferences. For as far as I can see - disabling/enableing (glEnable) doesn't harm to be used in drawing code. With multisample on at start, you can enable and disable it freely. But without it set at start, enabling doesn't do anything nor draws badly.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_window.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 631bd0c9002..97052fd2fc6 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -333,8 +333,14 @@ void wm_window_title(wmWindowManager *wm, wmWindow *win)
static void wm_window_add_ghostwindow(const char *title, wmWindow *win)
{
GHOST_WindowHandle ghostwin;
+ static int multisamples = -1;
int scr_w, scr_h, posy;
+ /* force setting multisamples only once, it requires restart - and you cannot
+ mix it, either all windows have it, or none (tested in OSX opengl) */
+ if (multisamples == -1)
+ multisamples = U.ogl_multisamples;
+
wm_get_screensize(&scr_w, &scr_h);
posy = (scr_h - win->posy - win->sizey);
@@ -345,7 +351,7 @@ static void wm_window_add_ghostwindow(const char *title, wmWindow *win)
(GHOST_TWindowState)win->windowstate,
GHOST_kDrawingContextTypeOpenGL,
0 /* no stereo */,
- U.ogl_multisamples /* AA */);
+ multisamples /* AA */);
if (ghostwin) {
/* needed so we can detect the graphics card below */