Bootstrapped OpenGL

This commit is contained in:
2014-02-20 18:10:59 +01:00
parent 3cdf4a3009
commit 8f2e981e91
6 changed files with 184 additions and 10 deletions
+25
View File
@@ -0,0 +1,25 @@
#ifndef _GLERROR_H
#define _GLERROR_H
#define GLFW_INCLUDE_GLU
#include <GLFW\glfw3.h>
#include <iostream>
#include "logging.h"
inline bool _GLERROR(char* info, char* file, char* func, unsigned int line)
{
GLenum error = glGetError();
if (error != GL_NO_ERROR)
{
_LOG(LOG_LEVEL_ERROR, file, func, line, "GL Error: %s %i %s", info, error, gluErrorString(error));
return true;
}
return false;
}
#define GLERROR(function) \
_GLERROR(function, __BASE_FILE__, __func__, __LINE__)
#endif