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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2020-02-06 15:05:45 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2020-02-06 15:36:39 +0300
commit62ca9bcd0a7ff6fe52e359521369fc8b063d082a (patch)
tree7aae08f2a67b3ca12e01e524e3759ae226adf936 /source/blender/gpu/intern/gpu_codegen.c
parentdd00e8ecd642cafc6294ec7f0f31c5e0e0fe9870 (diff)
Cleanup: refactor default materials and shader nodes
Diffstat (limited to 'source/blender/gpu/intern/gpu_codegen.c')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index a7dd34a5f96..3f7a5962efc 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -38,6 +38,8 @@
#include "BLI_ghash.h"
#include "BLI_threads.h"
+#include "BKE_material.h"
+
#include "PIL_time.h"
#include "GPU_extensions.h"
@@ -384,11 +386,7 @@ void gpu_codegen_init(void)
void gpu_codegen_exit(void)
{
- extern Material defmaterial; /* render module abuse... */
-
- if (defmaterial.gpumaterial.first) {
- GPU_material_free(&defmaterial.gpumaterial);
- }
+ BKE_material_defaults_free_gpu();
if (FUNCTION_HASH) {
BLI_ghash_free(FUNCTION_HASH, NULL, MEM_freeN);