Table of Contents

Class Texture

Namespace
RenderSharp
Assembly
RenderSharp.dll

A texture that can be assigned to objects within a scene.

public class Texture
Inheritance
Texture
Inherited Members

Constructors

Texture(Vec2, RGBA?)

Constructs a texture with the given dimensions and color.

public Texture(Vec2 size, RGBA? color = null)

Parameters

size Vec2

Desired width and height of the texture in pixels.

color RGBA?

Optional color to fill the texture. Defaults to alpha-opaque black.

Texture(int, int, RGBA?)

Constructs an alpha opaque texture with the given dimensions and color.

public Texture(int width, int height, RGBA? color = null)

Parameters

width int

Desired width of the texture in pixels.

height int

Desired height of the texture in pixels.

color RGBA?

Optional color to fill the texture. Defaults to black.

Texture(string)

Constructs a texture using an image on disk supported by https://imagemagick.org.

public Texture(string filename)

Parameters

filename string

Path to the image.