2021-01-18 18:25:47 -06:00
|
|
|
#include "Util.h"
|
|
|
|
|
2021-01-19 16:36:10 -06:00
|
|
|
void Util::Die(const char * msg) {
|
|
|
|
std::cerr << msg << std::endl;
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Util::Die(const char * msg, const char * more) {
|
|
|
|
std::cerr << msg << more << std::endl;
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Util::Die(std::string msg) {
|
|
|
|
std::cerr << msg << std::endl;
|
|
|
|
exit(1);
|
2021-01-18 18:25:47 -06:00
|
|
|
}
|
2021-03-04 14:29:48 -06:00
|
|
|
|
|
|
|
std::string Util::ShaderArrayName(const char* arrName, int index, const char* memberName) {
|
|
|
|
std::stringstream ss;
|
|
|
|
ss << arrName << "[" << index << "]." << memberName;
|
|
|
|
return ss.str();
|
|
|
|
}
|