From: Elias N. <eli...@us...> - 2002-11-19 14:38:03
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv14644 Added Files: checkALerror.h Log Message: Added linux specific checkALerror.h --- NEW FILE: checkALerror.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/checkALerror.h /* checkGLerror.h Author: C. Prince Created: 8 November 2001 Error checking for OpenGL bindings */ #ifndef _CHECKGLERROR_H_INCLUDED_ #define _CHECKGLERROR_H_INCLUDED_ #ifdef _DEBUG #include <jni.h> #include <AL/al.h> #define CHECK_AL_ERROR \ { \ int err = alGetError(); \ if (err != AL_NO_ERROR) { \ jclass cls = env->FindClass("org/lwjgl/openal/OpenALException"); \ env->ThrowNew(cls, (const char*) alGetString(err)); \ env->DeleteLocalRef(cls); \ } \ } /* only available if deviceaddress is specified in method */ #define CHECK_ALC_ERROR \ { \ int err = alcGetError((ALCdevice*) deviceaddress); \ if (err != AL_NO_ERROR) { \ jclass cls = env->FindClass("org/lwjgl/openal/OpenALException"); \ env->ThrowNew(cls, (const char*) alcGetString((ALCdevice*) deviceaddress, err)); \ env->DeleteLocalRef(cls); \ } \ } #else #define CHECK_AL_ERROR #define CHECK_ALC_ERROR #endif /* _DEBUG */ #endif /* _CHECKGLERROR_H_INCLUDED_ */ |