From 62ca9bcd0a7ff6fe52e359521369fc8b063d082a Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 6 Feb 2020 13:05:45 +0100 Subject: Cleanup: refactor default materials and shader nodes --- source/blender/gpu/intern/gpu_codegen.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'source/blender/gpu/intern/gpu_codegen.c') 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); -- cgit v1.2.3