@Override public boolean initialize() { System.out.println("OS " + System.getProperty("os.name")); System.out.println("JAVA " + System.getProperty("java.version")); System.out.println("LWJGL " + Version.getVersion()); System.out.println("GLFW " + GLFW.glfwGetVersionString()); System.out.println("JOML 1.9.2"); // Setup an error callback. The default implementation // will print the error message in System.err. GLFWErrorCallback.createPrint(System.err).set(); // Initialize GLFW. Most GLFW functions will not work before doing this. if (!GLFW.glfwInit()) { throw new IllegalStateException("Unable to initialize GLFW"); } return true; }
/** * <p> * Initialize the engine, this must be the first interaction your game has with the engine. * </p> */ public static void initialize() { if(!initialized) { LoggerInternal.log("Initializing"); LoggerInternal.log("Engine version: " + EngineInfo.VERSION_STRING); LoggerInternal.log("LWJGL Version: " + Version.getVersion()); // Initialize various subsystems GLFW.create(); DisplayController.create(); WindowInternal.create(); RenderingEngine.create(); KeyboardController.create(); MouseController.create(); JoystickController.create(); initialized = true; } }
public void run(){ System.out.println("LWGJL version " + Version.getVersion()); try { init(); loop(); // release window and key callback w.destroyWindow(); //keyCallback.release(); w.releaseCallbacks(); } finally { // terminate glfw glfwTerminate(); // release error callback //errorCallback.release(); w.releaseErrorCallback(); AudioEngine.destroyAudioEngine(); } }
public void run() { System.out.println("Hello LWJGL " + Version.getVersion() + "!"); try { init(); loop(); // Release window and window callbacks glfwFreeCallbacks(window); glfwDestroyWindow(window); } finally { // Terminate GLFW and release the GLFWerrorfun glfwTerminate(); glfwSetErrorCallback(null).free(); } }
public static void initializeGLFW() { if (initGLFW) { return; } else { initGLFW = true; } System.out.println("OS " + System.getProperty("os.name")); System.out.println("JAVA " + System.getProperty("java.version")); System.out.println("LWJGL " + Version.getVersion()); System.out.println("GLFW " + GLFW.glfwGetVersionString()); System.out.println("JOML 1.9.2"); // Setup an error callback. The default implementation // will print the error message in System.err. GLFWErrorCallback.createPrint(System.err).set(); // Initialize GLFW. Most GLFW functions will not work before doing this. if (!GLFW.glfwInit()) { throw new IllegalStateException("Unable to initialize GLFW"); } }
public static void main(String[] args) { System.out.println("Hello LWJGL " + Version.getVersion() + "!"); init(); loop(); destroy(); }