public void read(final InputCapsule capsule) throws IOException {
_minificationFilter = capsule.readEnum("minificationFilter", MinificationFilter.class,
MinificationFilter.NearestNeighborNoMipMaps);
_image = (Image) capsule.readSavable("image", null);
final TextureKey key = (TextureKey) capsule.readSavable("textureKey", null);
if (key != null) {
_key = TextureKey.getKey(key.getSource(), key.isFlipped(), key.getFormat(), key.getId(),
key.getMinificationFilter());
} else {
_key = TextureKey.getRTTKey(_minificationFilter);
}
if (_image == null && _key != null && _key.getSource() != null) {
TextureManager.loadFromKey(_key, null, this);
}
_borderColor.set((ColorRGBA) capsule.readSavable("borderColor", new ColorRGBA(ColorRGBA.BLACK_NO_ALPHA)));
_hasBorder = capsule.readBoolean("hasBorder", false);
_anisotropicFilterPercent = capsule.readFloat("anisotropicFilterPercent", 0.0f);
_lodBias = capsule.readFloat("lodBias", 0.0f);
_magnificationFilter = capsule.readEnum("magnificationFilter", MagnificationFilter.class,
MagnificationFilter.Bilinear);
_storeFormat = capsule.readEnum("storeFormat", TextureStoreFormat.class, TextureStoreFormat.RGBA8);
_rttPixelDataType = capsule.readEnum("rttPixelDataType", PixelDataType.class, PixelDataType.UnsignedByte);
}