Added HelloWorldNoLoop.java
This commit is contained in:
1 parent
9d0901e8d0
commit
535d81cfc2
2 files changed
+13
No files matched your search
@@ -15,6 +15,7 @@ public class HelloWorld {
|
||||
|
||||
// The window handle
|
||||
private long window;
|
||||
protected boolean noLoop = false;
|
||||
|
||||
public void run() {
|
||||
System.out.println("Hello LWJGL " + Version.getVersion() + "!");
|
||||
@@ -107,6 +108,7 @@ public class HelloWorld {
|
||||
|
||||
// Run the rendering loop until the user has attempted to close
|
||||
// the window or has pressed the ESCAPE key.
|
||||
if (noLoop) return;
|
||||
while ( !glfwWindowShouldClose(window) ) {
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // clear the framebuffer
|
||||
|
||||
|
||||
Reference in new issue
Block a user