Search Results for

    Show / Hide Table of Contents

    Class MTLExtensionsMethods

    Extensions methods used to convert valuesfrom Evergineto DirectX.

    Inheritance
    object
    MTLExtensionsMethods
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Evergine.Metal
    Assembly: Evergine.Metal.dll
    Syntax
    public static class MTLExtensionsMethods

    Methods

    FromMetal(MTLPixelFormat)

    Converts to Evergine pixel format.

    Declaration
    public static PixelFormat FromMetal(this MTLPixelFormat format)
    Parameters
    Type Name Description
    MTLPixelFormat format

    The format to convert.

    Returns
    Type Description
    PixelFormat

    The Evergine format.

    ToMetal(Blend)

    Converts to native blendfactor.

    Declaration
    public static MTLBlendFactor ToMetal(this Blend blend)
    Parameters
    Type Name Description
    Blend blend

    The value to convert.

    Returns
    Type Description
    MTLBlendFactor

    The native value.

    ToMetal(BlendOperation)

    Converts to native blend operation.

    Declaration
    public static MTLBlendOperation ToMetal(this BlendOperation operation)
    Parameters
    Type Name Description
    BlendOperation operation

    The value to convert.

    Returns
    Type Description
    MTLBlendOperation

    The native value.

    ToMetal(ComparisonFunction)

    Converts to metal compareFunction.

    Declaration
    public static MTLCompareFunction ToMetal(this ComparisonFunction function)
    Parameters
    Type Name Description
    ComparisonFunction function

    The value to convert.

    Returns
    Type Description
    MTLCompareFunction

    The native value.

    ToMetal(CullMode)

    Converts to native CullMode.

    Declaration
    public static MTLCullMode ToMetal(this CullMode cullMode)
    Parameters
    Type Name Description
    CullMode cullMode

    The value to convert.

    Returns
    Type Description
    MTLCullMode

    The native value.

    ToMetal(ElementFormat)

    To convert from VertexElementFormat to Metal format.

    Declaration
    public static MTLVertexFormat ToMetal(this ElementFormat format)
    Parameters
    Type Name Description
    ElementFormat format

    The format to convert.

    Returns
    Type Description
    MTLVertexFormat

    The result Metal format.

    ToMetal(PixelFormat, bool)

    Converts to native pixel format.

    Declaration
    public static MTLPixelFormat ToMetal(this PixelFormat format, bool depthFormat)
    Parameters
    Type Name Description
    PixelFormat format

    The format to convert.

    bool depthFormat

    Whether is a depth texture.

    Returns
    Type Description
    MTLPixelFormat

    The native Metal format.

    ToMetal(PrimitiveTopology)

    Converts to native primiteTopology.

    Declaration
    public static MTLPrimitiveType ToMetal(this PrimitiveTopology primitive)
    Parameters
    Type Name Description
    PrimitiveTopology primitive

    The primitive topology to converts.

    Returns
    Type Description
    MTLPrimitiveType

    The native primitive topology.

    ToMetal(SamplerBorderColor)

    Converts to native bordercolor.

    Declaration
    public static MTLSamplerBorderColor ToMetal(this SamplerBorderColor borderColor)
    Parameters
    Type Name Description
    SamplerBorderColor borderColor

    The value to convert.

    Returns
    Type Description
    MTLSamplerBorderColor

    The MTLSamplerBorderColor value.

    ToMetal(StencilOperation)

    Converts to native stencil operation.

    Declaration
    public static MTLStencilOperation ToMetal(this StencilOperation operation)
    Parameters
    Type Name Description
    StencilOperation operation

    The value to convert.

    Returns
    Type Description
    MTLStencilOperation

    The native value.

    ToMetal(TextureAddressMode)

    Converts to Metal sampler address mode.

    Declaration
    public static MTLSamplerAddressMode ToMetal(this TextureAddressMode addressMode)
    Parameters
    Type Name Description
    TextureAddressMode addressMode

    The address mode to convert.

    Returns
    Type Description
    MTLSamplerAddressMode

    The native addressMode.

    ToMetal(TextureFilter, out MTLSamplerMinMagFilter, out MTLSamplerMinMagFilter, out MTLSamplerMipFilter)

    Converts to native Vulkan minFilter, MagFilter and SamplerMipmapMode.

    Declaration
    public static void ToMetal(this TextureFilter filter, out MTLSamplerMinMagFilter minFilter, out MTLSamplerMinMagFilter magFilter, out MTLSamplerMipFilter mipmapMode)
    Parameters
    Type Name Description
    TextureFilter filter

    The texture filter to convert.

    MTLSamplerMinMagFilter minFilter

    The native minFilter.

    MTLSamplerMinMagFilter magFilter

    The native magFilter.

    MTLSamplerMipFilter mipmapMode

    The native mipmapMode.

    ToMetal(TextureSampleCount)

    To convert from TextureSampleCount to DirectX SampleDescription.

    Declaration
    public static UIntPtr ToMetal(this TextureSampleCount sampleCount)
    Parameters
    Type Name Description
    TextureSampleCount sampleCount

    The TextureSampleCount to convert.

    Returns
    Type Description
    UIntPtr

    The SampleDescription value.

    ToMetal(VertexStepFunction)

    Converts to Metal InputClassification enum.

    Declaration
    public static MTLVertexStepFunction ToMetal(this VertexStepFunction stepFunction)
    Parameters
    Type Name Description
    VertexStepFunction stepFunction

    The value to convert.

    Returns
    Type Description
    MTLVertexStepFunction

    The native value.

    In This Article
    Back to top
    Generated by DocFX