mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-06 15:04:41 +00:00
Fixed NV_vertex_array_range platform specific symbols. Fixed generics warning.
This commit is contained in:
parent
0f97eef81b
commit
94a8c16bb9
7 changed files with 62 additions and 12 deletions
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue