projects
/
demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed the OpenGL part and the GLSL shaders to use UBO and
[demo]
/
src
/
shader.cc
diff --git
a/src/shader.cc
b/src/shader.cc
index
39fa0de
..
b39401f
100644
(file)
--- a/
src/shader.cc
+++ b/
src/shader.cc
@@
-25,7
+25,6
@@
bool Shader::load(const char *fname, SType type)
if(!(fp = fopen(fname, "rb"))) {
fprintf(stderr, "Failed to open shader: %s\n", fname);
if(!(fp = fopen(fname, "rb"))) {
fprintf(stderr, "Failed to open shader: %s\n", fname);
-
return false;
}
fseek(fp, 0, SEEK_END);
return false;
}
fseek(fp, 0, SEEK_END);
@@
-44,8
+43,7
@@
bool Shader::load(const char *fname, SType type)
buf[fsz] = '\0';
fclose(fp);
buf[fsz] = '\0';
fclose(fp);
- create(buf, fsz, fname);
- return true;
+ return create(buf, fsz, fname);
}
SType Shader::get_type()
}
SType Shader::get_type()