Fixed NV_vertex_array_range platform specific symbols. Fixed generics warning.

This commit is contained in:
Elias Naur 2005-02-17 09:44:06 +00:00
parent 0f97eef81b
commit 94a8c16bb9
7 changed files with 62 additions and 12 deletions

View file

@ -82,6 +82,21 @@ public final class GLContext {
current_capabilities.set(capabilities);
}
/**
* Helper method to get a pointer to a named function in the OpenGL library
* with a name dependent on the current platform
*/
static long getPlatformSpecificFunctionAddress(String function_prefix, String[] os_prefixes, String[] os_function_prefixes, String function) {
String os_name = System.getProperty("os.name");
for (int i = 0; i < os_prefixes.length; i++)
if (os_name.startsWith(os_prefixes[i])) {
String platform_function_name = function.replaceFirst(function_prefix, os_function_prefixes[i]);
long address = getFunctionAddress(platform_function_name);
return address;
}
return 0;
}
/**
* Helper method to get a pointer to a named function in the OpenGL library
*/