[core] check GL errors in loop

As recommended in https://www.opengl.org/wiki/GLAPI/glGetError

char* -> std::string
This commit is contained in:
Mike Morris
2016-08-24 15:47:21 -04:00
parent 658354ced1
commit 6fe621bbef
2 changed files with 60 additions and 25 deletions

View File

@@ -59,9 +59,8 @@ namespace gl {
void mbx_trapExtension(const char *name, GLuint array);
#endif
struct Error : ::std::runtime_error {
Error(GLenum err, const std::string &msg) : ::std::runtime_error(msg), code(err) {};
const GLenum code;
struct Error : std::runtime_error {
using std::runtime_error::runtime_error;
};
void checkError(const char *cmd, const char *file, int line);