From a0ff501947a84b268e099524a06b56a6b900dad2 Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Tue, 3 May 2022 18:25:32 +0200 Subject: move to cc.polyfrost --- .../oneconfig/lwjgl/Lwjgl2FunctionProvider.java | 39 ---------------------- 1 file changed, 39 deletions(-) delete mode 100644 src/main/java/io/polyfrost/oneconfig/lwjgl/Lwjgl2FunctionProvider.java (limited to 'src/main/java/io/polyfrost/oneconfig/lwjgl/Lwjgl2FunctionProvider.java') diff --git a/src/main/java/io/polyfrost/oneconfig/lwjgl/Lwjgl2FunctionProvider.java b/src/main/java/io/polyfrost/oneconfig/lwjgl/Lwjgl2FunctionProvider.java deleted file mode 100644 index 6c77108..0000000 --- a/src/main/java/io/polyfrost/oneconfig/lwjgl/Lwjgl2FunctionProvider.java +++ /dev/null @@ -1,39 +0,0 @@ -package io.polyfrost.oneconfig.lwjgl; - -import org.lwjgl.opengl.GLContext; -import org.lwjgl.system.FunctionProvider; - -import java.lang.reflect.Method; -import java.nio.ByteBuffer; - -/** - * Taken from LWJGLTwoPointFive under The Unlicense - * https://github.com/DJtheRedstoner/LWJGLTwoPointFive/blob/master/LICENSE/ - */ -public class Lwjgl2FunctionProvider implements FunctionProvider { - - private final Method m_getFunctionAddress; - - public Lwjgl2FunctionProvider() { - try { - m_getFunctionAddress = GLContext.class.getDeclaredMethod("getFunctionAddress", String.class); - m_getFunctionAddress.setAccessible(true); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - @Override - public long getFunctionAddress(CharSequence functionName) { - try { - return (long) m_getFunctionAddress.invoke(null, functionName.toString()); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - @Override - public long getFunctionAddress(ByteBuffer byteBuffer) { - throw new UnsupportedOperationException(); - } -} \ No newline at end of file -- cgit