Simple3D
Search Results for

    Show / Hide Table of Contents

    Class Texture2D

    Immutable opaque image. Pixels are top-to-bottom ARGB; UV (0,0) is the bottom-left corner.

    Inheritance
    object
    Texture2D
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Simple3D.Core
    Assembly: Simple3D.Core.dll
    Syntax
    public sealed class Texture2D

    Constructors

    | Edit this page View Source

    Texture2D(int, int, IEnumerable<uint>, TextureFilter, TextureAddressMode)

    Copies exactly width * height opaque pixels. Sizes, pixels and sampler settings are validated.

    Declaration
    public Texture2D(int width, int height, IEnumerable<uint> pixels, TextureFilter filter = TextureFilter.Nearest, TextureAddressMode addressMode = TextureAddressMode.Clamp)
    Parameters
    Type Name Description
    int width
    int height
    IEnumerable<uint> pixels
    TextureFilter filter
    TextureAddressMode addressMode

    Fields

    | Edit this page View Source

    MaximumDimension

    Maximum width or height accepted for an image.

    Declaration
    public const int MaximumDimension = 4096
    Field Value
    Type Description
    int

    Properties

    | Edit this page View Source

    AddressMode

    Addressing shared by both axes.

    Declaration
    public TextureAddressMode AddressMode { get; }
    Property Value
    Type Description
    TextureAddressMode
    | Edit this page View Source

    Filter

    Sampling filter.

    Declaration
    public TextureFilter Filter { get; }
    Property Value
    Type Description
    TextureFilter
    | Edit this page View Source

    Height

    Image height in pixels.

    Declaration
    public int Height { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Pixels

    Copied row-major pixels packed as 0xFFRRGGBB.

    Declaration
    public IReadOnlyList<uint> Pixels { get; }
    Property Value
    Type Description
    IReadOnlyList<uint>
    | Edit this page View Source

    Width

    Image width in pixels.

    Declaration
    public int Width { get; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    Sample(float, float)

    Samples an opaque color at finite UV coordinates.

    Declaration
    public uint Sample(float u, float v)
    Parameters
    Type Name Description
    float u
    float v
    Returns
    Type Description
    uint
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX