diff options
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_view.c | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index bf92fcfff33..fbf2bd33638 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -3021,7 +3021,7 @@ static void view3d_draw_objects( } if ((v3d->flag2 & V3D_RENDER_SHADOW) == 0) { - GPU_free_images_old(); + GPU_free_images_old(bmain); } } @@ -3206,7 +3206,7 @@ void ED_view3d_draw_offscreen( if ((v3d->flag2 & V3D_RENDER_SHADOW) == 0) { /* free images which can have changed on frame-change * warning! can be slow so only free animated images - campbell */ - GPU_free_images_anim(); + GPU_free_images_anim(bmain); } /* setup view matrices before fx or unbinding the offscreen buffers will cause issues */ @@ -3260,7 +3260,7 @@ void ED_view3d_draw_offscreen( } /* freeing the images again here could be done after the operator runs, leaving for now */ - GPU_free_images_anim(); + GPU_free_images_anim(bmain); } /* restore size */ diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 608580c0a08..0f09d7fefa2 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -1319,12 +1319,13 @@ void VIEW3D_OT_localview(wmOperatorType *ot) static ListBase queue_back; static void game_engine_save_state(bContext *C, wmWindow *win) { + Main *bmain = CTX_data_main(C); Object *obact = CTX_data_active_object(C); glPushAttrib(GL_ALL_ATTRIB_BITS); if (obact && obact->mode & OB_MODE_TEXTURE_PAINT) - GPU_paint_set_mipmap(1); + GPU_paint_set_mipmap(bmain, 1); queue_back = win->queue; @@ -1333,10 +1334,11 @@ static void game_engine_save_state(bContext *C, wmWindow *win) static void game_engine_restore_state(bContext *C, wmWindow *win) { + Main *bmain = CTX_data_main(C); Object *obact = CTX_data_active_object(C); if (obact && obact->mode & OB_MODE_TEXTURE_PAINT) - GPU_paint_set_mipmap(0); + GPU_paint_set_mipmap(bmain, 0); /* check because closing win can set to NULL */ if (win) { @@ -1358,7 +1360,7 @@ static void game_set_commmandline_options(GameData *gm) if ((syshandle = SYS_GetSystem())) { /* User defined settings */ test = (U.gameflags & USER_DISABLE_MIPMAP); - GPU_set_mipmap(!test); + GPU_set_mipmap(G_MAIN, !test); SYS_WriteCommandLineInt(syshandle, "nomipmap", test); /* File specific settings: */ |