mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-08 07:54:05 +00:00
Those examples are not going anywhere
This commit is contained in:
parent
1e69c2ec92
commit
f872c3b2da
26 changed files with 5251 additions and 0 deletions
44
src/java/org/lwjgl/test/WindowCreationTest.java
Normal file
44
src/java/org/lwjgl/test/WindowCreationTest.java
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* 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.Window;
|
||||
|
||||
/**
|
||||
* @author Brian
|
||||
*/
|
||||
public class WindowCreationTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
DisplayMode[] modes = Display.getAvailableDisplayModes();
|
||||
System.out.println("Found " + modes.length + " display modes");
|
||||
|
||||
|
||||
try {
|
||||
Window.create("WindowCreationTest", 50, 50, 320, 240, 16, 0, 0, 0);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
System.out.println(Window.getHeight() + ", " + Window.getWidth() + ", " + Window.getTitle());
|
||||
|
||||
|
||||
System.out.println("Display created");
|
||||
|
||||
while(!Window.isCloseRequested()) {
|
||||
Window.update();
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
Window.destroy();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue