/** * Loads a texture from the given source. * * @param source * the source of the texture image. * @param minFilter * the filter for the near values. Used to determine if we should generate mipmaps. * @param flipVertically * If true, the image is flipped vertically during image loading. * @return the loaded texture. */ public static Texture load(final ResourceSource source, final Texture.MinificationFilter minFilter, final boolean flipVertically) { return load(source, minFilter, TextureStoreFormat.GuessNoCompressedFormat, flipVertically); }
/** * Loads a texture from the given source. * * @param source * the source of the texture image. * @param minFilter * the filter for the near values. Used to determine if we should generate mipmaps. * @param flipVertically * If true, the image is flipped vertically during image loading. * @return the loaded texture. */ public static Texture load(final ResourceSource source, final Texture.MinificationFilter minFilter, final boolean flipVertically) { return load(source, minFilter, TextureStoreFormat.GuessNoCompressedFormat, flipVertically); }
protected void loadTexture(final String skinTexture) { try { _sharedTex = TextureManager.load(skinTexture, MinificationFilter.BilinearNoMipMaps, TextureStoreFormat.GuessNoCompressedFormat, false); } catch (final Exception e) { e.printStackTrace(); } }
protected void loadTexture(final String skinTexture) { try { _sharedTex = TextureManager.load(skinTexture, MinificationFilter.Trilinear, TextureStoreFormat.GuessNoCompressedFormat, false); } catch (final Exception e) { e.printStackTrace(); } }
protected void loadTexture(final ResourceSource skinTexture) { try { _sharedTex = TextureManager.load(skinTexture, MinificationFilter.Trilinear, TextureStoreFormat.GuessNoCompressedFormat, false); } catch (final Exception e) { e.printStackTrace(); } }
protected void loadTexture(final ResourceSource skinTexture) { try { _sharedTex = TextureManager.load(skinTexture, MinificationFilter.BilinearNoMipMaps, TextureStoreFormat.GuessNoCompressedFormat, false); } catch (final Exception e) { e.printStackTrace(); } }
private static void loadDefaultTexture() { synchronized (logger) { if (!defaultTextureLoaded) { defaultTextureLoaded = true; _defaultTexture = new Texture2D(); try { _defaultTexture = TextureManager.load(DEFAULT_TEXTURE_SOURCE, Texture.MinificationFilter.Trilinear, true); } catch (final Exception e) { logger.log(Level.WARNING, "Failed to load default texture: notloaded.tga", e); } } } }
private static void loadDefaultTexture() { synchronized (logger) { if (!defaultTextureLoaded) { defaultTextureLoaded = true; _defaultTexture = new Texture2D(); try { _defaultTexture = TextureManager.load(DEFAULT_TEXTURE_SOURCE, Texture.MinificationFilter.Trilinear, true); } catch (final Exception e) { logger.log(Level.WARNING, "Failed to load default texture: notloaded.tga", e); } } } }
/** * Loads a texture by attempting to locate the given name using ResourceLocatorTool. * * @param name * the name of the texture image. * @param minFilter * the filter for the near values. Used to determine if we should generate mipmaps. * @param flipVertically * If true, the image is flipped vertically during image loading. * @return the loaded texture. */ public static Texture load(final String name, final Texture.MinificationFilter minFilter, final boolean flipVertically) { return load(ResourceLocatorTool.locateResource(ResourceLocatorTool.TYPE_TEXTURE, name), minFilter, TextureStoreFormat.GuessNoCompressedFormat, flipVertically); }
/** * Loads a texture by attempting to locate the given name using ResourceLocatorTool. * * @param name * the name of the texture image. * @param minFilter * the filter for the near values. Used to determine if we should generate mipmaps. * @param flipVertically * If true, the image is flipped vertically during image loading. * @return the loaded texture. */ public static Texture load(final String name, final Texture.MinificationFilter minFilter, final boolean flipVertically) { return load(ResourceLocatorTool.locateResource(ResourceLocatorTool.TYPE_TEXTURE, name), minFilter, TextureStoreFormat.GuessNoCompressedFormat, flipVertically); }
/** * Loads a texture by attempting to locate the given name using ResourceLocatorTool. * * @param name * the name of the texture image. * @param minFilter * the filter for the near values. Used to determine if we should generate mipmaps. * @param format * the specific format to use when storing this texture on the card. * @param flipVertically * If true, the image is flipped vertically during image loading. * @return the loaded texture. */ public static Texture load(final String name, final Texture.MinificationFilter minFilter, final TextureStoreFormat format, final boolean flipVertically) { return load(ResourceLocatorTool.locateResource(ResourceLocatorTool.TYPE_TEXTURE, name), minFilter, format, flipVertically); }
/** * Loads a texture by attempting to locate the given name using ResourceLocatorTool. * * @param name * the name of the texture image. * @param minFilter * the filter for the near values. Used to determine if we should generate mipmaps. * @param format * the specific format to use when storing this texture on the card. * @param flipVertically * If true, the image is flipped vertically during image loading. * @return the loaded texture. */ public static Texture load(final String name, final Texture.MinificationFilter minFilter, final TextureStoreFormat format, final boolean flipVertically) { return load(ResourceLocatorTool.locateResource(ResourceLocatorTool.TYPE_TEXTURE, name), minFilter, format, flipVertically); }
currentMaterial.textureName = textureName; if (_textureLocator == null) { currentMaterial.map_Kd = TextureManager.load(textureName, getMinificationFilter(), isUseCompression() ? TextureStoreFormat.GuessCompressedFormat : TextureStoreFormat.GuessNoCompressedFormat, isFlipTextureVertically()); } else { final ResourceSource source = _textureLocator.locateResource(textureName); currentMaterial.map_Kd = TextureManager.load(source, getMinificationFilter(), isUseCompression() ? TextureStoreFormat.GuessCompressedFormat : TextureStoreFormat.GuessNoCompressedFormat, isFlipTextureVertically());
private Texture loadTexture2D(final String path, final Texture.MinificationFilter minFilter) { if (_dataCache.containsTexture(path)) { return _dataCache.getTexture(path); } final Texture texture; if (_importer.getTextureLocator() == null) { texture = TextureManager.load(path, minFilter, _compressTextures ? TextureStoreFormat.GuessCompressedFormat : TextureStoreFormat.GuessNoCompressedFormat, true); } else { final ResourceSource source = _importer.getTextureLocator().locateResource(path); texture = TextureManager.load(source, minFilter, _compressTextures ? TextureStoreFormat.GuessCompressedFormat : TextureStoreFormat.GuessNoCompressedFormat, true); } _dataCache.addTexture(path, texture); return texture; }
private Texture loadTexture(final String name) { Texture tex = null; if (_textureLocator == null) { tex = TextureManager.load(name, getMinificationFilter(), isUseCompression() ? TextureStoreFormat.GuessCompressedFormat : TextureStoreFormat.GuessNoCompressedFormat, isFlipTextureVertically()); } else { final ResourceSource source = _textureLocator.locateResource(name); if (source != null) { tex = TextureManager.load(source, getMinificationFilter(), isUseCompression() ? TextureStoreFormat.GuessCompressedFormat : TextureStoreFormat.GuessNoCompressedFormat, isFlipTextureVertically()); } } return tex; }
private void loadApplyTexture() throws MalformedURLException { final TextureState ts = (TextureState) getEdittedParticles().getLocalRenderState(StateType.Texture); // XXX: Needed? // TextureManager.clearCache(); ts.setTexture(TextureManager.load(new URLResourceSource(_newTexture.toURI().toURL()), Texture.MinificationFilter.BilinearNearestMipMap, TextureStoreFormat.GuessCompressedFormat, true)); ts.getTexture().setWrap(WrapMode.BorderClamp); ts.setEnabled(true); getEdittedParticles().setRenderState(ts); _newTexture = null; }
/** * Create setup to use as fallback if fancy water is not supported. */ private void createFallbackData() { fallbackTextureState = new TextureState(); fallbackTextureState.setEnabled(true); fallbackTexture = TextureManager.load(fallbackMapTextureString, Texture.MinificationFilter.Trilinear, TextureStoreFormat.GuessCompressedFormat, true); fallbackTextureState.setTexture(fallbackTexture, 0); fallbackTexture.setWrap(Texture.WrapMode.Repeat); fallbackTextureStateMatrix = new Matrix4(); as1 = new BlendState(); as1.setBlendEnabled(true); as1.setTestEnabled(true); as1.setSourceFunction(BlendState.SourceFunction.SourceAlpha); as1.setDestinationFunction(BlendState.DestinationFunction.OneMinusSourceAlpha); as1.setEnabled(true); }
tRenderer.setupTexture(textureReflect); normalmapTexture = TextureManager.load(normalMapTextureString, Texture.MinificationFilter.Trilinear, TextureStoreFormat.GuessCompressedFormat, true); textureState.setTexture(normalmapTexture, 0); dudvTexture = TextureManager.load(dudvMapTextureString, Texture.MinificationFilter.Trilinear, TextureStoreFormat.GuessNoCompressedFormat, true); textureState.setTexture(dudvTexture, 2); foamTexture = TextureManager.load(foamMapTextureString, Texture.MinificationFilter.Trilinear, TextureStoreFormat.GuessCompressedFormat, true); if (useRefraction) {
tRenderer.setupTexture(textureReflect); normalmapTexture = TextureManager.load(normalMapTextureString, Texture.MinificationFilter.Trilinear, TextureStoreFormat.GuessCompressedFormat, true); textureState.setTexture(normalmapTexture, 0); dudvTexture = TextureManager.load(dudvMapTextureString, Texture.MinificationFilter.Trilinear, TextureStoreFormat.GuessNoCompressedFormat, true); matrix = new Matrix4(); foamTexture = TextureManager.load(foamMapTextureString, Texture.MinificationFilter.Trilinear, TextureStoreFormat.GuessCompressedFormat, true); if (useRefraction) {