Removed obsolete LWJGL_SANITY_CHECK and extgl_error

This commit is contained in:
Elias Naur 2004-07-03 14:59:15 +00:00
parent 05afc24027
commit 1c5f7aad3e
2 changed files with 1 additions and 14 deletions

View File

@ -85,7 +85,6 @@ aglResetLibraryPROC aglResetLibrary = NULL;
aglSurfaceTexturePROC aglSurfaceTexture = NULL; aglSurfaceTexturePROC aglSurfaceTexture = NULL;
#endif #endif
static bool extgl_error = false;
struct ExtensionTypes extgl_Extensions; struct ExtensionTypes extgl_Extensions;
@ -118,7 +117,6 @@ void *extgl_GetProcAddress(const char *name)
if (t == NULL) if (t == NULL)
{ {
printfDebug("Could not locate symbol %s\n", name); printfDebug("Could not locate symbol %s\n", name);
extgl_error = true;
} }
} }
return t; return t;
@ -132,7 +130,6 @@ void *extgl_GetProcAddress(const char *name)
if (t == NULL) if (t == NULL)
{ {
printfDebug("Could not locate symbol %s\n", name); printfDebug("Could not locate symbol %s\n", name);
extgl_error = true;
} }
} }
return t; return t;
@ -145,7 +142,6 @@ void *extgl_GetProcAddress(const char *name)
func_pointer = CFBundleGetFunctionPointerForName(agl_bundle_ref, str); func_pointer = CFBundleGetFunctionPointerForName(agl_bundle_ref, str);
if (func_pointer == NULL) { if (func_pointer == NULL) {
printfDebug("Could not locate symbol %s\n", name); printfDebug("Could not locate symbol %s\n", name);
extgl_error = true;
} }
} }
CFRelease(str); CFRelease(str);
@ -243,7 +239,6 @@ bool extgl_QueryExtension(JNIEnv *env, jobject ext_set, const GLubyte*extensions
if (extensions == NULL) { if (extensions == NULL) {
printfDebug("NULL extension string\n"); printfDebug("NULL extension string\n");
extgl_error = true;
return false; return false;
} }
@ -316,7 +311,7 @@ bool extgl_InitAGL(JNIEnv *env)
aglErrorString = (aglErrorStringPROC)extgl_GetProcAddress("aglErrorString"); aglErrorString = (aglErrorStringPROC)extgl_GetProcAddress("aglErrorString");
aglResetLibrary = (aglResetLibraryPROC)extgl_GetProcAddress("aglResetLibrary"); aglResetLibrary = (aglResetLibraryPROC)extgl_GetProcAddress("aglResetLibrary");
aglSurfaceTexture = (aglSurfaceTexturePROC)extgl_GetProcAddress("aglSurfaceTexture"); aglSurfaceTexture = (aglSurfaceTexturePROC)extgl_GetProcAddress("aglSurfaceTexture");
return !extgl_error; return !extgl_error; // Split out AGL into extgl_agl.cpp like wgl and glx and replace with InitializeFunctions
} }
#endif #endif
@ -533,7 +528,6 @@ extern void extgl_InitOpenGL1_5(JNIEnv *env, jobject ext_set);
/* extgl_Init the extensions and load all the functions */ /* extgl_Init the extensions and load all the functions */
bool extgl_Initialize(JNIEnv *env, jobject ext_set) bool extgl_Initialize(JNIEnv *env, jobject ext_set)
{ {
extgl_error = false;
bool result = extgl_InitOpenGL1_1(env); bool result = extgl_InitOpenGL1_1(env);
if (!result) if (!result)
return false; return false;

View File

@ -538,7 +538,6 @@ struct ExtensionTypes
}; };
extern struct ExtensionTypes extgl_Extensions; extern struct ExtensionTypes extgl_Extensions;
//extern bool extgl_error;
typedef GLenum (APIENTRY * glGetErrorPROC) (void); typedef GLenum (APIENTRY * glGetErrorPROC) (void);
typedef const GLubyte * (APIENTRY * glGetStringPROC) (GLenum name); typedef const GLubyte * (APIENTRY * glGetStringPROC) (GLenum name);
@ -557,12 +556,6 @@ extern bool extgl_InitializeClass(JNIEnv *env, jclass clazz, jobject ext_set, co
extern bool extgl_InitializeFunctions(int num_functions, ExtFunction *functions); extern bool extgl_InitializeFunctions(int num_functions, ExtFunction *functions);
extern bool extgl_QueryExtension(JNIEnv *env, jobject ext_set, const GLubyte*extensions, const char *name); extern bool extgl_QueryExtension(JNIEnv *env, jobject ext_set, const GLubyte*extensions, const char *name);
#define EXTGL_SANITY_CHECK(e,x) if (extgl_error) { \
extgl_Extensions.x = false; \
printf("NOTICE: %s disabled because of missing driver symbols\n", #x); \
extgl_error = false; \
}
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif