diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 4 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_extensions.c | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_draw.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 10 | ||||
-rw-r--r-- | source/blender/windowmanager/wm_window.h | 2 |
7 files changed, 12 insertions, 14 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index c4229428cd7..776b1a0bbb3 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -2776,8 +2776,10 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Scene *scene, View3D *v3d, ARegion *ar, in /* bind */ ofs = GPU_offscreen_create(sizex, sizey, err_out); - if (ofs == NULL) + if (ofs == NULL) { + glPopAttrib(); return NULL; + } ED_view3d_draw_offscreen_init(scene, v3d); diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index 5d645a5545b..7909213e793 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -900,8 +900,7 @@ void GPU_framebuffer_texture_detach(GPUFrameBuffer *fb, GPUTexture *tex) void GPU_framebuffer_texture_bind(GPUFrameBuffer *UNUSED(fb), GPUTexture *tex, int w, int h) { /* push attributes */ - glPushAttrib(GL_ENABLE_BIT); - glPushAttrib(GL_VIEWPORT_BIT); + glPushAttrib(GL_ENABLE_BIT | GL_VIEWPORT_BIT); glDisable(GL_SCISSOR_TEST); /* bind framebuffer */ @@ -927,7 +926,6 @@ void GPU_framebuffer_texture_unbind(GPUFrameBuffer *UNUSED(fb), GPUTexture *UNUS /* restore attributes */ glPopAttrib(); - glPopAttrib(); glEnable(GL_SCISSOR_TEST); } diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index f7b7aa87cf8..0e1e41b0149 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -384,7 +384,7 @@ void wm_add_default(bContext *C) wm->winactive = win; wm->file_saved = 1; - wm_window_make_drawable(C, win); + wm_window_make_drawable(wm, win); } diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 396c827fe25..005d02647a4 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -828,7 +828,7 @@ void wm_draw_update(bContext *C) CTX_wm_window_set(C, win); /* sets context window+screen */ - wm_window_make_drawable(C, win); + wm_window_make_drawable(wm, win); /* notifiers for screen redraw */ if (win->screen->do_refresh) diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index fcacfbbb686..098fe72688c 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2130,7 +2130,7 @@ void wm_event_do_handlers(bContext *C) CTX_wm_region_set(C, region_event_inside(C, &event->x)); /* MVC demands to not draw in event handlers... but we need to leave it for ogl selecting etc */ - wm_window_make_drawable(C, win); + wm_window_make_drawable(wm, win); wm_region_mouse_co(C, event); diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 70cb10476d7..fe419010780 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -677,10 +677,8 @@ static int query_qual(modifierKeyType qual) return val; } -void wm_window_make_drawable(bContext *C, wmWindow *win) +void wm_window_make_drawable(wmWindowManager *wm, wmWindow *win) { - wmWindowManager *wm = CTX_wm_manager(C); - if (win != wm->windrawable && win->ghostwin) { // win->lmbut = 0; /* keeps hanging when mousepressed while other window opened */ @@ -786,7 +784,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr win->addmousemove = 1; /* enables highlighted buttons */ - wm_window_make_drawable(C, win); + wm_window_make_drawable(wm, win); /* window might be focused by mouse click in configuration of window manager * when focus is not following mouse @@ -817,7 +815,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr printf("%s: ghost redraw %d\n", __func__, win->winid); } - wm_window_make_drawable(C, win); + wm_window_make_drawable(wm, win); WM_event_add_notifier(C, NC_WINDOW, NULL); break; @@ -898,7 +896,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr } } - wm_window_make_drawable(C, win); + wm_window_make_drawable(wm, win); wm_draw_window_clear(win); WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL); WM_event_add_notifier(C, NC_WINDOW | NA_EDITED, NULL); diff --git a/source/blender/windowmanager/wm_window.h b/source/blender/windowmanager/wm_window.h index a0546c88b78..22fa2423f61 100644 --- a/source/blender/windowmanager/wm_window.h +++ b/source/blender/windowmanager/wm_window.h @@ -51,7 +51,7 @@ void wm_window_add_ghostwindows (wmWindowManager *wm); void wm_window_process_events (const bContext *C); void wm_window_process_events_nosleep(void); -void wm_window_make_drawable(bContext *C, wmWindow *win); +void wm_window_make_drawable(wmWindowManager *wm, wmWindow *win); void wm_window_raise (wmWindow *win); void wm_window_lower (wmWindow *win); |