* TextureKey.equals() now takes into account flip Y flag
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7174 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
07f9cf0d23
commit
b774630160
@ -77,6 +77,7 @@ public class TextureKey extends AssetKey<Texture> {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object createClonedInstance(Object asset){
|
||||
Texture tex = (Texture) asset;
|
||||
return tex.createSimpleClone();
|
||||
@ -140,6 +141,14 @@ public class TextureKey extends AssetKey<Texture> {
|
||||
this.generateMips = generateMips;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other){
|
||||
if (!(other instanceof TextureKey)){
|
||||
return false;
|
||||
}
|
||||
return super.equals(other) && isFlipY() == ((TextureKey)other).isFlipY();
|
||||
}
|
||||
|
||||
public void write(JmeExporter ex) throws IOException{
|
||||
super.write(ex);
|
||||
OutputCapsule oc = ex.getCapsule(this);
|
||||
|
@ -104,6 +104,7 @@ public abstract class Spatial implements Savable, Cloneable, Collidable {
|
||||
protected static final int RF_TRANSFORM = 0x01, // need light resort + combine transforms
|
||||
RF_BOUND = 0x02,
|
||||
RF_LIGHTLIST = 0x04; // changes in light lists
|
||||
|
||||
protected CullHint cullHint = CullHint.Inherit;
|
||||
/**
|
||||
* Spatial's bounding volume relative to the world.
|
||||
@ -163,6 +164,7 @@ public abstract class Spatial implements Savable, Cloneable, Collidable {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Indicate that the transform of this spatial has changed and that
|
||||
* a refresh is required.
|
||||
|
Loading…
x
Reference in New Issue
Block a user