@Override
    public void readObject( DataInput in ) throws IOException {
        super.readObject( in );
        Texture attr = (Texture)node;
        attr.setBoundaryColor( control.readColor4f( in ));
        attr.setBoundaryModeS( in.readInt() );
        attr.setBoundaryModeT( in.readInt() );
        attr.setEnable( in.readBoolean() );

        imageComponents = new int[ in.readInt() ];
        for(int i=0; i<imageComponents.length; i++)
            imageComponents[i] = in.readInt();

        int mag = in.readInt();
        try {
            attr.setMagFilter( mag );
        } catch(IllegalArgumentException e ) {
            // The OpenFLT loader sets erroneous values for
            // mag filter which will cause an exception with
            // Java3D 1.3, handle this gracefully....
            if (mag==Texture.MULTI_LEVEL_LINEAR)
                attr.setMagFilter( Texture.BASE_LEVEL_LINEAR );
            else if (mag==Texture.MULTI_LEVEL_POINT)
                attr.setMagFilter( Texture.BASE_LEVEL_POINT );
            else
                attr.setMagFilter( Texture.FASTEST );
        }

        attr.setMinFilter( in.readInt() );

	attr.setBaseLevel( in.readInt() );
	attr.setMaximumLevel( in.readInt() );
	attr.setMinimumLOD( in.readFloat() );
	attr.setMaximumLOD( in.readFloat() );
	attr.setLodOffset( control.readPoint3f( in ) );
	attr.setAnisotropicFilterMode( in.readInt() );
	attr.setAnisotropicFilterDegree( in.readFloat() );

	int points = in.readInt();
	if ( points>0 ) {
	    float[] lod = new float[ points ];
	    float[] pts = new float[ points ];
	    for (int i = 0 ; i < points ; i++) {
		lod[i] = in.readFloat();
		pts[i] = in.readFloat();
	    }
	    attr.setSharpenTextureFunc( lod, pts );
	}

	points = in.readInt();
	if ( points >= 4 ) {
	    float[] weights = new float[ points ];
	    for (int i = 0 ; i < points ; i++) {
		weights[i] = in.readFloat();
	    }
	    attr.setFilter4Func( weights );
	}
    }