-
Notifications
You must be signed in to change notification settings - Fork 7
/
constants.go
156 lines (133 loc) · 3.33 KB
/
constants.go
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
package opengl
// Buffer Bits
// nolint: golint,megacheck
const (
DEPTH_BUFFER_BIT uint32 = 0x00000100
STENCIL_BUFFER_BIT = 0x00000400
COLOR_BUFFER_BIT = 0x00004000
)
// Draw Types
// nolint: golint,megacheck
const (
POINTS uint32 = 0x0000
LINES = 0x0001
LINE_LOOP = 0x0002
LINE_STRIP = 0x0003
TRIANGLES = 0x0004
TRIANGLE_STRIP = 0x0005
TRIANGLE_FAN = 0x0006
)
// Shader Types
// nolint: golint,megacheck
const (
FRAGMENT_SHADER uint32 = 0x8B30
VERTEX_SHADER = 0x8B31
)
// Status Values
// nolint: golint,megacheck
const (
COMPILE_STATUS uint32 = 0x8B81
LINK_STATUS = 0x8B82
)
// Buffer Types
// nolint: golint,megacheck
const (
ARRAY_BUFFER uint32 = 0x8892
ELEMENT_ARRAY_BUFFER = 0x8893
)
// Framebuffer Types
// nolint: golint,megacheck
const (
FRAMEBUFFER = 0x8D40
RENDERBUFFER = 0x8D41
DEPTH_COMPONENT24 = 0x81A6
COLOR_ATTACHMENT0 = 0x8CE0
DEPTH_ATTACHMENT = 0x8D00
)
// Draw Types
// nolint: golint,megacheck
const (
STREAM_DRAW uint32 = 0x88E0
STATIC_DRAW = 0x88E4
DYNAMIC_DRAW = 0x88E8
)
// Features
// nolint: golint,megacheck
const (
BLEND uint32 = 0x0BE2
DEPTH_TEST = 0x0B71
CULL_FACE = 0x0B44
SCISSOR_TEST = 0x0C11
NICEST = 0x1102
LINE_SMOOTH = 0x0B20
LINE_SMOOTH_HINT = 0x0C52
ACTIVE_TEXTURE = 0x84E0
CURRENT_PROGRAM = 0x8B8D
TEXTURE_BINDING_2D = 0x8069
SAMPLER_BINDING = 0x8919
ARRAY_BUFFER_BINDING = 0x8894
ELEMENT_ARRAY_BUFFER_BINDING = 0x8895
VERTEX_ARRAY_BINDING = 0x85B5
POLYGON_MODE = 0x0B40
VIEWPORT = 0x0BA2
SCISSOR_BOX = 0x0C10
BLEND_SRC_RGB = 0x80C9
BLEND_DST_RGB = 0x80C8
BLEND_SRC_ALPHA = 0x80CB
BLEND_DST_ALPHA = 0x80CA
BLEND_EQUATION_RGB = 0x8009
BLEND_EQUATION_ALPHA = 0x883D
FRONT_AND_BACK = 0x0408
FILL = 0x1B02
)
// Alpha constants
// nolint: golint,megacheck
const (
SRC_ALPHA uint32 = 0x0302
ONE_MINUS_SRC_ALPHA = 0x0303
ONE_MINUS_SRC_COLOR = 0x0301
FUNC_ADD = 0x8006
)
// Data Types
// nolint: golint,megacheck
const (
BYTE uint32 = 0x1400
UNSIGNED_BYTE = 0x1401
SHORT = 0x1402
UNSIGNED_SHORT = 0x1403
INT = 0x1404
UNSIGNED_INT = 0x1405
FLOAT = 0x1406
)
// Texture Constants
// nolint: golint,megacheck
const (
TEXTURE_2D uint32 = 0x0DE1
TEXTURE0 = 0x84C0
NEAREST = 0x2600
TEXTURE_MAG_FILTER = 0x2800
TEXTURE_MIN_FILTER = 0x2801
UNPACK_ROW_LENGTH = 0x0CF2
LINEAR = 0x2601
)
// Errors
// nolint: golint,megacheck
const (
NO_ERROR uint32 = 0
INVALID_ENUM = 0x0500
INVALID_VALUE = 0x0501
INVALID_OPERATION = 0x0502
STACK_OVERFLOW = 0x0503
STACK_UNDERFLOW = 0x0504
OUT_OF_MEMORY = 0x0505
INVALID_FRAMEBUFFER_OPERATION = 0x0506
)
// Color Types
// nolint: golint,megacheck
const (
ALPHA uint32 = 0x1906
RGBA = 0x1908
RED = 0x1903
RGBA8 = 0x8058
R8 = 0x8229
)