]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
make sure r_glsl_permutation and r_cg_permutation variables are NULL
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 25 Feb 2010 16:14:13 +0000 (16:14 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 25 Feb 2010 16:14:13 +0000 (16:14 +0000)
when renderer is started or shuts down

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10005 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index a233953df12ad10d58ef8936ed017843c65e2991..788d53ee1c81b13eaddeba5967e578517ec27049 100644 (file)
@@ -6145,10 +6145,12 @@ void gl_main_start(void)
        //r_texture_fogintensity = NULL;
        memset(&r_bloomstate, 0, sizeof(r_bloomstate));
        memset(&r_waterstate, 0, sizeof(r_waterstate));
+       r_glsl_permutation = NULL;
        memset(r_glsl_permutationhash, 0, sizeof(r_glsl_permutationhash));
        Mem_ExpandableArray_NewArray(&r_glsl_permutationarray, r_main_mempool, sizeof(r_glsl_permutation_t), 256);
        glslshaderstring = NULL;
 #ifdef SUPPORTCG
+       r_cg_permutation = NULL;
        memset(r_cg_permutationhash, 0, sizeof(r_cg_permutationhash));
        Mem_ExpandableArray_NewArray(&r_cg_permutationarray, r_main_mempool, sizeof(r_cg_permutation_t), 256);
        cgshaderstring = NULL;
@@ -6196,6 +6198,14 @@ void gl_main_shutdown(void)
        //r_texture_fogintensity = NULL;
        memset(&r_bloomstate, 0, sizeof(r_bloomstate));
        memset(&r_waterstate, 0, sizeof(r_waterstate));
+       r_glsl_permutation = NULL;
+       memset(r_glsl_permutationhash, 0, sizeof(r_glsl_permutationhash));
+       glslshaderstring = NULL;
+#ifdef SUPPORTCG
+       r_cg_permutation = NULL;
+       memset(r_cg_permutationhash, 0, sizeof(r_cg_permutationhash));
+       cgshaderstring = NULL;
+#endif
        R_GLSL_Restart_f();
 }