@Override public void loadAsync (AssetManager manager, String fileName, FileHandle file, CubemapParameter parameter) { info.filename = fileName; if (parameter == null || parameter.cubemapData == null) { Pixmap pixmap = null; Format format = null; boolean genMipMaps = false; info.cubemap = null; if (parameter != null) { format = parameter.format; info.cubemap = parameter.cubemap; } } else { info.data = parameter.cubemapData; info.cubemap = parameter.cubemap; } if (!info.data.isPrepared()) info.data.prepare(); }
@Override public int getHeight () { return data.getHeight(); }
@Override public int getWidth () { return data.getWidth(); }
/** Sets the sides of this cubemap to the specified {@link CubemapData}. */ public void load (CubemapData data) { if (!data.isPrepared()) data.prepare(); bind(); unsafeSetFilter(minFilter, magFilter, true); unsafeSetWrap(uWrap, vWrap, true); data.consumeCubemapData(); Gdx.gl.glBindTexture(glTarget, 0); }
@Override public boolean isManaged () { return data.isManaged(); }
/** Sets the sides of this cubemap to the specified {@link CubemapData}. */ public void load (CubemapData data) { if (!data.isPrepared()) data.prepare(); bind(); unsafeSetFilter(minFilter, magFilter, true); unsafeSetWrap(uWrap, vWrap, true); data.consumeCubemapData(); Gdx.gl.glBindTexture(glTarget, 0); }
@Override public boolean isManaged () { return data.isManaged(); }
@Override public void loadAsync (AssetManager manager, String fileName, FileHandle file, CubemapParameter parameter) { info.filename = fileName; if (parameter == null || parameter.cubemapData == null) { Pixmap pixmap = null; Format format = null; boolean genMipMaps = false; info.cubemap = null; if (parameter != null) { format = parameter.format; info.cubemap = parameter.cubemap; } } else { info.data = parameter.cubemapData; info.cubemap = parameter.cubemap; } if (!info.data.isPrepared()) info.data.prepare(); }
/** Sets the sides of this cubemap to the specified {@link CubemapData}. */ public void load (CubemapData data) { if (!data.isPrepared()) data.prepare(); bind(); unsafeSetFilter(minFilter, magFilter, true); unsafeSetWrap(uWrap, vWrap, true); data.consumeCubemapData(); Gdx.gl.glBindTexture(glTarget, 0); }
/** Disposes all resources associated with the cubemap */ @Override public void dispose () { // this is a hack. reason: we have to set the glHandle to 0 for textures that are // reloaded through the asset manager as we first remove (and thus dispose) the texture // and then reload it. the glHandle is set to 0 in invalidateAllTextures prior to // removal from the asset manager. if (glHandle == 0) return; delete(); if (data.isManaged()) if (managedCubemaps.get(Gdx.app) != null) managedCubemaps.get(Gdx.app).removeValue(this, true); }
@Override public int getHeight () { return data.getHeight(); }
@Override public int getWidth () { return data.getWidth(); }
@Override public void loadAsync (AssetManager manager, String fileName, FileHandle file, CubemapParameter parameter) { info.filename = fileName; if (parameter == null || parameter.cubemapData == null) { Format format = null; boolean genMipMaps = false; info.cubemap = null; if (parameter != null) { format = parameter.format; info.cubemap = parameter.cubemap; } if (fileName.contains(".ktx") || fileName.contains(".zktx")) { info.data = new KTXTextureData(file, genMipMaps); } } else { info.data = parameter.cubemapData; info.cubemap = parameter.cubemap; } if (!info.data.isPrepared()) info.data.prepare(); }
/** Disposes all resources associated with the cubemap */ @Override public void dispose () { // this is a hack. reason: we have to set the glHandle to 0 for textures that are // reloaded through the asset manager as we first remove (and thus dispose) the texture // and then reload it. the glHandle is set to 0 in invalidateAllTextures prior to // removal from the asset manager. if (glHandle == 0) return; delete(); if (data.isManaged()) if (managedCubemaps.get(Gdx.app) != null) managedCubemaps.get(Gdx.app).removeValue(this, true); }
@Override public int getHeight () { return data.getHeight(); }
@Override public int getWidth () { return data.getWidth(); }
@Override public void loadAsync (AssetManager manager, String fileName, FileHandle file, CubemapParameter parameter) { info.filename = fileName; if (parameter == null || parameter.cubemapData == null) { Format format = null; boolean genMipMaps = false; info.cubemap = null; if (parameter != null) { format = parameter.format; info.cubemap = parameter.cubemap; } if (fileName.contains(".ktx") || fileName.contains(".zktx")) { info.data = new KTXTextureData(file, genMipMaps); } } else { info.data = parameter.cubemapData; info.cubemap = parameter.cubemap; } if (!info.data.isPrepared()) info.data.prepare(); }
@Override public boolean isManaged () { return data.isManaged(); }
@Override public void loadAsync (AssetManager manager, String fileName, FileHandle file, CubemapParameter parameter) { info.filename = fileName; if (parameter == null || parameter.cubemapData == null) { Pixmap pixmap = null; Format format = null; boolean genMipMaps = false; info.cubemap = null; if (parameter != null) { format = parameter.format; info.cubemap = parameter.cubemap; } if (fileName.contains(".ktx") || fileName.contains(".zktx")) { info.data = new KTXTextureData(file, genMipMaps); } } else { info.data = parameter.cubemapData; info.cubemap = parameter.cubemap; } if (!info.data.isPrepared()) info.data.prepare(); }
/** Disposes all resources associated with the cubemap */ @Override public void dispose () { // this is a hack. reason: we have to set the glHandle to 0 for textures that are // reloaded through the asset manager as we first remove (and thus dispose) the texture // and then reload it. the glHandle is set to 0 in invalidateAllTextures prior to // removal from the asset manager. if (glHandle == 0) return; delete(); if (data.isManaged()) if (managedCubemaps.get(Gdx.app) != null) managedCubemaps.get(Gdx.app).removeValue(this, true); }