Merge pull request #1378 from lioncash/gl

GLUtil: Change return type from GLuint to GLenum for OpenGL_ReportGLError.
This commit is contained in:
skidau 2014-10-26 13:44:34 +11:00
commit 7c58eb344d
2 changed files with 4 additions and 4 deletions

View File

@ -114,9 +114,9 @@ GLuint OpenGL_CompileProgram(const char* vertexShader, const char* fragmentShade
}
GLuint OpenGL_ReportGLError(const char *function, const char *file, int line)
GLenum OpenGL_ReportGLError(const char *function, const char *file, int line)
{
GLint err = glGetError();
GLenum err = glGetError();
if (err != GL_NO_ERROR)
{
ERROR_LOG(VIDEO, "%s:%d: (%s) OpenGL error 0x%x\n",
@ -127,7 +127,7 @@ GLuint OpenGL_ReportGLError(const char *function, const char *file, int line)
bool OpenGL_ReportFBOError(const char *function, const char *file, int line)
{
unsigned int fbo_status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
GLenum fbo_status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
if (fbo_status != GL_FRAMEBUFFER_COMPLETE)
{
const char *error = "unknown error";

View File

@ -19,7 +19,7 @@ void InitInterface();
GLuint OpenGL_CompileProgram(const char *vertexShader, const char *fragmentShader);
// Error reporting - use the convenient macros.
GLuint OpenGL_ReportGLError(const char *function, const char *file, int line);
GLenum OpenGL_ReportGLError(const char *function, const char *file, int line);
bool OpenGL_ReportFBOError(const char *function, const char *file, int line);
#if defined(_DEBUG) || defined(DEBUGFAST)