diff --git a/src/native/common/checkGLerror.h b/src/native/common/checkGLerror.h index d016df66..f1cecb1b 100644 --- a/src/native/common/checkGLerror.h +++ b/src/native/common/checkGLerror.h @@ -25,9 +25,19 @@ } \ } +#define CHECK_EXISTS(f) \ + { \ + if (!f) { \ + jclass cls = env->FindClass("org/lwjgl/opengl/OpenGLException"); \ + env->ThrowNew(cls, "This function is not available in this driver."); \ + env->DeleteLocalRef(cls); \ + } \ + } \ + #else #define CHECK_GL_ERROR +#define CHECK_EXISTS(f) #endif /* _DEBUG */