During development it's sometimes necessary to disable parts of a shader,
which causes variables to disappear.
#include <msp/core/maputils.h>
+#include <msp/debug/demangle.h>
#include <msp/gl/extensions/arb_direct_state_access.h>
+#include <msp/io/print.h>
#include "buffer.h"
#include "color.h"
#include "error.h"
else if(name[name.size()-1]==']')
throw invalid_argument("ProgramData::uniform");
}
- catch(...)
+ catch(const exception &e)
{
delete uni;
+#ifdef DEBUG
+ IO::print(IO::cerr, "Error while setting uniform %s: %s: %s\n", name, Debug::demangle(typeid(e).name()), e.what());
+ return;
+#else
throw;
+#endif
}
int i = find_uniform_index(name);