# HG changeset patch # User John Tsiombikas # Date 1345423251 -10800 # Node ID 91180ee7b7d943d13f8c6a26b86fba5fac1c4285 # Parent 3a3236a4833ca5bcd830eb1c3c4966b61616dd10 foo diff -r 3a3236a4833c -r 91180ee7b7d9 prototype/sdr/mrt0.p.glsl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/prototype/sdr/mrt0.p.glsl Mon Aug 20 03:40:51 2012 +0300 @@ -0,0 +1,7 @@ +uniform sampler2D tex_dif; + +void main() +{ + vec4 texel = texture2D(tex_dif, gl_TexCoord[0].st); + gl_FragColor = texel; +} diff -r 3a3236a4833c -r 91180ee7b7d9 prototype/src/datapath.cc --- a/prototype/src/datapath.cc Sun Aug 19 23:09:30 2012 +0300 +++ b/prototype/src/datapath.cc Mon Aug 20 03:40:51 2012 +0300 @@ -14,6 +14,10 @@ { static std::string res; + if(!fname) { + return 0; + } + for(auto path : pathlist) { res = path + "/" + std::string(fname); FILE *fp = fopen(res.c_str(), "r"); diff -r 3a3236a4833c -r 91180ee7b7d9 prototype/src/main.cc --- a/prototype/src/main.cc Sun Aug 19 23:09:30 2012 +0300 +++ b/prototype/src/main.cc Mon Aug 20 03:40:51 2012 +0300 @@ -71,6 +71,7 @@ glEnable(GL_MULTISAMPLE); add_data_path("data"); + add_data_path("sdr"); if(!init_renderer()) { return false; diff -r 3a3236a4833c -r 91180ee7b7d9 prototype/src/renderer.cc --- a/prototype/src/renderer.cc Sun Aug 19 23:09:30 2012 +0300 +++ b/prototype/src/renderer.cc Mon Aug 20 03:40:51 2012 +0300 @@ -7,13 +7,13 @@ #include "sdr.h" #include "datapath.h" -#define MRT_COUNT 4 +#define MRT_COUNT (sizeof mrt_sdr_file / sizeof *mrt_sdr_file) static const char *mrt_sdr_file[][2] = { - {0, "mrt0.p.glsl"}, + {0, "mrt0.p.glsl"}/*, {0, "mrt1.p.glsl"}, {0, "mrt2.p.glsl"}, - {0, "mrt3.p.glsl"} + {0, "mrt3.p.glsl"}*/ }; static unsigned int mrt_prog[MRT_COUNT];