Normand Briere
2019-08-15 33504fc9a180903aace77613264550754fba5706
CameraPane.java
....@@ -113,6 +113,8 @@
113113 /*static*/ com.sun.opengl.util.texture.Texture cubemap; // Either custom or rgb
114114 /*static*/ com.sun.opengl.util.texture.Texture cubemapcustom;
115115 /*static*/ com.sun.opengl.util.texture.Texture cubemaprgb;
116
+ boolean transformMode;
117
+
116118 boolean reverseUP = false;
117119 static boolean frozen = false;
118120 boolean enablebackspace = false; // patch for back buffer refresh
....@@ -2515,7 +2517,7 @@
25152517 com.sun.opengl.util.texture.TextureIO.newTextureData(
25162518 getClass().getClassLoader().getResourceAsStream(name),
25172519 true,
2518
- com.sun.opengl.util.texture.TextureIO.PNG);
2520
+ GetFormat(name)); // com.sun.opengl.util.texture.TextureIO.PNG);
25192521 } catch (java.io.IOException e)
25202522 {
25212523 throw new javax.media.opengl.GLException(e);
....@@ -11082,11 +11084,11 @@
1108211084 //
1108311085 // newenvy = -1;
1108411086
11085
- if (object.skyboxname != null && object.skyboxname.equals("cubemaps/default-skyboxes/rgb"))
11087
+ if (transformMode) // object.skyboxname != null && object.skyboxname.equals("cubemaps/default-skyboxes/rgb"))
1108611088 {
1108711089 if (cubemaprgb == null)
1108811090 {
11089
- cubemaprgb = LoadSkybox(object.skyboxname + "/", object.skyboxext, false);
11091
+ cubemaprgb = LoadSkybox("cubemaps/default-skyboxes/rgb" + "/", "jpg", false);
1109011092 }
1109111093
1109211094 cubemap = cubemaprgb;
....@@ -11097,6 +11099,8 @@
1109711099 {
1109811100 if (!object.skyboxname.equals(this.loadedskyboxname))
1109911101 {
11102
+ if (cubemap != null && cubemap != cubemaprgb)
11103
+ cubemap.dispose();
1110011104 cubemapcustom = LoadSkybox(object.skyboxname + "/", object.skyboxext, false);
1110111105 loadedskyboxname = object.skyboxname;
1110211106 }
....@@ -16788,7 +16792,8 @@
1678816792 gl.glDisable(GL.GL_TEXTURE_GEN_R);
1678916793
1679016794 cubemap.disable();
16791
- ////cubemap.unbind();
16795
+ //cubemap.dispose();
16796
+
1679216797 if (CULLFACE)
1679316798 {
1679416799 gl.glEnable(gl.GL_CULL_FACE);