private static All GetMinFilterValue(MgFilter filter, MgSamplerMipmapMode mode) { switch (filter) { case MgFilter.LINEAR: return((mode == MgSamplerMipmapMode.LINEAR) ? All.LinearMipmapLinear : All.Linear); case MgFilter.NEAREST: return((mode == MgSamplerMipmapMode.LINEAR) ? All.NearestMipmapLinear : All.Nearest); default: throw new NotSupportedException(); } }
MTLSamplerMipFilter TranslateMipFilter(MgSamplerMipmapMode mode) { switch (mode) { default: throw new NotSupportedException(); case MgSamplerMipmapMode.LINEAR: return(MTLSamplerMipFilter.Linear); case MgSamplerMipmapMode.NEAREST: return(MTLSamplerMipFilter.Nearest); } }
public void SetTextureMinFilter(int samplerId, MgFilter minFilter, MgSamplerMipmapMode mipmapMode) { GL.SamplerParameter(samplerId, SamplerParameterName.TextureMinFilter, (int)GetMinFilterValue(minFilter, mipmapMode)); mErrHandler.LogGLError("SamplerParameter (TextureMinFilter)"); }