forked from bartvdbraak/blender
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.
This commit is contained in:
parent
66b488acc3
commit
886dcf617e
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user