.. | .. |
---|
113 | 113 | /*static*/ com.sun.opengl.util.texture.Texture cubemap; // Either custom or rgb |
---|
114 | 114 | /*static*/ com.sun.opengl.util.texture.Texture cubemapcustom; |
---|
115 | 115 | /*static*/ com.sun.opengl.util.texture.Texture cubemaprgb; |
---|
| 116 | + boolean transformMode; |
---|
| 117 | + |
---|
116 | 118 | boolean reverseUP = false; |
---|
117 | 119 | static boolean frozen = false; |
---|
118 | 120 | boolean enablebackspace = false; // patch for back buffer refresh |
---|
.. | .. |
---|
2515 | 2517 | com.sun.opengl.util.texture.TextureIO.newTextureData( |
---|
2516 | 2518 | getClass().getClassLoader().getResourceAsStream(name), |
---|
2517 | 2519 | true, |
---|
2518 | | - com.sun.opengl.util.texture.TextureIO.PNG); |
---|
| 2520 | + GetFormat(name)); // com.sun.opengl.util.texture.TextureIO.PNG); |
---|
2519 | 2521 | } catch (java.io.IOException e) |
---|
2520 | 2522 | { |
---|
2521 | 2523 | throw new javax.media.opengl.GLException(e); |
---|
.. | .. |
---|
11082 | 11084 | // |
---|
11083 | 11085 | // newenvy = -1; |
---|
11084 | 11086 | |
---|
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")) |
---|
11086 | 11088 | { |
---|
11087 | 11089 | if (cubemaprgb == null) |
---|
11088 | 11090 | { |
---|
11089 | | - cubemaprgb = LoadSkybox(object.skyboxname + "/", object.skyboxext, false); |
---|
| 11091 | + cubemaprgb = LoadSkybox("cubemaps/default-skyboxes/rgb" + "/", "jpg", false); |
---|
11090 | 11092 | } |
---|
11091 | 11093 | |
---|
11092 | 11094 | cubemap = cubemaprgb; |
---|
.. | .. |
---|
11097 | 11099 | { |
---|
11098 | 11100 | if (!object.skyboxname.equals(this.loadedskyboxname)) |
---|
11099 | 11101 | { |
---|
| 11102 | + if (cubemap != null && cubemap != cubemaprgb) |
---|
| 11103 | + cubemap.dispose(); |
---|
11100 | 11104 | cubemapcustom = LoadSkybox(object.skyboxname + "/", object.skyboxext, false); |
---|
11101 | 11105 | loadedskyboxname = object.skyboxname; |
---|
11102 | 11106 | } |
---|
.. | .. |
---|
16788 | 16792 | gl.glDisable(GL.GL_TEXTURE_GEN_R); |
---|
16789 | 16793 | |
---|
16790 | 16794 | cubemap.disable(); |
---|
16791 | | - ////cubemap.unbind(); |
---|
| 16795 | + //cubemap.dispose(); |
---|
| 16796 | + |
---|
16792 | 16797 | if (CULLFACE) |
---|
16793 | 16798 | { |
---|
16794 | 16799 | gl.glEnable(gl.GL_CULL_FACE); |
---|