MTLSamplerMinMagFilter TranslateMinFilter(MgFilter filter) { switch (filter) { default: throw new NotSupportedException(); case MgFilter.LINEAR: return(MTLSamplerMinMagFilter.Linear); case MgFilter.NEAREST: return(MTLSamplerMinMagFilter.Nearest); } }
private static All GetMagFilterValue(MgFilter filter) { switch (filter) { case MgFilter.LINEAR: return(All.Linear); case MgFilter.NEAREST: return(All.Nearest); default: throw new NotSupportedException(); } }
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(); } }
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); }
public void CmdBlitImage(IMgImage srcImage, MgImageLayout srcImageLayout, IMgImage dstImage, MgImageLayout dstImageLayout, MgImageBlit[] pRegions, MgFilter filter) { throw new NotImplementedException(); }
public void SetTextureMagFilter(int samplerId, MgFilter magFilter) { GL.SamplerParameter(samplerId, SamplerParameterName.TextureMagFilter, (int)GetMagFilterValue(magFilter)); mErrHandler.LogGLError("SamplerParameter (TextureMagFilter)"); }
public void SetTextureMinFilter(int samplerId, MgFilter minFilter, MgSamplerMipmapMode mipmapMode) { GL.SamplerParameter(samplerId, SamplerParameterName.TextureMinFilter, (int)GetMinFilterValue(minFilter, mipmapMode)); mErrHandler.LogGLError("SamplerParameter (TextureMinFilter)"); }