commit 0de2dafd8e8995c85a479458aee0c2c4413de757
parent 4cf3681df350aa63a3009dd605944ad4421eebca
Author: Brian Swetland <swetland@frotz.net>
Date: Sat, 6 Jul 2013 01:06:51 -0700
common: disable shader source caching for now
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/common/shaders.cc b/common/shaders.cc
@@ -19,6 +19,8 @@
#include "app.h"
#include "util.h"
+#define ENABLE_SHADER_CACHE 0
+
static void dump_compile_error(unsigned id) {
int len;
char *buf;
@@ -130,9 +132,11 @@ static struct source *load_shader_source(const char *fn) {
sprintf(buf, "%s.glsl", fn);
}
+#if ENABLE_SHADER_CACHE
for (src = source_cache; src; src = src->next)
if (!strcmp(buf, src->name))
return src;
+#endif
src = new source;
src->sections = NULL;
@@ -204,8 +208,11 @@ static struct source *load_shader_source(const char *fn) {
#endif
src->name = strdup(buf);
+
+#if ENABLE_SHADER_CACHE
src->next = source_cache;
source_cache = src;
+#endif
return src;
}