@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof TextureParameter)) { return false; } final TextureParameter other = (TextureParameter) obj; if (textureKey == null) { if (other.textureKey != null) { return false; } } else if (!textureKey.equals(other.textureKey)) { return false; } return true; }
public static synchronized boolean clearKey(final TextureKey key) { WeakReference<TextureKey> ref; TextureKey check; for (final Iterator<WeakReference<TextureKey>> it = _keyCache.iterator(); it.hasNext();) { ref = it.next(); check = ref.get(); if (check != null && check.equals(key)) { it.remove(); return true; } } return false; }
public static synchronized boolean clearKey(final TextureKey key) { WeakReference<TextureKey> ref; TextureKey check; for (final Iterator<WeakReference<TextureKey>> it = _keyCache.iterator(); it.hasNext();) { ref = it.next(); check = ref.get(); if (check != null && check.equals(key)) { it.remove(); return true; } } return false; }
public static synchronized TextureKey getKey(final ResourceSource source, final boolean flipped, final TextureStoreFormat storeFormat, final String id, final Texture.MinificationFilter minFilter) { final TextureKey key = new TextureKey(); key._source = source; key._flipped = flipped; key._minFilter = minFilter; key._format = storeFormat; key._id = id; key._code = Integer.MAX_VALUE; { WeakReference<TextureKey> ref; TextureKey check; for (final Iterator<WeakReference<TextureKey>> it = _keyCache.iterator(); it.hasNext();) { ref = it.next(); check = ref.get(); if (check == null) { // found empty, clean up it.remove(); continue; } if (check.equals(key)) { // found match, return return check; } } } // not found _keyCache.add(new WeakReference<TextureKey>(key)); return key; }
public static synchronized TextureKey getKey(final ResourceSource source, final boolean flipped, final TextureStoreFormat storeFormat, final String id, final Texture.MinificationFilter minFilter) { final TextureKey key = new TextureKey(); key._source = source; key._flipped = flipped; key._minFilter = minFilter; key._format = storeFormat; key._id = id; key._code = Integer.MAX_VALUE; { WeakReference<TextureKey> ref; TextureKey check; for (final Iterator<WeakReference<TextureKey>> it = _keyCache.iterator(); it.hasNext();) { ref = it.next(); check = ref.get(); if (check == null) { // found empty, clean up it.remove(); continue; } if (check.equals(key)) { // found match, return return check; } } } // not found _keyCache.add(new WeakReference<TextureKey>(key)); return key; }
@Override public void draw(final Renderer renderer, final UIComponent comp) { if (_texState.getNumberOfSetTextures() == 0 || _texState.getTexture().getTextureKey() == null || !_texState.getTexture().getTextureKey().equals(_image.getTexture().getTextureKey())) { _texState.setTexture(_image.getTexture()); ImageArcBackdrop._standin.setRenderState(_texState); ImageArcBackdrop._standin.updateWorldRenderStates(false); } drawBackdrop(ImageArcBackdrop._standin, renderer, comp, _image); }
|| !_texState.getTexture().getTextureKey().equals(_image.getTexture().getTextureKey())) { _texState.setTexture(_image.getTexture()); ImageDiskBackdrop._standin.setRenderState(_texState);
|| !SubTexUtil._tstate.getTexture().getTextureKey().equals(subTex.getTexture().getTextureKey())) { SubTexUtil._tstate.setTexture(subTex.getTexture()); SubTexUtil._mesh.setRenderState(SubTexUtil._tstate);
|| !SubTexUtil._tstate.getTexture().getTextureKey().equals(subTex.getTexture().getTextureKey())) { SubTexUtil._tstate.setTexture(subTex.getTexture()); SubTexUtil._mesh.setRenderState(SubTexUtil._tstate);
|| !SubTexUtil._tstate.getTexture().getTextureKey().equals(subTex.getTexture().getTextureKey())) { SubTexUtil._tstate.setTexture(subTex.getTexture()); SubTexUtil._mesh.setRenderState(SubTexUtil._tstate);
|| !SubTexUtil._tstate.getTexture().getTextureKey().equals(subTex.getTexture().getTextureKey())) { SubTexUtil._tstate.setTexture(subTex.getTexture()); SubTexUtil._mesh.setRenderState(SubTexUtil._tstate);