add debug markers for easier gl debugging
This commit is contained in:
@@ -6,13 +6,18 @@
|
||||
namespace llmr {
|
||||
namespace util {
|
||||
|
||||
template<typename... Args>
|
||||
template<size_t max, typename... Args>
|
||||
inline std::string sprintf(const char *msg, Args... args) {
|
||||
char res[1024];
|
||||
char res[max];
|
||||
int len = snprintf(res, sizeof(res), msg, args...);
|
||||
return std::string(res, len);
|
||||
}
|
||||
|
||||
template<size_t max, typename... Args>
|
||||
inline std::string sprintf(const std::string &msg, Args... args) {
|
||||
return sprintf<max>(msg.c_str(), args...);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user