Fixes a minor threading problem and removes useless imports

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9896 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
jul..om 13 years ago
parent e4d776ae0e
commit b76bffcd2f
  1. 5
      engine/src/jogl/com/jme3/renderer/jogl/JoglRenderer.java
  2. 4
      engine/src/jogl/com/jme3/system/jogl/JoglDisplay.java

@ -61,8 +61,6 @@ import com.jme3.texture.Image;
import com.jme3.texture.Texture; import com.jme3.texture.Texture;
import com.jme3.texture.Texture.WrapAxis; import com.jme3.texture.Texture.WrapAxis;
import com.jme3.util.BufferUtils; import com.jme3.util.BufferUtils;
import com.jme3.util.IntMap;
import com.jme3.util.IntMap.Entry;
import com.jme3.util.ListMap; import com.jme3.util.ListMap;
import com.jme3.util.NativeObjectManager; import com.jme3.util.NativeObjectManager;
import com.jme3.util.SafeArrayList; import com.jme3.util.SafeArrayList;
@ -73,12 +71,9 @@ import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import javax.media.opengl.GL; import javax.media.opengl.GL;
import javax.media.opengl.GL2; import javax.media.opengl.GL2;
import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2ES2; import javax.media.opengl.GL2ES2;
import javax.media.opengl.GL2GL3; import javax.media.opengl.GL2GL3;
import javax.media.opengl.GLContext; import javax.media.opengl.GLContext;
import javax.media.opengl.fixedfunc.GLLightingFunc;
import javax.media.opengl.fixedfunc.GLPointerFunc;
import jme3tools.converters.MipMapGenerator; import jme3tools.converters.MipMapGenerator;
import jme3tools.shader.ShaderDebug; import jme3tools.shader.ShaderDebug;

@ -272,6 +272,9 @@ public class JoglDisplay extends JoglAbstractDisplay {
} }
public void create(boolean waitFor){ public void create(boolean waitFor){
if (SwingUtilities.isEventDispatchThread()) {
initInEDT();
} else {
try { try {
if (waitFor) { if (waitFor) {
try { try {
@ -294,6 +297,7 @@ public class JoglDisplay extends JoglAbstractDisplay {
throw new AssertionError(); // can never happen throw new AssertionError(); // can never happen
} }
} }
}
public void destroy(boolean waitFor){ public void destroy(boolean waitFor){
needClose.set(true); needClose.set(true);

Loading…
Cancel
Save