23#ifdef JEVOIS_PLATFORM_PRO
24#define EGL_EGLEXT_PROTOTYPES
25#define GL_GLEXT_PROTOTYPES
26#include <EGL/eglplatform.h>
31#include <EGL/eglext.h>
33#include <GLES2/gl2ext.h>
38#include <GLES3/gl3ext.h>
39#include <GLES3/gl31.h>
40#include <GLES3/gl32.h>
64 case GL_INVALID_ENUM:
return "GL_INVALID_ENUM";
65 case GL_INVALID_VALUE:
return "GL_INVALID_VALUE";
66 case GL_INVALID_OPERATION:
return "GL_INVALID_OPERATION";
67 case GL_INVALID_FRAMEBUFFER_OPERATION:
return "GL_INVALID_FRAMEBUFFER_OPERATION";
68 case GL_OUT_OF_MEMORY:
return "GL_OUT_OF_MEMORY";
69 default: std::ostringstream ss; ss <<
"UNKNOWN(0x" << std::hex << err <<
'0';
return ss.str();
77#define GL_CHECK(stmt) do { stmt; GLenum _err = glGetError(); \
78 if (_err != GL_NO_ERROR) LFATAL("Error " << jevois::opengl_error(_err) <<" in: " << #stmt); } while (0)
81#define GL_CHECK_BOOL(stmt) do { int _result = stmt; if (_result == 0) LERROR("Failed: " #stmt); \
82 GLenum _err = glGetError(); \
83 if (_err != GL_NO_ERROR) LFATAL("Error " << jevois::opengl_error(_err) <<" in: " << #stmt); } while (0)
Main namespace for all JeVois classes and functions.
std::string opengl_error(int err)
Function to write OpenGL errors in clear witout requiring GLUT.