test lwjgl

This commit is contained in:
Loïc GUEZO
2024-03-24 21:23:31 +01:00
parent 1e37f6c737
commit e457dec6df
6 changed files with 32 additions and 2 deletions

View File

@@ -0,0 +1,2 @@
all:
javac -classpath "lib/lwjgl/*:src" ./src/Main.java; java -XstartOnFirstThread -classpath "lib/lwjgl/*:src" Main

BIN
src/Main.class Normal file

Binary file not shown.

View File

@@ -18,7 +18,20 @@ import static org.lwjgl.system.MemoryUtil.*;
public class Main { public class Main {
public static void main(String[] args) { public static void main(String[] args) {
if(!GLFW.glfwInit()) {
System.err.println("initialization error");
System.exit(1);
}
long window = GLFW.glfwCreateWindow(800, 600, "test fenetre", MemoryUtil.NULL, MemoryUtil.NULL);
GLFW.glfwMakeContextCurrent(window);
GL.createCapabilities();
while (!GLFW.glfwWindowShouldClose(window)) {
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
GLFW.glfwSwapBuffers(window);
GLFW.glfwPollEvents();
}
} }
} }

5
src/graphics/EBO.java Normal file
View File

@@ -0,0 +1,5 @@
package graphics;
public class EBO {
}

5
src/graphics/VAO.java Normal file
View File

@@ -0,0 +1,5 @@
package graphics;
public class VAO {
}

5
src/graphics/VBO.java Normal file
View File

@@ -0,0 +1,5 @@
package graphics;
public class VBO {
}