@Override protected void disposeColorTexture (Cubemap colorTexture) { colorTexture.dispose(); }
@Override protected void disposeColorTexture (Cubemap colorTexture) { colorTexture.dispose(); }
@Override public void dispose () { shaderBatch.dispose(); shaderBatch = null; shaderProvider = null; if (cubemap != null) cubemap.dispose(); cubemap = null; super.dispose(); }
@Override public void dispose () { modelBatch.dispose(); model.dispose(); cubemap.dispose(); image.dispose(); batch.dispose(); etc1aShader.dispose(); }
public void setEnvironment (String name) { if (name == null) return; if (cubemap != null) { cubemap.dispose(); cubemap = null; } if (name.equals("<none>")) { if (environment.has(CubemapAttribute.EnvironmentMap)) { environment.remove(CubemapAttribute.EnvironmentMap); shaderProvider.clear(); } } else { FileHandle root = Gdx.files.internal("data/g3d/environment"); FacedCubemapData faces = new FacedCubemapData(root.child(name + "_PX.png"), root.child(name+"_NX.png"), root.child(name + "_PY.png"), root.child(name + "_NY.png"), root.child(name + "_PZ.png"), root.child(name + "_NZ.png"), false); // FIXME mipmapping on desktop cubemap = new Cubemap(faces); faces.load(CubemapSide.NegativeX, root.child(name + "_NX.png")); cubemap.load(faces); if (!environment.has(CubemapAttribute.EnvironmentMap)) shaderProvider.clear(); environment.set(new CubemapAttribute(CubemapAttribute.EnvironmentMap, cubemap)); } }
@Override protected void disposeColorTexture (Cubemap colorTexture) { colorTexture.dispose(); }
@Override public void dispose() { boxModel.dispose(); cubemap.dispose(); }
public void set(FileHandle positiveX, FileHandle negativeX, FileHandle positiveY, FileHandle negativeY, FileHandle positiveZ, FileHandle negativeZ) { if (cubemap != null) { cubemap.dispose(); } cubemap = new Cubemap(positiveX, negativeX, positiveY, negativeY, positiveZ, negativeZ); this.positiveX = positiveX; this.negativeX = negativeX; this.positiveY = positiveY; this.negativeY = negativeY; this.positiveZ = positiveZ; this.negativeZ = negativeZ; }