mirror of
https://github.com/Cpt-Adok/SNAKE.git
synced 2026-01-25 09:34:06 +00:00
test lwjgl
This commit is contained in:
2
Makefile
2
Makefile
@@ -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
BIN
src/Main.class
Normal file
Binary file not shown.
@@ -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
5
src/graphics/EBO.java
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
package graphics;
|
||||||
|
|
||||||
|
public class EBO {
|
||||||
|
|
||||||
|
}
|
||||||
5
src/graphics/VAO.java
Normal file
5
src/graphics/VAO.java
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
package graphics;
|
||||||
|
|
||||||
|
public class VAO {
|
||||||
|
|
||||||
|
}
|
||||||
5
src/graphics/VBO.java
Normal file
5
src/graphics/VBO.java
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
package graphics;
|
||||||
|
|
||||||
|
public class VBO {
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user