LWJGL Forum

Programming => OpenGL => Topic started by: TechNick6425 on August 09, 2013, 11:09:07

Title: OpenGL Java Binding. Where to begin?
Post by: TechNick6425 on August 09, 2013, 11:09:07
Is there a way to make an OpenGL binding for Java, but does not use external natives?

I don't want something like JOGL or LWJGL, I want something that works with static methods, so you can use the direct C api.

I also want it to not use natives. This will be for my game framework for Java.
Title: Re: OpenGL Java Binding. Where to begin?
Post by: Fool Running on August 09, 2013, 12:23:46
No you can't. OpenGL is native by definition. There is no way around a native-side part to any OpenGL binding.

P.S. You can use LWJGL with static methods by using the static import keyword.
Title: Re: OpenGL Java Binding. Where to begin?
Post by: spasi on August 09, 2013, 16:37:03
You can try the Java Native Runtime (https://github.com/jnr/jnr-ffi) library. It generates both the Java and native stubs at runtime (on x86/x64, not sure about ARM). It's also much faster than JNA.