示例#1
0
        MTLSamplerMinMagFilter TranslateMinFilter(MgFilter filter)
        {
            switch (filter)
            {
            default:
                throw new NotSupportedException();

            case MgFilter.LINEAR:
                return(MTLSamplerMinMagFilter.Linear);

            case MgFilter.NEAREST:
                return(MTLSamplerMinMagFilter.Nearest);
            }
        }
示例#2
0
        private static All GetMagFilterValue(MgFilter filter)
        {
            switch (filter)
            {
            case MgFilter.LINEAR:
                return(All.Linear);

            case MgFilter.NEAREST:
                return(All.Nearest);

            default:
                throw new NotSupportedException();
            }
        }
示例#3
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();
            }
        }
示例#4
0
        public void CmdBlitImage(IMgImage srcImage, MgImageLayout srcImageLayout, IMgImage dstImage, MgImageLayout dstImageLayout, MgImageBlit[] pRegions, MgFilter filter)
        {
            var bSrcImage = (VkImage)srcImage;

            Debug.Assert(bSrcImage != null);
            var bDstImage = (VkImage)dstImage;

            Debug.Assert(bDstImage != null);

            Interops.vkCmdBlitImage(this.Handle, bSrcImage.Handle, srcImageLayout, bDstImage.Handle, dstImageLayout, (uint)pRegions.Length, pRegions, (VkFilter)filter);
        }
示例#5
0
 public void CmdBlitImage(IMgImage srcImage, MgImageLayout srcImageLayout, IMgImage dstImage, MgImageLayout dstImageLayout, MgImageBlit[] pRegions, MgFilter filter)
 {
     throw new NotImplementedException();
 }
示例#6
0
 public void SetTextureMagFilter(int samplerId, MgFilter magFilter)
 {
     GL.SamplerParameter(samplerId, SamplerParameterName.TextureMagFilter, (int)GetMagFilterValue(magFilter));
     mErrHandler.LogGLError("SamplerParameter (TextureMagFilter)");
 }
示例#7
0
 public void SetTextureMinFilter(int samplerId, MgFilter minFilter, MgSamplerMipmapMode mipmapMode)
 {
     GL.SamplerParameter(samplerId, SamplerParameterName.TextureMinFilter, (int)GetMinFilterValue(minFilter, mipmapMode));
     mErrHandler.LogGLError("SamplerParameter (TextureMinFilter)");
 }