Falco Engine 3.9.0.1 (beta)
Texture.cs
Go to the documentation of this file.
1using System;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5namespace FalcoEngine
6{
7 public class Texture : Asset
8 {
12 public int width { [MethodImpl(MethodImplOptions.InternalCall)] get; }
13
17 public int height { [MethodImpl(MethodImplOptions.InternalCall)] get; }
18
24 public static Texture Load(string name)
25 {
26 return INTERNAL_load(name);
27 }
28
36 public static Texture FromBytesRGBA8(sbyte[] data, int width, int height)
37 {
38 return INTERNAL_fromBytesRGBA8(data, width, height);
39 }
40
41 [MethodImpl(MethodImplOptions.InternalCall)]
42 private static extern Texture INTERNAL_load(string path);
43
44 [MethodImpl(MethodImplOptions.InternalCall)]
45 private static extern Texture INTERNAL_fromBytesRGBA8(sbyte[] data, int width, int height);
46 }
47}
string name
Get asset name
Definition: Asset.cs:16
int height
Get texture height
Definition: Texture.cs:17
static Texture Load(string name)
Load existing texture
Definition: Texture.cs:24
static Texture FromBytesRGBA8(sbyte[] data, int width, int height)
Create texture from bytes containing RGBA data
Definition: Texture.cs:36
int width
Get texture width
Definition: Texture.cs:12