mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[client] egl: use glGetError and codes for errors in gl* functions
We used to use DEBUG_EGL_ERROR for gl* functions, which just yields EGL_SUCCESS even when there are errors.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "egldebug.h"
|
||||
#include <GLES3/gl3.h>
|
||||
#include <EGL/egl.h>
|
||||
|
||||
const char * egl_getErrorStr(void)
|
||||
@@ -43,3 +44,17 @@ const char * egl_getErrorStr(void)
|
||||
default : return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
const char * gl_getErrorStr(void)
|
||||
{
|
||||
switch (glGetError())
|
||||
{
|
||||
case GL_NO_ERROR : return "GL_NO_ERROR";
|
||||
case GL_INVALID_ENUM : return "GL_INVALID_ENUM";
|
||||
case GL_INVALID_VALUE : return "GL_INVALID_VALUE";
|
||||
case GL_INVALID_OPERATION : return "GL_INVALID_OPERATION";
|
||||
case GL_INVALID_FRAMEBUFFER_OPERATION: return "GL_INVALID_FRAMEBUFFER_OPERATION";
|
||||
case GL_OUT_OF_MEMORY : return "GL_OUT_OF_MEMORY";
|
||||
default : return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user