Search Results for

    Show / Hide Table of Contents

    Class WGPUExtensionsMethods

    Extensions methods used to convert values from Evergine to WebGPU.

    Inheritance
    object
    WGPUExtensionsMethods
    Namespace: Evergine.WebGPU
    Assembly: Evergine.WebGPU.dll
    Syntax
    public static class WGPUExtensionsMethods

    Methods

    FromWGPU(WGPUTextureFormat)

    Converts to Evergine pixel format.

    Declaration
    public static PixelFormat FromWGPU(this WGPUTextureFormat format)
    Parameters
    Type Name Description
    WGPUTextureFormat format

    The format to convert.

    Returns
    Type Description
    PixelFormat

    The Evergine format.

    ToWGPU(Blend)

    Converts to native blendfactor.

    Declaration
    public static WGPUBlendFactor ToWGPU(this Blend blend)
    Parameters
    Type Name Description
    Blend blend

    The value to convert.

    Returns
    Type Description
    WGPUBlendFactor

    The native value.

    ToWGPU(BlendOperation)

    Converts to native blend operation.

    Declaration
    public static WGPUBlendOperation ToWGPU(this BlendOperation operation)
    Parameters
    Type Name Description
    BlendOperation operation

    The value to convert.

    Returns
    Type Description
    WGPUBlendOperation

    The native value.

    ToWGPU(ColorWriteChannels)

    Converts from ColorWriteChannels enum to WGPUColorWriteMask.

    Declaration
    public static WGPUColorWriteMask ToWGPU(this ColorWriteChannels writeChannels)
    Parameters
    Type Name Description
    ColorWriteChannels writeChannels

    Value to convert.

    Returns
    Type Description
    WGPUColorWriteMask

    The converted valued.

    ToWGPU(ComparisonFunction)

    Converts to WGPU compareFunction.

    Declaration
    public static WGPUCompareFunction ToWGPU(this ComparisonFunction function)
    Parameters
    Type Name Description
    ComparisonFunction function

    The value to convert.

    Returns
    Type Description
    WGPUCompareFunction

    The native value.

    ToWGPU(CullMode)

    Converts to native CullMode.

    Declaration
    public static WGPUCullMode ToWGPU(this CullMode cullMode)
    Parameters
    Type Name Description
    CullMode cullMode

    The value to convert.

    Returns
    Type Description
    WGPUCullMode

    The native value.

    ToWGPU(ElementFormat)

    To convert from VertexElementFormat to WGPU format.

    Declaration
    public static WGPUVertexFormat ToWGPU(this ElementFormat format)
    Parameters
    Type Name Description
    ElementFormat format

    The format to convert.

    Returns
    Type Description
    WGPUVertexFormat

    The result WebGPU format.

    ToWGPU(IndexFormat)

    Converts from IndexFormat to WGPUIndexFormat.

    Declaration
    public static WGPUIndexFormat ToWGPU(this IndexFormat format)
    Parameters
    Type Name Description
    IndexFormat format

    Evergine index format.

    Returns
    Type Description
    WGPUIndexFormat

    WebGPU index format.

    ToWGPU(MapMode)

    Converts from MapMode to WGPUMapMode.

    Declaration
    public static WGPUMapMode ToWGPU(this MapMode mapMode)
    Parameters
    Type Name Description
    MapMode mapMode

    Evergine map mode.

    Returns
    Type Description
    WGPUMapMode

    WebGPU map mode.

    ToWGPU(PixelFormat, bool)

    Converts to native pixel format.

    Declaration
    public static WGPUTextureFormat ToWGPU(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
    WGPUTextureFormat

    The native WebGPU format.

    ToWGPU(PrimitiveTopology)

    Converts to native primiteTopology.

    Declaration
    public static WGPUPrimitiveTopology ToWGPU(this PrimitiveTopology primitive)
    Parameters
    Type Name Description
    PrimitiveTopology primitive

    The primitive topology to converts.

    Returns
    Type Description
    WGPUPrimitiveTopology

    The native primitive topology.

    ToWGPU(ShaderStages)

    Converts from ShaderStages to WGPUShaderStage.

    Declaration
    public static WGPUShaderStage ToWGPU(this ShaderStages stages)
    Parameters
    Type Name Description
    ShaderStages stages

    Evergine shader stages.

    Returns
    Type Description
    WGPUShaderStage

    WebGPU shader stage.

    ToWGPU(StencilOperation)

    Converts to native stencil operation.

    Declaration
    public static WGPUStencilOperation ToWGPU(this StencilOperation operation)
    Parameters
    Type Name Description
    StencilOperation operation

    The value to convert.

    Returns
    Type Description
    WGPUStencilOperation

    The native value.

    ToWGPU(TextureAddressMode)

    Converts to WGPU sampler address mode.

    Declaration
    public static WGPUAddressMode ToWGPU(this TextureAddressMode addressMode)
    Parameters
    Type Name Description
    TextureAddressMode addressMode

    The address mode to convert.

    Returns
    Type Description
    WGPUAddressMode

    The native addressMode.

    ToWGPU(TextureFilter, out WGPUFilterMode, out WGPUFilterMode, out WGPUMipmapFilterMode)

    Converts to native WGPU minFilter, MagFilter and SamplerMipmapMode.

    Declaration
    public static void ToWGPU(this TextureFilter filter, out WGPUFilterMode minFilter, out WGPUFilterMode magFilter, out WGPUMipmapFilterMode mipmapMode)
    Parameters
    Type Name Description
    TextureFilter filter

    The texture filter to convert.

    WGPUFilterMode minFilter

    The native minFilter.

    WGPUFilterMode magFilter

    The native magFilter.

    WGPUMipmapFilterMode mipmapMode

    The native mipmapMode.

    ToWGPU(TextureSampleCount)

    To convert from TextureSampleCount to WGPU SampleDescription.

    Declaration
    public static uint ToWGPU(this TextureSampleCount sampleCount)
    Parameters
    Type Name Description
    TextureSampleCount sampleCount

    The TextureSampleCount to convert.

    Returns
    Type Description
    uint

    The SampleDescription value.

    ToWGPU(TextureType)

    Converts to native texture dimension format.

    Declaration
    public static WGPUTextureDimension ToWGPU(this TextureType type)
    Parameters
    Type Name Description
    TextureType type

    The type to convert.

    Returns
    Type Description
    WGPUTextureDimension

    The native texture dimension.

    ToWGPU(VertexStepFunction)

    Converts to WGPU VertexStepMode enum.

    Declaration
    public static WGPUVertexStepMode ToWGPU(this VertexStepFunction stepFunction)
    Parameters
    Type Name Description
    VertexStepFunction stepFunction

    The value to convert.

    Returns
    Type Description
    WGPUVertexStepMode

    The native value.

    ToWGPUView(TextureType)

    Converts to native texture view dimension format.

    Declaration
    public static WGPUTextureViewDimension ToWGPUView(this TextureType type)
    Parameters
    Type Name Description
    TextureType type

    The type to convert.

    Returns
    Type Description
    WGPUTextureViewDimension

    The native texture view dimension.

    In this article
    Back to top
    Generated by DocFX