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:
Diffstat (limited to 'source/blender/gpu/intern/gpu_codegen.c')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 7182bbc38e2..d623697921c 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -241,7 +241,12 @@ GPUFunction *GPU_lookup_function(const char *name)
return (GPUFunction*)BLI_ghash_lookup(FUNCTION_HASH, (void *)name);
}
-void GPU_extensions_exit(void)
+void GPU_codegen_init(void)
+{
+ GPU_code_generate_glsl_lib();
+}
+
+void GPU_codegen_exit(void)
{
extern Material defmaterial; // render module abuse...
@@ -253,8 +258,11 @@ void GPU_extensions_exit(void)
FUNCTION_HASH = NULL;
}
- if(glsl_material_library)
+ if(glsl_material_library) {
MEM_freeN(glsl_material_library);
+ glsl_material_library = NULL;
+ }
+
/*if(FUNCTION_PROTOTYPES) {
MEM_freeN(FUNCTION_PROTOTYPES);
FUNCTION_PROTOTYPES = NULL;