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/gpu/intern/gpu_material.c
parentf33cb522dd5793c685dcd681f7c7e13ff60f920a (diff)
Cleanup: Nuke most of G.main from GPU code.
Diffstat (limited to 'source/blender/gpu/intern/gpu_material.c')
-rw-r--r--source/blender/gpu/intern/gpu_material.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 22755375061..9db9ed1f5e7 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -2216,22 +2216,22 @@ GPUMaterial *GPU_material_from_blender(Scene *scene, Material *ma, bool use_open
return mat;
}
-void GPU_materials_free(void)
+void GPU_materials_free(Main *bmain)
{
Object *ob;
Material *ma;
World *wo;
extern Material defmaterial;
- for (ma = G.main->mat.first; ma; ma = ma->id.next)
+ for (ma = bmain->mat.first; ma; ma = ma->id.next)
GPU_material_free(&ma->gpumaterial);
- for (wo = G.main->world.first; wo; wo = wo->id.next)
+ for (wo = bmain->world.first; wo; wo = wo->id.next)
GPU_material_free(&wo->gpumaterial);
GPU_material_free(&defmaterial.gpumaterial);
- for (ob = G.main->object.first; ob; ob = ob->id.next)
+ for (ob = bmain->object.first; ob; ob = ob->id.next)
GPU_lamp_free(ob);
}