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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-06-25 13:32:48 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-25 13:32:48 +0300
commit8a7f317666caa41aad0428b5ed3f399cdfbbd816 (patch)
tree7e6ba6c6a1ab952cc175d4e08b39aebc2286cb4a /source/blender/editors/space_view3d/view3d_view.c
parentf33cb522dd5793c685dcd681f7c7e13ff60f920a (diff)
Cleanup: Nuke most of G.main from GPU code.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_view.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c8
1 files changed, 5 insertions, 3 deletions
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: */