diff --git a/src/java/org/lwjgl/opencl/CL.java b/src/java/org/lwjgl/opencl/CL.java index 0876a3d9..81070f8d 100644 --- a/src/java/org/lwjgl/opencl/CL.java +++ b/src/java/org/lwjgl/opencl/CL.java @@ -147,7 +147,9 @@ public final class CL { /** Helper method to get a pointer to a named function in the OpenCL library. */ static long getFunctionAddress(String name) { ByteBuffer buffer = MemoryUtil.encodeASCII(name); - return ngetFunctionAddress(MemoryUtil.getAddress(buffer)); + long address = ngetFunctionAddress(MemoryUtil.getAddress(buffer)); + if (address == null) LWJGLUtil.logger().log(() -> "Could not locate symbol " + name); + return address; } private static native long ngetFunctionAddress(long name); diff --git a/src/java/org/lwjgl/opengl/GLContext.java b/src/java/org/lwjgl/opengl/GLContext.java index cb6c9210..03b45cca 100644 --- a/src/java/org/lwjgl/opengl/GLContext.java +++ b/src/java/org/lwjgl/opengl/GLContext.java @@ -204,7 +204,9 @@ public final class GLContext { /** Helper method to get a pointer to a named function in the OpenGL library. */ public static long getFunctionAddress(String name) { ByteBuffer buffer = MemoryUtil.encodeASCII(name); - return ngetFunctionAddress(MemoryUtil.getAddress(buffer)); + long address = ngetFunctionAddress(MemoryUtil.getAddress(buffer)); + if (address == null) LWJGLUtil.logger().log(() -> "Could not locate symbol " + name); + return address; } private static native long ngetFunctionAddress(long name); diff --git a/src/native/common/common_tools.c b/src/native/common/common_tools.c index 13731e3d..1c3a929c 100644 --- a/src/native/common/common_tools.c +++ b/src/native/common/common_tools.c @@ -270,8 +270,10 @@ bool ext_InitializeFunctions(ExtGetProcAddressPROC gpa, int num_functions, ExtFu ExtFunction *function = functions + i; if (function->ext_function_name != NULL) { void *ext_func_pointer = gpa(function->ext_function_name); - if (ext_func_pointer == NULL) + if (ext_func_pointer == NULL) { + printfDebug("Could not locate symbol %s\n", function->ext_function_name); return false; + } ext_function_pointer_pointer = function->ext_function_pointer; *ext_function_pointer_pointer = ext_func_pointer; } @@ -308,6 +310,8 @@ void ext_InitializeClass(JNIEnv *env, jclass clazz, ExtGetProcAddressPROC gpa, i if (function->ext_function_name != NULL) { ext_func_pointer = gpa(function->ext_function_name); if (ext_func_pointer == NULL) { + printfDebug("Could not locate symbol %s\n", function->ext_function_name); + if ( function->optional ) continue; diff --git a/src/native/common/extal.c b/src/native/common/extal.c index 502e0707..2dc88a3e 100644 --- a/src/native/common/extal.c +++ b/src/native/common/extal.c @@ -65,9 +65,6 @@ void* extal_GetProcAddress(const char* function) { /* p = alGetProcAddress((const ALubyte*)function); if (p == NULL) {*/ p = extal_NativeGetFunctionPointer(function); - if (p == NULL) { - printfDebug("Could not locate symbol %s\n", function); - } // } return p; } diff --git a/src/native/linux/opengl/extgl_glx.c b/src/native/linux/opengl/extgl_glx.c index 750ae45f..db33cd25 100644 --- a/src/native/linux/opengl/extgl_glx.c +++ b/src/native/linux/opengl/extgl_glx.c @@ -252,9 +252,6 @@ void *extgl_GetProcAddress(const char *name) { void *t = (void*)lwjgl_glXGetProcAddressARB((const GLubyte*)name); if (t == NULL) { t = dlsym(lib_gl_handle, name); - if (t == NULL) { - printfDebug("Could not locate symbol %s\n", name); - } } return t; } diff --git a/src/native/linux/opengles/extgl_glx.c b/src/native/linux/opengles/extgl_glx.c index 32b2ff7f..14936b17 100644 --- a/src/native/linux/opengles/extgl_glx.c +++ b/src/native/linux/opengles/extgl_glx.c @@ -58,12 +58,10 @@ void *extgl_GetProcAddress(const char *name) { if ( t == NULL ) { t = dlsym(lib_gl_handle, name); - if ( t == NULL ) - printfDebug("Could not locate symbol %s\n", name); } //if ( t != NULL ) //printfDebug("Located symbol %s\n", name); return t; -} \ No newline at end of file +} diff --git a/src/native/macosx/context.m b/src/native/macosx/context.m index 34817774..af0291e8 100644 --- a/src/native/macosx/context.m +++ b/src/native/macosx/context.m @@ -46,8 +46,6 @@ void *extgl_GetProcAddress(const char *name) { CFStringRef cf_name = CFStringCreateWithCString(NULL, name, kCFStringEncodingUTF8); void *address = CFBundleGetFunctionPointerForName(opengl_bundle, cf_name); CFRelease(cf_name); - if (address == NULL) - printfDebug("Could not locate symbol %s\n", name); return address; } diff --git a/src/native/windows/opengl/extgl_wgl.c b/src/native/windows/opengl/extgl_wgl.c index 5111481f..44fa551b 100644 --- a/src/native/windows/opengl/extgl_wgl.c +++ b/src/native/windows/opengl/extgl_wgl.c @@ -45,10 +45,6 @@ void *extgl_GetProcAddress(const char *name) { if (t == NULL) { t = GetProcAddress(lib_gl_handle, name); - if (t == NULL) - { - printfDebug("Could not locate symbol %s\n", name); - } } return t; } diff --git a/src/native/windows/opengles/extgl_wgl.c b/src/native/windows/opengles/extgl_wgl.c index d1c57e3b..179b5288 100644 --- a/src/native/windows/opengles/extgl_wgl.c +++ b/src/native/windows/opengles/extgl_wgl.c @@ -44,10 +44,6 @@ void *extgl_GetProcAddress(const char *name) { if (t == NULL) { t = GetProcAddress(lib_gl_handle, name); - if (t == NULL) - { - printfDebug("Could not locate symbol %s\n", name); - } } return t; }