Make getFunctionAddress public

This commit is contained in:
Michael Pfaff 2022-09-03 14:31:37 -04:00
parent 58e900386a
commit 632dac735a
Signed by: michael
GPG Key ID: CF402C4A012AA9D4
1 changed files with 3 additions and 3 deletions

View File

@ -174,7 +174,7 @@ public final class GLContext {
* Helper method to get a pointer to a named function in the OpenGL library * Helper method to get a pointer to a named function in the OpenGL library
* with a name dependent on the current platform * with a name dependent on the current platform
*/ */
static long getPlatformSpecificFunctionAddress(String function_prefix, String[] os_prefixes, String[] os_function_prefixes, String function) { public static long getPlatformSpecificFunctionAddress(String function_prefix, String[] os_prefixes, String[] os_function_prefixes, String function) {
String os_name = System.getProperty("os.name"); String os_name = System.getProperty("os.name");
for ( int i = 0; i < os_prefixes.length; i++ ) for ( int i = 0; i < os_prefixes.length; i++ )
if ( os_name.startsWith(os_prefixes[i]) ) { if ( os_name.startsWith(os_prefixes[i]) ) {
@ -192,7 +192,7 @@ public final class GLContext {
* *
* @return the function pointer address * @return the function pointer address
*/ */
static long getFunctionAddress(String[] aliases) { public static long getFunctionAddress(String[] aliases) {
for ( String alias : aliases ) { for ( String alias : aliases ) {
long address = getFunctionAddress(alias); long address = getFunctionAddress(alias);
if ( address != 0 ) if ( address != 0 )
@ -202,7 +202,7 @@ public final class GLContext {
} }
/** Helper method to get a pointer to a named function in the OpenGL library. */ /** Helper method to get a pointer to a named function in the OpenGL library. */
static long getFunctionAddress(String name) { public static long getFunctionAddress(String name) {
ByteBuffer buffer = MemoryUtil.encodeASCII(name); ByteBuffer buffer = MemoryUtil.encodeASCII(name);
return ngetFunctionAddress(MemoryUtil.getAddress(buffer)); return ngetFunctionAddress(MemoryUtil.getAddress(buffer));
} }