From b39740daf3e3aa99eb401d708d5d53282639261a Mon Sep 17 00:00:00 2001 From: Caspian Rychlik-Prince Date: Thu, 13 Mar 2003 19:31:10 +0000 Subject: [PATCH] *** empty log message *** --- src/native/common/checkGLerror.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 */