diff options
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm_draw.c | 3 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 12 |
2 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 5efe9330f52..a7500a55bda 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -782,6 +782,7 @@ void WM_paint_cursor_tag_redraw(wmWindow *win, ARegion *UNUSED(ar)) void wm_draw_update(bContext *C) { + Main *bmain = CTX_data_main(C); wmWindowManager *wm = CTX_wm_manager(C); wmWindow *win; @@ -789,7 +790,7 @@ void wm_draw_update(bContext *C) BKE_subsurf_free_unused_buffers(); #endif - GPU_free_unused_buffers(); + GPU_free_unused_buffers(bmain); for (win = wm->windows.first; win; win = win->next) { #ifdef WIN32 diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index a14cbed6381..cae0bc06691 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -167,7 +167,7 @@ bool wm_start_with_console = false; /* used in creator.c */ **/ static bool opengl_is_init = false; -void WM_init_opengl(void) +void WM_init_opengl(Main *bmain) { /* must be called only once */ BLI_assert(opengl_is_init == false); @@ -181,10 +181,10 @@ void WM_init_opengl(void) DRW_opengl_context_create(); GPU_init(); - GPU_set_mipmap(true); + GPU_set_mipmap(bmain, true); GPU_set_linear_mipmap(true); - GPU_set_anisotropic(U.anisotropic_filter); - GPU_set_gpu_mipmapping(U.use_gpu_mipmap); + GPU_set_anisotropic(bmain, U.anisotropic_filter); + GPU_set_gpu_mipmapping(bmain, U.use_gpu_mipmap); GPU_pass_cache_init(); @@ -250,7 +250,7 @@ void WM_init(bContext *C, int argc, const char **argv) /* sets 3D mouse deadzone */ WM_ndof_deadzone_set(U.ndof_deadzone); #endif - WM_init_opengl(); + WM_init_opengl(G_MAIN); UI_init(); BKE_studiolight_init(); @@ -491,7 +491,7 @@ void WM_exit_ext(bContext *C, const bool do_python) BKE_subsurf_osd_cleanup(); #endif - GPU_free_unused_buffers(); + GPU_free_unused_buffers(G_MAIN); GPU_exit(); } |