+
+
+
+
+
+
\ No newline at end of file
diff --git a/lab.iml b/lab.iml
new file mode 100644
index 0000000..1c63997
--- /dev/null
+++ b/lab.iml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/libs/jars/lwjgl.jar b/libs/jars/lwjgl.jar
new file mode 100644
index 0000000..0431ddc
Binary files /dev/null and b/libs/jars/lwjgl.jar differ
diff --git a/libs/natives/OpenAL.dll b/libs/natives/OpenAL.dll
new file mode 100644
index 0000000..f29c3ce
Binary files /dev/null and b/libs/natives/OpenAL.dll differ
diff --git a/libs/natives/OpenAL32.dll b/libs/natives/OpenAL32.dll
new file mode 100644
index 0000000..31d639d
Binary files /dev/null and b/libs/natives/OpenAL32.dll differ
diff --git a/libs/natives/glfw.dll b/libs/natives/glfw.dll
new file mode 100644
index 0000000..f8c3dc7
Binary files /dev/null and b/libs/natives/glfw.dll differ
diff --git a/libs/natives/glfw32.dll b/libs/natives/glfw32.dll
new file mode 100644
index 0000000..3291dce
Binary files /dev/null and b/libs/natives/glfw32.dll differ
diff --git a/libs/natives/jemalloc.dll b/libs/natives/jemalloc.dll
new file mode 100644
index 0000000..c71efc1
Binary files /dev/null and b/libs/natives/jemalloc.dll differ
diff --git a/libs/natives/jemalloc32.dll b/libs/natives/jemalloc32.dll
new file mode 100644
index 0000000..6bea0b3
Binary files /dev/null and b/libs/natives/jemalloc32.dll differ
diff --git a/libs/natives/libglfw.dylib b/libs/natives/libglfw.dylib
new file mode 100644
index 0000000..905c1bd
Binary files /dev/null and b/libs/natives/libglfw.dylib differ
diff --git a/libs/natives/libglfw.so b/libs/natives/libglfw.so
new file mode 100644
index 0000000..e97463b
Binary files /dev/null and b/libs/natives/libglfw.so differ
diff --git a/libs/natives/libjemalloc.dylib b/libs/natives/libjemalloc.dylib
new file mode 100644
index 0000000..1d7cc79
Binary files /dev/null and b/libs/natives/libjemalloc.dylib differ
diff --git a/libs/natives/libjemalloc.so b/libs/natives/libjemalloc.so
new file mode 100644
index 0000000..dc95c65
Binary files /dev/null and b/libs/natives/libjemalloc.so differ
diff --git a/libs/natives/liblwjgl.dylib b/libs/natives/liblwjgl.dylib
new file mode 100644
index 0000000..ff88e7d
Binary files /dev/null and b/libs/natives/liblwjgl.dylib differ
diff --git a/libs/natives/liblwjgl.so b/libs/natives/liblwjgl.so
new file mode 100644
index 0000000..e74b914
Binary files /dev/null and b/libs/natives/liblwjgl.so differ
diff --git a/libs/natives/libopenal.dylib b/libs/natives/libopenal.dylib
new file mode 100644
index 0000000..7f0047b
Binary files /dev/null and b/libs/natives/libopenal.dylib differ
diff --git a/libs/natives/libopenal.so b/libs/natives/libopenal.so
new file mode 100644
index 0000000..0c8e888
Binary files /dev/null and b/libs/natives/libopenal.so differ
diff --git a/libs/natives/lwjgl.dll b/libs/natives/lwjgl.dll
new file mode 100644
index 0000000..f75e81e
Binary files /dev/null and b/libs/natives/lwjgl.dll differ
diff --git a/libs/natives/lwjgl32.dll b/libs/natives/lwjgl32.dll
new file mode 100644
index 0000000..daa0541
Binary files /dev/null and b/libs/natives/lwjgl32.dll differ
diff --git a/out/production/lab/Main.class b/out/production/lab/Main.class
new file mode 100644
index 0000000..e0890fc
Binary files /dev/null and b/out/production/lab/Main.class differ
diff --git a/src/Main.java b/src/Main.java
new file mode 100644
index 0000000..3011cae
--- /dev/null
+++ b/src/Main.java
@@ -0,0 +1,107 @@
+import org.lwjgl.*;
+import org.lwjgl.glfw.*;
+import org.lwjgl.opengl.*;
+
+import java.io.Console;
+
+import static org.lwjgl.glfw.Callbacks.*;
+import static org.lwjgl.glfw.GLFW.*;
+import static org.lwjgl.opengl.GL11.*;
+import static org.lwjgl.system.MemoryUtil.*;
+
+public class Main {
+
+ // The window handle
+ private long window;
+
+ public void run() {
+ System.out.println("Hello LWJGL " + Version.getVersion() + "!");
+
+ try {
+ init();
+ loop();
+ // Free the window callbacks and destroy the window
+ glfwFreeCallbacks(window);
+ glfwDestroyWindow(window);
+ } finally {
+ // Terminate GLFW and free the error callback
+ glfwTerminate();
+ glfwSetErrorCallback(null).free();
+ }
+ }
+
+ private void init() {
+ // 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 ( !glfwInit() )
+ throw new IllegalStateException("Unable to initialize GLFW");
+
+ // Configure our window
+ glfwDefaultWindowHints(); // optional, the current window hints are already the default
+ glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE); // the window will stay hidden after creation
+ glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); // the window will be resizable
+
+ int WIDTH = 300;
+ int HEIGHT = 300;
+
+ // Create the window
+ window = glfwCreateWindow(WIDTH, HEIGHT, "Hello World!", NULL, NULL);
+ if ( window == NULL )
+ throw new RuntimeException("Failed to create the GLFW window");
+
+ // Setup a key callback. It will be called every time a key is pressed, repeated or released.
+ glfwSetKeyCallback(window, (window, key, scancode, action, mods) -> {
+ if ( key == GLFW_KEY_ESCAPE && action == GLFW_RELEASE )
+ glfwSetWindowShouldClose(window, true); // We will detect this in our rendering loop
+ });
+
+ // Get the resolution of the primary monitor
+ GLFWVidMode vidmode = glfwGetVideoMode(glfwGetPrimaryMonitor());
+ // Center our window
+ glfwSetWindowPos(
+ window,
+ (vidmode.width() - WIDTH) / 2,
+ (vidmode.height() - HEIGHT) / 2
+ );
+
+ // Make the OpenGL context current
+ glfwMakeContextCurrent(window);
+ // Enable v-sync
+ glfwSwapInterval(1);
+
+ // Make the window visible
+ glfwShowWindow(window);
+ }
+
+ private void loop() {
+ // This line is critical for LWJGL's interoperation with GLFW's
+ // OpenGL context, or any context that is managed externally.
+ // LWJGL detects the context that is current in the current thread,
+ // creates the GLCapabilities instance and makes the OpenGL
+ // bindings available for use.
+ GL.createCapabilities();
+
+ // Set the clear color
+ glClearColor(1.0f, 0.0f, 0.0f, 0.0f);
+
+ // Run the rendering loop until the user has attempted to close
+ // the window or has pressed the ESCAPE key.
+ while ( !glfwWindowShouldClose(window) ) {
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // clear the framebuffer
+
+ glfwSwapBuffers(window); // swap the color buffers
+
+ // Poll for window events. The key callback above will only be
+ // invoked during this call.
+ glfwPollEvents();
+ }
+ }
+
+ public static void main(String[] args) {
+ new Main().run();
+ }
+
+}