diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2011-12-17 16:58:20 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2011-12-17 16:58:20 +0400 |
commit | 7d2fbfeb9f59be3d60ce9370d74440d4490014e4 (patch) | |
tree | b65b38ea86ba458d612eac08bc99953dddfb7fb1 | |
parent | 04fbfc2179358400229682978778dc1a3b629e6b (diff) |
move GPU_code_generate_glsl_lib to GPU_extensions_init. This makes more sense as we cleanup the library string in GPU_extensions_exit. Thanks to Mitchel Stokes for reporting and proposing this
-rw-r--r-- | source/blender/gpu/intern/gpu_extensions.c | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index 4c0a3d6c5e4..5f8e165ea80 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -112,6 +112,10 @@ void GPU_extensions_init(void) if (!GLEW_ARB_vertex_shader) GG.glslsupport = 0; if (!GLEW_ARB_fragment_shader) GG.glslsupport = 0; + if(GG.glslsupport){ + GPU_code_generate_glsl_lib(); + } + glGetIntegerv(GL_RED_BITS, &r); glGetIntegerv(GL_GREEN_BITS, &g); glGetIntegerv(GL_BLUE_BITS, &b); diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index 7026323bf97..2695f3d680d 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -176,7 +176,6 @@ void WM_init(bContext *C, int argc, const char **argv) GPU_extensions_init(); GPU_set_mipmap(!(U.gameflags & USER_DISABLE_MIPMAP)); GPU_set_anisotropic(U.anisotropic_filter); - GPU_code_generate_glsl_lib(); UI_init(); } |