mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-01-12 11:50:06 +01:00
48 lines
939 B
Java
48 lines
939 B
Java
/*
|
|
* Created on 18-03-2003
|
|
*
|
|
* To change this generated comment go to
|
|
* Window>Preferences>Java>Code Generation>Code Template
|
|
*/
|
|
package org.lwjgl.test;
|
|
|
|
import org.lwjgl.*;
|
|
import org.lwjgl.opengl.GL;
|
|
|
|
/**
|
|
* @author Brian
|
|
*/
|
|
public class WindowCreationTest {
|
|
|
|
public static void main(String[] args) {
|
|
GL gl = null;
|
|
|
|
DisplayMode[] modes = Display.getAvailableDisplayModes();
|
|
System.out.println("Found " + modes.length + " display modes");
|
|
|
|
try {
|
|
gl = new GL("WindowCreationTest", 50, 50, 320, 240, 16, 0, 0, 0);
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
|
|
try {
|
|
gl.create();
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
|
|
System.out.println("Display created");
|
|
|
|
while(!gl.isCloseRequested()) {
|
|
gl.tick();
|
|
try {
|
|
Thread.sleep(100);
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
gl.destroy();
|
|
}
|
|
} |