// Class: openfl._internal.formats.agal.SamplerState

var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this

$global.Object.defineProperty(exports, "__esModule", {value: true});

var __map_reserved = {};

// Imports

var $hxClasses = require("./../../../../hxClasses_stub").default;

// Constructor

var SamplerState = function(minFilter,magFilter,wrapModeS,wrapModeT,lodBias,maxAniso,ignoreSampler,centroid,mipmapGenerated,textureAlpha) {
	if(textureAlpha == null) {
		textureAlpha = false;
	}
	if(mipmapGenerated == null) {
		mipmapGenerated = false;
	}
	if(centroid == null) {
		centroid = false;
	}
	if(ignoreSampler == null) {
		ignoreSampler = false;
	}
	if(maxAniso == null) {
		maxAniso = 0.0;
	}
	if(lodBias == null) {
		lodBias = 0.0;
	}
	this.set_minFilter(minFilter);
	this.set_magFilter(magFilter);
	this.set_wrapModeS(wrapModeS);
	this.set_wrapModeT(wrapModeT);
	this.set_lodBias(lodBias);
	this.set_maxAniso(maxAniso);
	this.ignoreSampler = ignoreSampler;
	this.centroid = centroid;
	this.mipmapGenerated = mipmapGenerated;
	this.textureAlpha = textureAlpha;
	this.__samplerDirty = true;
}

// Meta

SamplerState.__name__ = ["openfl","_internal","formats","agal","SamplerState"];
SamplerState.prototype = {
	copyFrom: function(other) {
		if(other == null || other.ignoreSampler) {
			return;
		}
		this.set_minFilter(other.minFilter);
		this.set_magFilter(other.magFilter);
		this.set_wrapModeS(other.wrapModeS);
		this.set_wrapModeT(other.wrapModeT);
		this.set_lodBias(other.lodBias);
		this.set_maxAniso(other.maxAniso);
		this.centroid = other.centroid;
		this.mipmapGenerated = other.mipmapGenerated;
		this.textureAlpha = other.textureAlpha;
	},
	equals: function(other) {
		if(this == other) {
			return !this.__samplerDirty;
		}
		if(other == null) {
			return false;
		}
		if(this.minFilter == other.minFilter && this.magFilter == other.magFilter && this.wrapModeS == other.wrapModeS && this.wrapModeT == other.wrapModeT && this.lodBias == other.lodBias && this.maxAniso == other.maxAniso && this.mipmapGenerated == other.mipmapGenerated) {
			return this.textureAlpha == other.textureAlpha;
		} else {
			return false;
		}
	},
	set_lodBias: function(value) {
		if(this.lodBias != value) {
			this.__samplerDirty = true;
		}
		return this.lodBias = value;
	},
	set_magFilter: function(value) {
		if(this.magFilter != value) {
			this.__samplerDirty = true;
		}
		return this.magFilter = value;
	},
	set_maxAniso: function(value) {
		if(this.maxAniso != value) {
			this.__samplerDirty = true;
		}
		return this.maxAniso = value;
	},
	set_minFilter: function(value) {
		if(this.minFilter != value) {
			this.__samplerDirty = true;
		}
		return this.minFilter = value;
	},
	set_wrapModeS: function(value) {
		if(this.wrapModeS != value) {
			this.__samplerDirty = true;
		}
		return this.wrapModeS = value;
	},
	set_wrapModeT: function(value) {
		if(this.wrapModeT != value) {
			this.__samplerDirty = true;
		}
		return this.wrapModeT = value;
	}
};
SamplerState.prototype.__class__ = SamplerState.prototype.constructor = $hxClasses["openfl._internal.formats.agal.SamplerState"] = SamplerState;

// Init



// Statics




// Export

exports.default = SamplerState;