Sha256: 106db8d26a6abf24d1da2efe0beea10d0e23c228e3ff599a624800b65f80d317
Contents?: true
Size: 1021 Bytes
Versions: 16
Compression:
Stored size: 1021 Bytes
Contents
#include "opengl.h" #include "rays/exception.h" namespace Rays { GLenum OpenGL_get_error () { return glGetError(); } static String get_error_name (GLenum error) { switch (error) { 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_OUT_OF_MEMORY: return "GL_OUT_OF_MEMORY"; #ifndef IOS case GL_STACK_OVERFLOW: return "GL_STACK_OVERFLOW"; case GL_STACK_UNDERFLOW: return "GL_STACK_UNDERFLOW"; #endif case 0x506: return "GL_INVALID_FRAMEBUFFER_OPERATION"; case 0x8031: return "GL_TABLE_TOO_LARGE"; default: return "UNKNOWN ERROR"; } } void OpenGL_check_error (const char* file, int line) { GLenum e = OpenGL_get_error(); if (e != GL_NO_ERROR) opengl_error(file, line, "OpenGL error %s", get_error_name(e).c_str()); } }// Rays
Version data entries
16 entries across 16 versions & 1 rubygems