I’m trying to translate a X11/OpenGL demo into Java and I’m not sure how to use the constants OpenGL defines. The only method I can think of is digging into the OpenGL headers and copying the constants to my program but is that the proper way to do it? I imagine that there is no guarantee that those constants will be the same in a different environment.
Share
I can’t use this method to do what I want because I’m actually trying to get a preprocessor definition but it does answer my question.
You use the NativeLibrary class like so.
NativeLibrary library = NativeLibrary.getInstance(“LIBRARY_NAME”);
library.getGlobalVariableAddress(“VARIABLE_NAME”);
Edit: I feel like I should admit that it does not make sense to access a preprocessor definition, I ended up just copying the definitions into my program.