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
Vec2Desired 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
intDesired width of the texture in pixels.
height
intDesired 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
stringPath to the image.