private InternalSamplerState GetInternalState(bool mipmap) { if (mipmap) { return(_mipmapState ?? (_mipmapState = CreateInternalState(mipmap))); } else { return(_noMipmapState ?? (_noMipmapState = CreateInternalState(mipmap))); } }
public void Apply(int textureUnit, bool mipmap) { InternalSamplerState internalState = GetInternalState(mipmap); internalState.Bind(textureUnit); }