1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---@meta
---@alias TextureFormat
--- |"r8"
--- |"r16"
--- |"r32f"
--- |"rg8"
--- |"rg16"
--- |"rg32f"
--- |"rgba8"
--- |"rgba16"
--- |"rgba32f"
---@class (exact) Texture: TextureMethods
---@class TextureClass: TextureMethods
local module =
---@class TextureMethods
local methods =
---The default texture (a 1x1 white pixel).
---@return Texture
---@nodiscard
---Create a new texture from the provided image. If the image is an RGB format,
---then an RGBA-equivalent texture will be created.
---@param img Image
---@return Texture
---@nodiscard
-- ---Uploads pixels from the image to the texture. The image format must be the texture
-- ---format's equivalent (meaning RGB images will always throw an error if used here).
-- ---@param self Texture
-- ---@param img Image
-- function methods.set_pixels(self, img) end
-- ---The texture ID.
-- ---@param self Texture
-- ---@return Guid
-- ---@nodiscard
-- function methods.id(self) end
---Size of the texture.
---@param self Texture
---@return Vec2
---@nodiscard
---Width of the texture.
---@param self Texture
---@return integer
---@nodiscard
---Height of the texture.
---@param self Texture
---@return integer
---@nodiscard
---The texture format.
---@param self Texture
---@return TextureFormat
---@nodiscard
return module