for prev commit

This commit is contained in:
javasabr 2016-12-03 16:58:30 +03:00
parent 544d94aed7
commit 1f9a5cd028
2 changed files with 16 additions and 5 deletions

View File

@ -31,6 +31,7 @@
*/ */
package com.jme3.system.lwjgl; package com.jme3.system.lwjgl;
import com.jme3.system.AppSettings;
import com.jme3.system.JmeContext; import com.jme3.system.JmeContext;
/** /**
@ -41,4 +42,12 @@ public class LwjglOffscreenBuffer extends LwjglWindow {
public LwjglOffscreenBuffer() { public LwjglOffscreenBuffer() {
super(JmeContext.Type.OffscreenSurface); super(JmeContext.Type.OffscreenSurface);
} }
@Override
protected void showWindow() {
}
@Override
protected void setWindowIcon(final AppSettings settings) {
}
} }

View File

@ -315,18 +315,20 @@ public abstract class LwjglWindow extends LwjglContext implements Runnable {
glfwSwapInterval(0); glfwSwapInterval(0);
} }
if(type != Type.OffscreenSurface) { setWindowIcon(settings);
setWindowIcon(settings); showWindow();
glfwShowWindow(window);
}
allowSwapBuffers = settings.isSwapBuffers(); allowSwapBuffers = settings.isSwapBuffers();
} }
protected void showWindow() {
glfwShowWindow(window);
}
/** /**
* Set custom icons to the window of this application. * Set custom icons to the window of this application.
*/ */
private void setWindowIcon(final AppSettings settings) { protected void setWindowIcon(final AppSettings settings) {
final Object[] icons = settings.getIcons(); final Object[] icons = settings.getIcons();
if (icons == null) return; if (icons == null) return;