Exemple #1
0
        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();
            }
        }
Exemple #2
0
        MTLSamplerMipFilter TranslateMipFilter(MgSamplerMipmapMode mode)
        {
            switch (mode)
            {
            default:
                throw new NotSupportedException();

            case MgSamplerMipmapMode.LINEAR:
                return(MTLSamplerMipFilter.Linear);

            case MgSamplerMipmapMode.NEAREST:
                return(MTLSamplerMipFilter.Nearest);
            }
        }
Exemple #3
0
 public void SetTextureMinFilter(int samplerId, MgFilter minFilter, MgSamplerMipmapMode mipmapMode)
 {
     GL.SamplerParameter(samplerId, SamplerParameterName.TextureMinFilter, (int)GetMinFilterValue(minFilter, mipmapMode));
     mErrHandler.LogGLError("SamplerParameter (TextureMinFilter)");
 }