Beispiel #1
0
        public static All GetGLTextureFilter(TextureFilter filter, TextureMipmapMode mipmapMode)
        {
            switch (filter)
            {
            case TextureFilter.Linear:
                switch (mipmapMode)
                {
                case TextureMipmapMode.Linear:
                    return(All.LinearMipmapLinear);

                case TextureMipmapMode.Nearest:
                    return(All.LinearMipmapNearest);

                default:
                    throw new ArgumentException(nameof(mipmapMode));
                }

            case TextureFilter.Nearest:
                switch (mipmapMode)
                {
                case TextureMipmapMode.Linear:
                    return(All.NearestMipmapLinear);

                case TextureMipmapMode.Nearest:
                    return(All.NearestMipmapNearest);

                default:
                    throw new ArgumentException(nameof(mipmapMode));
                }

            default:
                throw new ArgumentException(nameof(filter));
            }
        }
Beispiel #2
0
 public TextureConfig(TextureExpansionMode expansionMode,
                      TextureShrinkMode shrinkMode,
                      TextureMipmapMode mipmapMode,
                      TextureWrapMode wrapModeX,
                      TextureWrapMode wrapModeY)
 {
     ExpansionMode = expansionMode;
     ShrinkMode    = shrinkMode;
     MipmapMode    = mipmapMode;
     WrapModeX     = wrapModeX;
     WrapModeY     = wrapModeY;
 }
Beispiel #3
0
        private static SharpVulkan.SamplerMipmapMode GetVKSamplerMipmapMode(TextureMipmapMode mode)
        {
            switch (mode)
            {
            case TextureMipmapMode.Linear:
                return(SharpVulkan.SamplerMipmapMode.Linear);

            case TextureMipmapMode.Nearest:
                return(SharpVulkan.SamplerMipmapMode.Nearest);

            default:
                throw new ArgumentException(nameof(mode));
            }
        }