Package panamagl.platform.windows
Class GLUT_windows
java.lang.Object
panamagl.platform.windows.GLUT_windows
Load and initialize freeglut lazily, as it is optional on Windows : the WGL context and the
OpenGL and GLU functions do not need it.
init() must be invoked before any GLUT function of the binding (gl_h.glut*),
which it does for :
- the GLUT methods of
GL_windows, whose generated code invokes it first, GLUTContext_windows.
init() first :
- the binding resolves the address of a function at its first invocation, and fails for good if freeglut is not loaded yet,
- freeglut exits the process if a function is invoked before glutInit.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidinit()Load freeglut withNativeLibLoader_windows.loadGLUT()and invoke glutInit, once per process.static booleanTrue onceinit()has loaded and initialized freeglut.
-
Field Details
-
initialized
protected static volatile boolean initialized
-
-
Constructor Details
-
GLUT_windows
public GLUT_windows()
-
-
Method Details
-
init
public static void init()Load freeglut withNativeLibLoader_windows.loadGLUT()and invoke glutInit, once per process. Following invocations return immediately.- Throws:
UnsatisfiedLinkError- if freeglut is neither in thejava.library.pathnor embedded in the classpath bypanama-gl-bindings-windows-freeglut.
-
isInitialized
public static boolean isInitialized()True onceinit()has loaded and initialized freeglut.
-