public Texture getTexture(final Face face) { if (face == null) { throw new IllegalArgumentException("Face can not be null."); } return ((TextureState) _skyboxQuads[face.ordinal()].getLocalRenderState(RenderState.StateType.Texture)) .getTexture(); }
public Texture getTexture(final Face face) { if (face == null) { throw new IllegalArgumentException("Face can not be null."); } return ((TextureState) _skyboxQuads[face.ordinal()].getLocalRenderState(RenderState.StateType.Texture)) .getTexture(); }
if (mesh.getLocalRenderState(StateType.Texture) != null) { final TextureState textureState = (TextureState) mesh.getLocalRenderState(StateType.Texture); if (textureState.isEnabled() && textureState.getTexture() != null) { final TextureKey tKey = textureState.getTexture().getTextureKey(); final String tmpTextureName = tKey.getSource().getName(); final int lastIndexOfUnixPathSeparator = tmpTextureName.lastIndexOf('/');
final Texture pkText = pkTState.getTexture(i); if (newTState.getTexture(i) == null) { newTState.setTexture(pkText, i); final Texture pkText = pkTState.getTexture(i); if (newTState.getTexture(i) == null) { newTState.setTexture(pkText, i);
final Texture pkText = pkTState.getTexture(i); if (newTState.getTexture(i) == null) { newTState.setTexture(pkText, i); final Texture pkText = pkTState.getTexture(i); if (newTState.getTexture(i) == null) { newTState.setTexture(pkText, i);
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; }
public TextureParameter(final Mesh mesh, final int textureIndex, final int targetTextureIndex) { if (mesh == null) { throw new IllegalArgumentException("Mesh is null"); } this.mesh = mesh; this.textureIndex = textureIndex; this.targetTextureIndex = targetTextureIndex; if (mesh.isDirty(DirtyType.RenderState)) { mesh.updateWorldRenderStates(false); mesh.clearDirty(DirtyType.RenderState); } final RenderState textureState = mesh.getWorldRenderState(StateType.Texture); if (textureState == null) { throw new Ardor3dException("No texture state found for mesh: " + mesh); } texture = ((TextureState) textureState).getTexture(textureIndex); textureKey = texture != null ? texture.getTextureKey() : null; }
@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); }
Texture tex = null; try { tex = ((TextureState) system.getLocalRenderState(StateType.Texture)).getTexture(); if (tex != null) { if (tex.getTextureKey() != null && tex.getTextureKey().getSource() != null) {
@Override public void read(final InputCapsule capsule) throws IOException { super.read(capsule); _tintColor = (ColorRGBA) capsule.readSavable("tintColor", new ColorRGBA(ColorRGBA.WHITE)); _textureBorderOffsets = (Vector4) capsule.readSavable("borderCoords", new Vector4(0.25, 0.25, 0.25, 0.25)); _contentPadding = (Vector4) capsule.readSavable("contentPadding", new Vector4()); _borderScale = capsule.readFloat("borderScale", 1f); final TextureState ts = ((TextureState) getLocalRenderState(StateType.Texture)); if (ts != null) { _texture = ts.getTexture(); } } }
if (_texState.getNumberOfSetTextures() == 0 || _texState.getTexture().getTextureKey() == null || !_texState.getTexture().getTextureKey().equals(_image.getTexture().getTextureKey())) { _texState.setTexture(_image.getTexture()); ImageDiskBackdrop._standin.setRenderState(_texState);
if (SubTexUtil._tstate.getNumberOfSetTextures() == 0 || SubTexUtil._tstate.getTexture().getTextureKey() == null || !SubTexUtil._tstate.getTexture().getTextureKey().equals(subTex.getTexture().getTextureKey())) { SubTexUtil._tstate.setTexture(subTex.getTexture()); SubTexUtil._mesh.setRenderState(SubTexUtil._tstate);
if (SubTexUtil._tstate.getNumberOfSetTextures() == 0 || SubTexUtil._tstate.getTexture().getTextureKey() == null || !SubTexUtil._tstate.getTexture().getTextureKey().equals(subTex.getTexture().getTextureKey())) { SubTexUtil._tstate.setTexture(subTex.getTexture()); SubTexUtil._mesh.setRenderState(SubTexUtil._tstate);
if (SubTexUtil._tstate.getNumberOfSetTextures() == 0 || SubTexUtil._tstate.getTexture().getTextureKey() == null || !SubTexUtil._tstate.getTexture().getTextureKey().equals(subTex.getTexture().getTextureKey())) { SubTexUtil._tstate.setTexture(subTex.getTexture());
if (SubTexUtil._tstate.getNumberOfSetTextures() == 0 || SubTexUtil._tstate.getTexture().getTextureKey() == null || !SubTexUtil._tstate.getTexture().getTextureKey().equals(subTex.getTexture().getTextureKey())) { SubTexUtil._tstate.setTexture(subTex.getTexture());
texture = state.getTexture(i);
texture = state.getTexture(i);
texture = state.getTexture(i);