From 1f9a5cd028f74c0fc698dd78191e909fba21604b Mon Sep 17 00:00:00 2001 From: javasabr Date: Sat, 3 Dec 2016 16:58:30 +0300 Subject: [PATCH] for prev commit --- .../com/jme3/system/lwjgl/LwjglOffscreenBuffer.java | 9 +++++++++ .../main/java/com/jme3/system/lwjgl/LwjglWindow.java | 12 +++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java b/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java index 8fdde51af..96895b255 100644 --- a/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java +++ b/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java @@ -31,6 +31,7 @@ */ package com.jme3.system.lwjgl; +import com.jme3.system.AppSettings; import com.jme3.system.JmeContext; /** @@ -41,4 +42,12 @@ public class LwjglOffscreenBuffer extends LwjglWindow { public LwjglOffscreenBuffer() { super(JmeContext.Type.OffscreenSurface); } + + @Override + protected void showWindow() { + } + + @Override + protected void setWindowIcon(final AppSettings settings) { + } } diff --git a/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java b/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java index 7c8b47bb6..01eae0c16 100644 --- a/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java +++ b/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java @@ -315,18 +315,20 @@ public abstract class LwjglWindow extends LwjglContext implements Runnable { glfwSwapInterval(0); } - if(type != Type.OffscreenSurface) { - setWindowIcon(settings); - glfwShowWindow(window); - } + setWindowIcon(settings); + showWindow(); allowSwapBuffers = settings.isSwapBuffers(); } + protected void showWindow() { + glfwShowWindow(window); + } + /** * 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(); if (icons == null) return;