raylib-bindings 0.2.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/rlgl.rb CHANGED
@@ -1,1100 +1,1141 @@
1
- # Yet another raylib wrapper for Ruby
2
- #
3
- # * https://github.com/vaiorabbit/raylib-bindings
4
- #
5
- # [NOTICE] Autogenerated. Do not edit.
6
-
7
- require 'ffi'
8
-
9
- module Raylib
10
- extend FFI::Library
11
-
12
- # Define/Macro
13
-
14
- RLGL_VERSION = "4.0"
15
- RL_DEFAULT_BATCH_BUFFER_ELEMENTS = 8192
16
- RL_TEXTURE_WRAP_S = 0x2802 # GL_TEXTURE_WRAP_S
17
- RL_TEXTURE_WRAP_T = 0x2803 # GL_TEXTURE_WRAP_T
18
- RL_TEXTURE_MAG_FILTER = 0x2800 # GL_TEXTURE_MAG_FILTER
19
- RL_TEXTURE_MIN_FILTER = 0x2801 # GL_TEXTURE_MIN_FILTER
20
- RL_TEXTURE_FILTER_NEAREST = 0x2600 # GL_NEAREST
21
- RL_TEXTURE_FILTER_LINEAR = 0x2601 # GL_LINEAR
22
- RL_TEXTURE_FILTER_MIP_NEAREST = 0x2700 # GL_NEAREST_MIPMAP_NEAREST
23
- RL_TEXTURE_FILTER_NEAREST_MIP_LINEAR = 0x2702 # GL_NEAREST_MIPMAP_LINEAR
24
- RL_TEXTURE_FILTER_LINEAR_MIP_NEAREST = 0x2701 # GL_LINEAR_MIPMAP_NEAREST
25
- RL_TEXTURE_FILTER_MIP_LINEAR = 0x2703 # GL_LINEAR_MIPMAP_LINEAR
26
- RL_TEXTURE_FILTER_ANISOTROPIC = 0x3000 # Anisotropic filter (custom identifier)
27
- RL_TEXTURE_MIPMAP_BIAS_RATIO = 0x4000 # Texture mipmap bias, percentage ratio (custom identifier)
28
- RL_TEXTURE_WRAP_REPEAT = 0x2901 # GL_REPEAT
29
- RL_TEXTURE_WRAP_CLAMP = 0x812F # GL_CLAMP_TO_EDGE
30
- RL_TEXTURE_WRAP_MIRROR_REPEAT = 0x8370 # GL_MIRRORED_REPEAT
31
- RL_TEXTURE_WRAP_MIRROR_CLAMP = 0x8742 # GL_MIRROR_CLAMP_EXT
32
- RL_MODELVIEW = 0x1700 # GL_MODELVIEW
33
- RL_PROJECTION = 0x1701 # GL_PROJECTION
34
- RL_TEXTURE = 0x1702 # GL_TEXTURE
35
- RL_LINES = 0x0001 # GL_LINES
36
- RL_TRIANGLES = 0x0004 # GL_TRIANGLES
37
- RL_QUADS = 0x0007 # GL_QUADS
38
- RL_UNSIGNED_BYTE = 0x1401 # GL_UNSIGNED_BYTE
39
- RL_FLOAT = 0x1406 # GL_FLOAT
40
- RL_STREAM_DRAW = 0x88E0 # GL_STREAM_DRAW
41
- RL_STREAM_READ = 0x88E1 # GL_STREAM_READ
42
- RL_STREAM_COPY = 0x88E2 # GL_STREAM_COPY
43
- RL_STATIC_DRAW = 0x88E4 # GL_STATIC_DRAW
44
- RL_STATIC_READ = 0x88E5 # GL_STATIC_READ
45
- RL_STATIC_COPY = 0x88E6 # GL_STATIC_COPY
46
- RL_DYNAMIC_DRAW = 0x88E8 # GL_DYNAMIC_DRAW
47
- RL_DYNAMIC_READ = 0x88E9 # GL_DYNAMIC_READ
48
- RL_DYNAMIC_COPY = 0x88EA # GL_DYNAMIC_COPY
49
- RL_FRAGMENT_SHADER = 0x8B30 # GL_FRAGMENT_SHADER
50
- RL_VERTEX_SHADER = 0x8B31 # GL_VERTEX_SHADER
51
- RL_COMPUTE_SHADER = 0x91B9 # GL_COMPUTE_SHADER
52
- RL_ZERO = 0 # GL_ZERO
53
- RL_ONE = 1 # GL_ONE
54
- RL_SRC_COLOR = 0x0300 # GL_SRC_COLOR
55
- RL_ONE_MINUS_SRC_COLOR = 0x0301 # GL_ONE_MINUS_SRC_COLOR
56
- RL_SRC_ALPHA = 0x0302 # GL_SRC_ALPHA
57
- RL_ONE_MINUS_SRC_ALPHA = 0x0303 # GL_ONE_MINUS_SRC_ALPHA
58
- RL_DST_ALPHA = 0x0304 # GL_DST_ALPHA
59
- RL_ONE_MINUS_DST_ALPHA = 0x0305 # GL_ONE_MINUS_DST_ALPHA
60
- RL_DST_COLOR = 0x0306 # GL_DST_COLOR
61
- RL_ONE_MINUS_DST_COLOR = 0x0307 # GL_ONE_MINUS_DST_COLOR
62
- RL_SRC_ALPHA_SATURATE = 0x0308 # GL_SRC_ALPHA_SATURATE
63
- RL_CONSTANT_COLOR = 0x8001 # GL_CONSTANT_COLOR
64
- RL_ONE_MINUS_CONSTANT_COLOR = 0x8002 # GL_ONE_MINUS_CONSTANT_COLOR
65
- RL_CONSTANT_ALPHA = 0x8003 # GL_CONSTANT_ALPHA
66
- RL_ONE_MINUS_CONSTANT_ALPHA = 0x8004 # GL_ONE_MINUS_CONSTANT_ALPHA
67
- RL_FUNC_ADD = 0x8006 # GL_FUNC_ADD
68
- RL_FUNC_SUBTRACT = 0x800A # GL_FUNC_SUBTRACT
69
- RL_FUNC_REVERSE_SUBTRACT = 0x800B # GL_FUNC_REVERSE_SUBTRACT
70
- RL_BLEND_EQUATION = 0x8009 # GL_BLEND_EQUATION
71
- RL_BLEND_EQUATION_RGB = 0x8009 # GL_BLEND_EQUATION_RGB // (Same as BLEND_EQUATION)
72
- RL_BLEND_EQUATION_ALPHA = 0x883D # GL_BLEND_EQUATION_ALPHA
73
- RL_BLEND_DST_RGB = 0x80C8 # GL_BLEND_DST_RGB
74
- RL_BLEND_SRC_RGB = 0x80C9 # GL_BLEND_SRC_RGB
75
- RL_BLEND_DST_ALPHA = 0x80CA # GL_BLEND_DST_ALPHA
76
- RL_BLEND_SRC_ALPHA = 0x80CB # GL_BLEND_SRC_ALPHA
77
- RL_BLEND_COLOR = 0x8005 # GL_BLEND_COLOR
78
-
79
- # Enum
80
-
81
- # enum rlGlVersion
82
- # OpenGL version
83
- RL_OPENGL_11 = 1 # OpenGL 1.1
84
- RL_OPENGL_21 = 2 # OpenGL 2.1 (GLSL 120)
85
- RL_OPENGL_33 = 3 # OpenGL 3.3 (GLSL 330)
86
- RL_OPENGL_43 = 4 # OpenGL 4.3 (using GLSL 330)
87
- RL_OPENGL_ES_20 = 5 # OpenGL ES 2.0 (GLSL 100)
88
-
89
- # enum rlTraceLogLevel
90
- # Trace log level
91
- RL_LOG_ALL = 0 # Display all logs
92
- RL_LOG_TRACE = 1 # Trace logging, intended for internal use only
93
- RL_LOG_DEBUG = 2 # Debug logging, used for internal debugging, it should be disabled on release builds
94
- RL_LOG_INFO = 3 # Info logging, used for program execution info
95
- RL_LOG_WARNING = 4 # Warning logging, used on recoverable failures
96
- RL_LOG_ERROR = 5 # Error logging, used on unrecoverable failures
97
- RL_LOG_FATAL = 6 # Fatal logging, used to abort program: exit(EXIT_FAILURE)
98
- RL_LOG_NONE = 7 # Disable logging
99
-
100
- # enum rlPixelFormat
101
- # Texture pixel formats
102
- RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1 # 8 bit per pixel (no alpha)
103
- RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2 # 8*2 bpp (2 channels)
104
- RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3 # 16 bpp
105
- RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4 # 24 bpp
106
- RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5 # 16 bpp (1 bit alpha)
107
- RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6 # 16 bpp (4 bit alpha)
108
- RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7 # 32 bpp
109
- RL_PIXELFORMAT_UNCOMPRESSED_R32 = 8 # 32 bpp (1 channel - float)
110
- RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9 # 32*3 bpp (3 channels - float)
111
- RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10 # 32*4 bpp (4 channels - float)
112
- RL_PIXELFORMAT_COMPRESSED_DXT1_RGB = 11 # 4 bpp (no alpha)
113
- RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12 # 4 bpp (1 bit alpha)
114
- RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13 # 8 bpp
115
- RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14 # 8 bpp
116
- RL_PIXELFORMAT_COMPRESSED_ETC1_RGB = 15 # 4 bpp
117
- RL_PIXELFORMAT_COMPRESSED_ETC2_RGB = 16 # 4 bpp
118
- RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17 # 8 bpp
119
- RL_PIXELFORMAT_COMPRESSED_PVRT_RGB = 18 # 4 bpp
120
- RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19 # 4 bpp
121
- RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20 # 8 bpp
122
- RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21 # 2 bpp
123
-
124
- # enum rlTextureFilter
125
- # Texture parameters: filter mode
126
- RL_TEXTURE_FILTER_POINT = 0 # No filter, just pixel approximation
127
- RL_TEXTURE_FILTER_BILINEAR = 1 # Linear filtering
128
- RL_TEXTURE_FILTER_TRILINEAR = 2 # Trilinear filtering (linear with mipmaps)
129
- RL_TEXTURE_FILTER_ANISOTROPIC_4X = 3 # Anisotropic filtering 4x
130
- RL_TEXTURE_FILTER_ANISOTROPIC_8X = 4 # Anisotropic filtering 8x
131
- RL_TEXTURE_FILTER_ANISOTROPIC_16X = 5 # Anisotropic filtering 16x
132
-
133
- # enum rlBlendMode
134
- # Color blending modes (pre-defined)
135
- RL_BLEND_ALPHA = 0 # Blend textures considering alpha (default)
136
- RL_BLEND_ADDITIVE = 1 # Blend textures adding colors
137
- RL_BLEND_MULTIPLIED = 2 # Blend textures multiplying colors
138
- RL_BLEND_ADD_COLORS = 3 # Blend textures adding colors (alternative)
139
- RL_BLEND_SUBTRACT_COLORS = 4 # Blend textures subtracting colors (alternative)
140
- RL_BLEND_ALPHA_PREMULTIPLY = 5 # Blend premultiplied textures considering alpha
141
- RL_BLEND_CUSTOM = 6 # Blend textures using custom src/dst factors (use rlSetBlendFactors())
142
- RL_BLEND_CUSTOM_SEPARATE = 7 # Blend textures using custom src/dst factors (use rlSetBlendFactorsSeparate())
143
-
144
- # enum rlShaderLocationIndex
145
- # Shader location point type
146
- RL_SHADER_LOC_VERTEX_POSITION = 0 # Shader location: vertex attribute: position
147
- RL_SHADER_LOC_VERTEX_TEXCOORD01 = 1 # Shader location: vertex attribute: texcoord01
148
- RL_SHADER_LOC_VERTEX_TEXCOORD02 = 2 # Shader location: vertex attribute: texcoord02
149
- RL_SHADER_LOC_VERTEX_NORMAL = 3 # Shader location: vertex attribute: normal
150
- RL_SHADER_LOC_VERTEX_TANGENT = 4 # Shader location: vertex attribute: tangent
151
- RL_SHADER_LOC_VERTEX_COLOR = 5 # Shader location: vertex attribute: color
152
- RL_SHADER_LOC_MATRIX_MVP = 6 # Shader location: matrix uniform: model-view-projection
153
- RL_SHADER_LOC_MATRIX_VIEW = 7 # Shader location: matrix uniform: view (camera transform)
154
- RL_SHADER_LOC_MATRIX_PROJECTION = 8 # Shader location: matrix uniform: projection
155
- RL_SHADER_LOC_MATRIX_MODEL = 9 # Shader location: matrix uniform: model (transform)
156
- RL_SHADER_LOC_MATRIX_NORMAL = 10 # Shader location: matrix uniform: normal
157
- RL_SHADER_LOC_VECTOR_VIEW = 11 # Shader location: vector uniform: view
158
- RL_SHADER_LOC_COLOR_DIFFUSE = 12 # Shader location: vector uniform: diffuse color
159
- RL_SHADER_LOC_COLOR_SPECULAR = 13 # Shader location: vector uniform: specular color
160
- RL_SHADER_LOC_COLOR_AMBIENT = 14 # Shader location: vector uniform: ambient color
161
- RL_SHADER_LOC_MAP_ALBEDO = 15 # Shader location: sampler2d texture: albedo (same as: RL_SHADER_LOC_MAP_DIFFUSE)
162
- RL_SHADER_LOC_MAP_METALNESS = 16 # Shader location: sampler2d texture: metalness (same as: RL_SHADER_LOC_MAP_SPECULAR)
163
- RL_SHADER_LOC_MAP_NORMAL = 17 # Shader location: sampler2d texture: normal
164
- RL_SHADER_LOC_MAP_ROUGHNESS = 18 # Shader location: sampler2d texture: roughness
165
- RL_SHADER_LOC_MAP_OCCLUSION = 19 # Shader location: sampler2d texture: occlusion
166
- RL_SHADER_LOC_MAP_EMISSION = 20 # Shader location: sampler2d texture: emission
167
- RL_SHADER_LOC_MAP_HEIGHT = 21 # Shader location: sampler2d texture: height
168
- RL_SHADER_LOC_MAP_CUBEMAP = 22 # Shader location: samplerCube texture: cubemap
169
- RL_SHADER_LOC_MAP_IRRADIANCE = 23 # Shader location: samplerCube texture: irradiance
170
- RL_SHADER_LOC_MAP_PREFILTER = 24 # Shader location: samplerCube texture: prefilter
171
- RL_SHADER_LOC_MAP_BRDF = 25 # Shader location: sampler2d texture: brdf
172
-
173
- # enum rlShaderUniformDataType
174
- # Shader uniform data type
175
- RL_SHADER_UNIFORM_FLOAT = 0 # Shader uniform type: float
176
- RL_SHADER_UNIFORM_VEC2 = 1 # Shader uniform type: vec2 (2 float)
177
- RL_SHADER_UNIFORM_VEC3 = 2 # Shader uniform type: vec3 (3 float)
178
- RL_SHADER_UNIFORM_VEC4 = 3 # Shader uniform type: vec4 (4 float)
179
- RL_SHADER_UNIFORM_INT = 4 # Shader uniform type: int
180
- RL_SHADER_UNIFORM_IVEC2 = 5 # Shader uniform type: ivec2 (2 int)
181
- RL_SHADER_UNIFORM_IVEC3 = 6 # Shader uniform type: ivec3 (3 int)
182
- RL_SHADER_UNIFORM_IVEC4 = 7 # Shader uniform type: ivec4 (4 int)
183
- RL_SHADER_UNIFORM_SAMPLER2D = 8 # Shader uniform type: sampler2d
184
-
185
- # enum rlShaderAttributeDataType
186
- # Shader attribute data types
187
- RL_SHADER_ATTRIB_FLOAT = 0 # Shader attribute type: float
188
- RL_SHADER_ATTRIB_VEC2 = 1 # Shader attribute type: vec2 (2 float)
189
- RL_SHADER_ATTRIB_VEC3 = 2 # Shader attribute type: vec3 (3 float)
190
- RL_SHADER_ATTRIB_VEC4 = 3 # Shader attribute type: vec4 (4 float)
191
-
192
- # enum rlFramebufferAttachType
193
- # Framebuffer attachment type
194
- RL_ATTACHMENT_COLOR_CHANNEL0 = 0 # Framebuffer attachmment type: color 0
195
- RL_ATTACHMENT_COLOR_CHANNEL1 = 1 # Framebuffer attachmment type: color 1
196
- RL_ATTACHMENT_COLOR_CHANNEL2 = 2 # Framebuffer attachmment type: color 2
197
- RL_ATTACHMENT_COLOR_CHANNEL3 = 3 # Framebuffer attachmment type: color 3
198
- RL_ATTACHMENT_COLOR_CHANNEL4 = 4 # Framebuffer attachmment type: color 4
199
- RL_ATTACHMENT_COLOR_CHANNEL5 = 5 # Framebuffer attachmment type: color 5
200
- RL_ATTACHMENT_COLOR_CHANNEL6 = 6 # Framebuffer attachmment type: color 6
201
- RL_ATTACHMENT_COLOR_CHANNEL7 = 7 # Framebuffer attachmment type: color 7
202
- RL_ATTACHMENT_DEPTH = 100 # Framebuffer attachmment type: depth
203
- RL_ATTACHMENT_STENCIL = 200 # Framebuffer attachmment type: stencil
204
-
205
- # enum rlFramebufferAttachTextureType
206
- # Framebuffer texture attachment type
207
- RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0 # Framebuffer texture attachment type: cubemap, +X side
208
- RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1 # Framebuffer texture attachment type: cubemap, -X side
209
- RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2 # Framebuffer texture attachment type: cubemap, +Y side
210
- RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3 # Framebuffer texture attachment type: cubemap, -Y side
211
- RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4 # Framebuffer texture attachment type: cubemap, +Z side
212
- RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5 # Framebuffer texture attachment type: cubemap, -Z side
213
- RL_ATTACHMENT_TEXTURE2D = 100 # Framebuffer texture attachment type: texture2d
214
- RL_ATTACHMENT_RENDERBUFFER = 200 # Framebuffer texture attachment type: renderbuffer
215
-
216
- # enum rlCullMode
217
- # Face culling mode
218
- RL_CULL_FACE_FRONT = 0
219
- RL_CULL_FACE_BACK = 1
220
-
221
-
222
- # Typedef
223
-
224
- typedef :int, :rlGlVersion
225
- typedef :int, :rlTraceLogLevel
226
- typedef :int, :rlPixelFormat
227
- typedef :int, :rlTextureFilter
228
- typedef :int, :rlBlendMode
229
- typedef :int, :rlShaderLocationIndex
230
- typedef :int, :rlShaderUniformDataType
231
- typedef :int, :rlShaderAttributeDataType
232
- typedef :int, :rlFramebufferAttachType
233
- typedef :int, :rlFramebufferAttachTextureType
234
- typedef :int, :rlCullMode
235
-
236
- # Struct
237
-
238
- # Dynamic vertex buffers (position + texcoords + colors + indices arrays)
239
- class RlVertexBuffer < FFI::Struct
240
- layout(
241
- :elementCount, :int, # Number of elements in the buffer (QUADS)
242
- :vertices, :pointer, # Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
243
- :texcoords, :pointer, # Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
244
- :colors, :pointer, # Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
245
- :indices, :pointer, # Vertex indices (in case vertex data comes indexed) (6 indices per quad)
246
- :vaoId, :uint, # OpenGL Vertex Array Object id
247
- :vboId, [:uint, 4], # OpenGL Vertex Buffer Objects id (4 types of vertex data)
248
- )
249
- end
250
-
251
- # of those state-change happens (this is done in core module)
252
- class RlDrawCall < FFI::Struct
253
- layout(
254
- :mode, :int, # Drawing mode: LINES, TRIANGLES, QUADS
255
- :vertexCount, :int, # Number of vertex of the draw
256
- :vertexAlignment, :int, # Number of vertex required for index alignment (LINES, TRIANGLES)
257
- :textureId, :uint, # Texture id to be used on the draw -> Use to create new draw call if changes
258
- )
259
- end
260
-
261
- # rlRenderBatch type
262
- class RlRenderBatch < FFI::Struct
263
- layout(
264
- :bufferCount, :int, # Number of vertex buffers (multi-buffering support)
265
- :currentBuffer, :int, # Current buffer tracking in case of multi-buffering
266
- :vertexBuffer, :pointer, # Dynamic buffer(s) for vertex data
267
- :draws, :pointer, # Draw calls array, depends on textureId
268
- :drawCounter, :int, # Draw calls counter
269
- :currentDepth, :float, # Current depth value for next draw
270
- )
271
- end
272
-
273
-
274
- # Function
275
-
276
- def self.setup_rlgl_symbols
277
- entries = [
278
-
279
- # rlMatrixMode : Choose the current matrix to be transformed
280
- # @param mode [int]
281
- # @return [void]
282
- [:rlMatrixMode, :rlMatrixMode, [:int], :void],
283
-
284
- # rlPushMatrix : Push the current matrix to stack
285
- # @return [void]
286
- [:rlPushMatrix, :rlPushMatrix, [], :void],
287
-
288
- # rlPopMatrix : Pop lattest inserted matrix from stack
289
- # @return [void]
290
- [:rlPopMatrix, :rlPopMatrix, [], :void],
291
-
292
- # rlLoadIdentity : Reset current matrix to identity matrix
293
- # @return [void]
294
- [:rlLoadIdentity, :rlLoadIdentity, [], :void],
295
-
296
- # rlTranslatef : Multiply the current matrix by a translation matrix
297
- # @param x [float]
298
- # @param y [float]
299
- # @param z [float]
300
- # @return [void]
301
- [:rlTranslatef, :rlTranslatef, [:float, :float, :float], :void],
302
-
303
- # rlRotatef : Multiply the current matrix by a rotation matrix
304
- # @param angle [float]
305
- # @param x [float]
306
- # @param y [float]
307
- # @param z [float]
308
- # @return [void]
309
- [:rlRotatef, :rlRotatef, [:float, :float, :float, :float], :void],
310
-
311
- # rlScalef : Multiply the current matrix by a scaling matrix
312
- # @param x [float]
313
- # @param y [float]
314
- # @param z [float]
315
- # @return [void]
316
- [:rlScalef, :rlScalef, [:float, :float, :float], :void],
317
-
318
- # rlMultMatrixf : Multiply the current matrix by another matrix
319
- # @param matf [const float *]
320
- # @return [void]
321
- [:rlMultMatrixf, :rlMultMatrixf, [:pointer], :void],
322
-
323
- # rlFrustum
324
- # @param left [double]
325
- # @param right [double]
326
- # @param bottom [double]
327
- # @param top [double]
328
- # @param znear [double]
329
- # @param zfar [double]
330
- # @return [void]
331
- [:rlFrustum, :rlFrustum, [:double, :double, :double, :double, :double, :double], :void],
332
-
333
- # rlOrtho
334
- # @param left [double]
335
- # @param right [double]
336
- # @param bottom [double]
337
- # @param top [double]
338
- # @param znear [double]
339
- # @param zfar [double]
340
- # @return [void]
341
- [:rlOrtho, :rlOrtho, [:double, :double, :double, :double, :double, :double], :void],
342
-
343
- # rlViewport : Set the viewport area
344
- # @param x [int]
345
- # @param y [int]
346
- # @param width [int]
347
- # @param height [int]
348
- # @return [void]
349
- [:rlViewport, :rlViewport, [:int, :int, :int, :int], :void],
350
-
351
- # rlBegin : Initialize drawing mode (how to organize vertex)
352
- # @param mode [int]
353
- # @return [void]
354
- [:rlBegin, :rlBegin, [:int], :void],
355
-
356
- # rlEnd : Finish vertex providing
357
- # @return [void]
358
- [:rlEnd, :rlEnd, [], :void],
359
-
360
- # rlVertex2i : Define one vertex (position) - 2 int
361
- # @param x [int]
362
- # @param y [int]
363
- # @return [void]
364
- [:rlVertex2i, :rlVertex2i, [:int, :int], :void],
365
-
366
- # rlVertex2f : Define one vertex (position) - 2 float
367
- # @param x [float]
368
- # @param y [float]
369
- # @return [void]
370
- [:rlVertex2f, :rlVertex2f, [:float, :float], :void],
371
-
372
- # rlVertex3f : Define one vertex (position) - 3 float
373
- # @param x [float]
374
- # @param y [float]
375
- # @param z [float]
376
- # @return [void]
377
- [:rlVertex3f, :rlVertex3f, [:float, :float, :float], :void],
378
-
379
- # rlTexCoord2f : Define one vertex (texture coordinate) - 2 float
380
- # @param x [float]
381
- # @param y [float]
382
- # @return [void]
383
- [:rlTexCoord2f, :rlTexCoord2f, [:float, :float], :void],
384
-
385
- # rlNormal3f : Define one vertex (normal) - 3 float
386
- # @param x [float]
387
- # @param y [float]
388
- # @param z [float]
389
- # @return [void]
390
- [:rlNormal3f, :rlNormal3f, [:float, :float, :float], :void],
391
-
392
- # rlColor4ub : Define one vertex (color) - 4 byte
393
- # @param r [unsigned char]
394
- # @param g [unsigned char]
395
- # @param b [unsigned char]
396
- # @param a [unsigned char]
397
- # @return [void]
398
- [:rlColor4ub, :rlColor4ub, [:uchar, :uchar, :uchar, :uchar], :void],
399
-
400
- # rlColor3f : Define one vertex (color) - 3 float
401
- # @param x [float]
402
- # @param y [float]
403
- # @param z [float]
404
- # @return [void]
405
- [:rlColor3f, :rlColor3f, [:float, :float, :float], :void],
406
-
407
- # rlColor4f : Define one vertex (color) - 4 float
408
- # @param x [float]
409
- # @param y [float]
410
- # @param z [float]
411
- # @param w [float]
412
- # @return [void]
413
- [:rlColor4f, :rlColor4f, [:float, :float, :float, :float], :void],
414
-
415
- # rlEnableVertexArray : Enable vertex array (VAO, if supported)
416
- # @param vaoId [unsigned int]
417
- # @return [bool]
418
- [:rlEnableVertexArray, :rlEnableVertexArray, [:uint], :bool],
419
-
420
- # rlDisableVertexArray : Disable vertex array (VAO, if supported)
421
- # @return [void]
422
- [:rlDisableVertexArray, :rlDisableVertexArray, [], :void],
423
-
424
- # rlEnableVertexBuffer : Enable vertex buffer (VBO)
425
- # @param id [unsigned int]
426
- # @return [void]
427
- [:rlEnableVertexBuffer, :rlEnableVertexBuffer, [:uint], :void],
428
-
429
- # rlDisableVertexBuffer : Disable vertex buffer (VBO)
430
- # @return [void]
431
- [:rlDisableVertexBuffer, :rlDisableVertexBuffer, [], :void],
432
-
433
- # rlEnableVertexBufferElement : Enable vertex buffer element (VBO element)
434
- # @param id [unsigned int]
435
- # @return [void]
436
- [:rlEnableVertexBufferElement, :rlEnableVertexBufferElement, [:uint], :void],
437
-
438
- # rlDisableVertexBufferElement : Disable vertex buffer element (VBO element)
439
- # @return [void]
440
- [:rlDisableVertexBufferElement, :rlDisableVertexBufferElement, [], :void],
441
-
442
- # rlEnableVertexAttribute : Enable vertex attribute index
443
- # @param index [unsigned int]
444
- # @return [void]
445
- [:rlEnableVertexAttribute, :rlEnableVertexAttribute, [:uint], :void],
446
-
447
- # rlDisableVertexAttribute : Disable vertex attribute index
448
- # @param index [unsigned int]
449
- # @return [void]
450
- [:rlDisableVertexAttribute, :rlDisableVertexAttribute, [:uint], :void],
451
-
452
- # rlActiveTextureSlot : Select and active a texture slot
453
- # @param slot [int]
454
- # @return [void]
455
- [:rlActiveTextureSlot, :rlActiveTextureSlot, [:int], :void],
456
-
457
- # rlEnableTexture : Enable texture
458
- # @param id [unsigned int]
459
- # @return [void]
460
- [:rlEnableTexture, :rlEnableTexture, [:uint], :void],
461
-
462
- # rlDisableTexture : Disable texture
463
- # @return [void]
464
- [:rlDisableTexture, :rlDisableTexture, [], :void],
465
-
466
- # rlEnableTextureCubemap : Enable texture cubemap
467
- # @param id [unsigned int]
468
- # @return [void]
469
- [:rlEnableTextureCubemap, :rlEnableTextureCubemap, [:uint], :void],
470
-
471
- # rlDisableTextureCubemap : Disable texture cubemap
472
- # @return [void]
473
- [:rlDisableTextureCubemap, :rlDisableTextureCubemap, [], :void],
474
-
475
- # rlTextureParameters : Set texture parameters (filter, wrap)
476
- # @param id [unsigned int]
477
- # @param param [int]
478
- # @param value [int]
479
- # @return [void]
480
- [:rlTextureParameters, :rlTextureParameters, [:uint, :int, :int], :void],
481
-
482
- # rlEnableShader : Enable shader program
483
- # @param id [unsigned int]
484
- # @return [void]
485
- [:rlEnableShader, :rlEnableShader, [:uint], :void],
486
-
487
- # rlDisableShader : Disable shader program
488
- # @return [void]
489
- [:rlDisableShader, :rlDisableShader, [], :void],
490
-
491
- # rlEnableFramebuffer : Enable render texture (fbo)
492
- # @param id [unsigned int]
493
- # @return [void]
494
- [:rlEnableFramebuffer, :rlEnableFramebuffer, [:uint], :void],
495
-
496
- # rlDisableFramebuffer : Disable render texture (fbo), return to default framebuffer
497
- # @return [void]
498
- [:rlDisableFramebuffer, :rlDisableFramebuffer, [], :void],
499
-
500
- # rlActiveDrawBuffers : Activate multiple draw color buffers
501
- # @param count [int]
502
- # @return [void]
503
- [:rlActiveDrawBuffers, :rlActiveDrawBuffers, [:int], :void],
504
-
505
- # rlEnableColorBlend : Enable color blending
506
- # @return [void]
507
- [:rlEnableColorBlend, :rlEnableColorBlend, [], :void],
508
-
509
- # rlDisableColorBlend : Disable color blending
510
- # @return [void]
511
- [:rlDisableColorBlend, :rlDisableColorBlend, [], :void],
512
-
513
- # rlEnableDepthTest : Enable depth test
514
- # @return [void]
515
- [:rlEnableDepthTest, :rlEnableDepthTest, [], :void],
516
-
517
- # rlDisableDepthTest : Disable depth test
518
- # @return [void]
519
- [:rlDisableDepthTest, :rlDisableDepthTest, [], :void],
520
-
521
- # rlEnableDepthMask : Enable depth write
522
- # @return [void]
523
- [:rlEnableDepthMask, :rlEnableDepthMask, [], :void],
524
-
525
- # rlDisableDepthMask : Disable depth write
526
- # @return [void]
527
- [:rlDisableDepthMask, :rlDisableDepthMask, [], :void],
528
-
529
- # rlEnableBackfaceCulling : Enable backface culling
530
- # @return [void]
531
- [:rlEnableBackfaceCulling, :rlEnableBackfaceCulling, [], :void],
532
-
533
- # rlDisableBackfaceCulling : Disable backface culling
534
- # @return [void]
535
- [:rlDisableBackfaceCulling, :rlDisableBackfaceCulling, [], :void],
536
-
537
- # rlSetCullFace : Set face culling mode
538
- # @param mode [int]
539
- # @return [void]
540
- [:rlSetCullFace, :rlSetCullFace, [:int], :void],
541
-
542
- # rlEnableScissorTest : Enable scissor test
543
- # @return [void]
544
- [:rlEnableScissorTest, :rlEnableScissorTest, [], :void],
545
-
546
- # rlDisableScissorTest : Disable scissor test
547
- # @return [void]
548
- [:rlDisableScissorTest, :rlDisableScissorTest, [], :void],
549
-
550
- # rlScissor : Scissor test
551
- # @param x [int]
552
- # @param y [int]
553
- # @param width [int]
554
- # @param height [int]
555
- # @return [void]
556
- [:rlScissor, :rlScissor, [:int, :int, :int, :int], :void],
557
-
558
- # rlEnableWireMode : Enable wire mode
559
- # @return [void]
560
- [:rlEnableWireMode, :rlEnableWireMode, [], :void],
561
-
562
- # rlDisableWireMode : Disable wire mode
563
- # @return [void]
564
- [:rlDisableWireMode, :rlDisableWireMode, [], :void],
565
-
566
- # rlSetLineWidth : Set the line drawing width
567
- # @param width [float]
568
- # @return [void]
569
- [:rlSetLineWidth, :rlSetLineWidth, [:float], :void],
570
-
571
- # rlGetLineWidth : Get the line drawing width
572
- # @return [float]
573
- [:rlGetLineWidth, :rlGetLineWidth, [], :float],
574
-
575
- # rlEnableSmoothLines : Enable line aliasing
576
- # @return [void]
577
- [:rlEnableSmoothLines, :rlEnableSmoothLines, [], :void],
578
-
579
- # rlDisableSmoothLines : Disable line aliasing
580
- # @return [void]
581
- [:rlDisableSmoothLines, :rlDisableSmoothLines, [], :void],
582
-
583
- # rlEnableStereoRender : Enable stereo rendering
584
- # @return [void]
585
- [:rlEnableStereoRender, :rlEnableStereoRender, [], :void],
586
-
587
- # rlDisableStereoRender : Disable stereo rendering
588
- # @return [void]
589
- [:rlDisableStereoRender, :rlDisableStereoRender, [], :void],
590
-
591
- # rlIsStereoRenderEnabled : Check if stereo render is enabled
592
- # @return [bool]
593
- [:rlIsStereoRenderEnabled, :rlIsStereoRenderEnabled, [], :bool],
594
-
595
- # rlClearColor : Clear color buffer with color
596
- # @param r [unsigned char]
597
- # @param g [unsigned char]
598
- # @param b [unsigned char]
599
- # @param a [unsigned char]
600
- # @return [void]
601
- [:rlClearColor, :rlClearColor, [:uchar, :uchar, :uchar, :uchar], :void],
602
-
603
- # rlClearScreenBuffers : Clear used screen buffers (color and depth)
604
- # @return [void]
605
- [:rlClearScreenBuffers, :rlClearScreenBuffers, [], :void],
606
-
607
- # rlCheckErrors : Check and log OpenGL error codes
608
- # @return [void]
609
- [:rlCheckErrors, :rlCheckErrors, [], :void],
610
-
611
- # rlSetBlendMode : Set blending mode
612
- # @param mode [int]
613
- # @return [void]
614
- [:rlSetBlendMode, :rlSetBlendMode, [:int], :void],
615
-
616
- # rlSetBlendFactors : Set blending mode factor and equation (using OpenGL factors)
617
- # @param glSrcFactor [int]
618
- # @param glDstFactor [int]
619
- # @param glEquation [int]
620
- # @return [void]
621
- [:rlSetBlendFactors, :rlSetBlendFactors, [:int, :int, :int], :void],
622
-
623
- # rlSetBlendFactorsSeparate : Set blending mode factors and equations separately (using OpenGL factors)
624
- # @param glSrcRGB [int]
625
- # @param glDstRGB [int]
626
- # @param glSrcAlpha [int]
627
- # @param glDstAlpha [int]
628
- # @param glEqRGB [int]
629
- # @param glEqAlpha [int]
630
- # @return [void]
631
- [:rlSetBlendFactorsSeparate, :rlSetBlendFactorsSeparate, [:int, :int, :int, :int, :int, :int], :void],
632
-
633
- # rlglInit : Initialize rlgl (buffers, shaders, textures, states)
634
- # @param width [int]
635
- # @param height [int]
636
- # @return [void]
637
- [:rlglInit, :rlglInit, [:int, :int], :void],
638
-
639
- # rlglClose : De-inititialize rlgl (buffers, shaders, textures)
640
- # @return [void]
641
- [:rlglClose, :rlglClose, [], :void],
642
-
643
- # rlLoadExtensions : Load OpenGL extensions (loader function required)
644
- # @param loader [void *]
645
- # @return [void]
646
- [:rlLoadExtensions, :rlLoadExtensions, [:pointer], :void],
647
-
648
- # rlGetVersion : Get current OpenGL version
649
- # @return [int]
650
- [:rlGetVersion, :rlGetVersion, [], :int],
651
-
652
- # rlSetFramebufferWidth : Set current framebuffer width
653
- # @param width [int]
654
- # @return [void]
655
- [:rlSetFramebufferWidth, :rlSetFramebufferWidth, [:int], :void],
656
-
657
- # rlGetFramebufferWidth : Get default framebuffer width
658
- # @return [int]
659
- [:rlGetFramebufferWidth, :rlGetFramebufferWidth, [], :int],
660
-
661
- # rlSetFramebufferHeight : Set current framebuffer height
662
- # @param height [int]
663
- # @return [void]
664
- [:rlSetFramebufferHeight, :rlSetFramebufferHeight, [:int], :void],
665
-
666
- # rlGetFramebufferHeight : Get default framebuffer height
667
- # @return [int]
668
- [:rlGetFramebufferHeight, :rlGetFramebufferHeight, [], :int],
669
-
670
- # rlGetTextureIdDefault : Get default texture id
671
- # @return [unsigned int]
672
- [:rlGetTextureIdDefault, :rlGetTextureIdDefault, [], :uint],
673
-
674
- # rlGetShaderIdDefault : Get default shader id
675
- # @return [unsigned int]
676
- [:rlGetShaderIdDefault, :rlGetShaderIdDefault, [], :uint],
677
-
678
- # rlGetShaderLocsDefault : Get default shader locations
679
- # @return [int *]
680
- [:rlGetShaderLocsDefault, :rlGetShaderLocsDefault, [], :pointer],
681
-
682
- # rlLoadRenderBatch : Load a render batch system
683
- # @param numBuffers [int]
684
- # @param bufferElements [int]
685
- # @return [rlRenderBatch]
686
- [:rlLoadRenderBatch, :rlLoadRenderBatch, [:int, :int], RlRenderBatch.by_value],
687
-
688
- # rlUnloadRenderBatch : Unload render batch system
689
- # @param batch [rlRenderBatch]
690
- # @return [void]
691
- [:rlUnloadRenderBatch, :rlUnloadRenderBatch, [RlRenderBatch.by_value], :void],
692
-
693
- # rlDrawRenderBatch : Draw render batch data (Update->Draw->Reset)
694
- # @param batch [rlRenderBatch *]
695
- # @return [void]
696
- [:rlDrawRenderBatch, :rlDrawRenderBatch, [:pointer], :void],
697
-
698
- # rlSetRenderBatchActive : Set the active render batch for rlgl (NULL for default internal)
699
- # @param batch [rlRenderBatch *]
700
- # @return [void]
701
- [:rlSetRenderBatchActive, :rlSetRenderBatchActive, [:pointer], :void],
702
-
703
- # rlDrawRenderBatchActive : Update and draw internal render batch
704
- # @return [void]
705
- [:rlDrawRenderBatchActive, :rlDrawRenderBatchActive, [], :void],
706
-
707
- # rlCheckRenderBatchLimit : Check internal buffer overflow for a given number of vertex
708
- # @param vCount [int]
709
- # @return [bool]
710
- [:rlCheckRenderBatchLimit, :rlCheckRenderBatchLimit, [:int], :bool],
711
-
712
- # rlSetTexture : Set current texture for render batch and check buffers limits
713
- # @param id [unsigned int]
714
- # @return [void]
715
- [:rlSetTexture, :rlSetTexture, [:uint], :void],
716
-
717
- # rlLoadVertexArray : Load vertex array (vao) if supported
718
- # @return [unsigned int]
719
- [:rlLoadVertexArray, :rlLoadVertexArray, [], :uint],
720
-
721
- # rlLoadVertexBuffer : Load a vertex buffer attribute
722
- # @param buffer [const void *]
723
- # @param size [int]
724
- # @param dynamic [bool]
725
- # @return [unsigned int]
726
- [:rlLoadVertexBuffer, :rlLoadVertexBuffer, [:pointer, :int, :bool], :uint],
727
-
728
- # rlLoadVertexBufferElement : Load a new attributes element buffer
729
- # @param buffer [const void *]
730
- # @param size [int]
731
- # @param dynamic [bool]
732
- # @return [unsigned int]
733
- [:rlLoadVertexBufferElement, :rlLoadVertexBufferElement, [:pointer, :int, :bool], :uint],
734
-
735
- # rlUpdateVertexBuffer : Update GPU buffer with new data
736
- # @param bufferId [unsigned int]
737
- # @param data [const void *]
738
- # @param dataSize [int]
739
- # @param offset [int]
740
- # @return [void]
741
- [:rlUpdateVertexBuffer, :rlUpdateVertexBuffer, [:uint, :pointer, :int, :int], :void],
742
-
743
- # rlUpdateVertexBufferElements : Update vertex buffer elements with new data
744
- # @param id [unsigned int]
745
- # @param data [const void *]
746
- # @param dataSize [int]
747
- # @param offset [int]
748
- # @return [void]
749
- [:rlUpdateVertexBufferElements, :rlUpdateVertexBufferElements, [:uint, :pointer, :int, :int], :void],
750
-
751
- # rlUnloadVertexArray
752
- # @param vaoId [unsigned int]
753
- # @return [void]
754
- [:rlUnloadVertexArray, :rlUnloadVertexArray, [:uint], :void],
755
-
756
- # rlUnloadVertexBuffer
757
- # @param vboId [unsigned int]
758
- # @return [void]
759
- [:rlUnloadVertexBuffer, :rlUnloadVertexBuffer, [:uint], :void],
760
-
761
- # rlSetVertexAttribute
762
- # @param index [unsigned int]
763
- # @param compSize [int]
764
- # @param type [int]
765
- # @param normalized [bool]
766
- # @param stride [int]
767
- # @param pointer [const void *]
768
- # @return [void]
769
- [:rlSetVertexAttribute, :rlSetVertexAttribute, [:uint, :int, :int, :bool, :int, :pointer], :void],
770
-
771
- # rlSetVertexAttributeDivisor
772
- # @param index [unsigned int]
773
- # @param divisor [int]
774
- # @return [void]
775
- [:rlSetVertexAttributeDivisor, :rlSetVertexAttributeDivisor, [:uint, :int], :void],
776
-
777
- # rlSetVertexAttributeDefault : Set vertex attribute default value
778
- # @param locIndex [int]
779
- # @param value [const void *]
780
- # @param attribType [int]
781
- # @param count [int]
782
- # @return [void]
783
- [:rlSetVertexAttributeDefault, :rlSetVertexAttributeDefault, [:int, :pointer, :int, :int], :void],
784
-
785
- # rlDrawVertexArray
786
- # @param offset [int]
787
- # @param count [int]
788
- # @return [void]
789
- [:rlDrawVertexArray, :rlDrawVertexArray, [:int, :int], :void],
790
-
791
- # rlDrawVertexArrayElements
792
- # @param offset [int]
793
- # @param count [int]
794
- # @param buffer [const void *]
795
- # @return [void]
796
- [:rlDrawVertexArrayElements, :rlDrawVertexArrayElements, [:int, :int, :pointer], :void],
797
-
798
- # rlDrawVertexArrayInstanced
799
- # @param offset [int]
800
- # @param count [int]
801
- # @param instances [int]
802
- # @return [void]
803
- [:rlDrawVertexArrayInstanced, :rlDrawVertexArrayInstanced, [:int, :int, :int], :void],
804
-
805
- # rlDrawVertexArrayElementsInstanced
806
- # @param offset [int]
807
- # @param count [int]
808
- # @param buffer [const void *]
809
- # @param instances [int]
810
- # @return [void]
811
- [:rlDrawVertexArrayElementsInstanced, :rlDrawVertexArrayElementsInstanced, [:int, :int, :pointer, :int], :void],
812
-
813
- # rlLoadTexture : Load texture in GPU
814
- # @param data [const void *]
815
- # @param width [int]
816
- # @param height [int]
817
- # @param format [int]
818
- # @param mipmapCount [int]
819
- # @return [unsigned int]
820
- [:rlLoadTexture, :rlLoadTexture, [:pointer, :int, :int, :int, :int], :uint],
821
-
822
- # rlLoadTextureDepth : Load depth texture/renderbuffer (to be attached to fbo)
823
- # @param width [int]
824
- # @param height [int]
825
- # @param useRenderBuffer [bool]
826
- # @return [unsigned int]
827
- [:rlLoadTextureDepth, :rlLoadTextureDepth, [:int, :int, :bool], :uint],
828
-
829
- # rlLoadTextureCubemap : Load texture cubemap
830
- # @param data [const void *]
831
- # @param size [int]
832
- # @param format [int]
833
- # @return [unsigned int]
834
- [:rlLoadTextureCubemap, :rlLoadTextureCubemap, [:pointer, :int, :int], :uint],
835
-
836
- # rlUpdateTexture : Update GPU texture with new data
837
- # @param id [unsigned int]
838
- # @param offsetX [int]
839
- # @param offsetY [int]
840
- # @param width [int]
841
- # @param height [int]
842
- # @param format [int]
843
- # @param data [const void *]
844
- # @return [void]
845
- [:rlUpdateTexture, :rlUpdateTexture, [:uint, :int, :int, :int, :int, :int, :pointer], :void],
846
-
847
- # rlGetGlTextureFormats : Get OpenGL internal formats
848
- # @param format [int]
849
- # @param glInternalFormat [unsigned int *]
850
- # @param glFormat [unsigned int *]
851
- # @param glType [unsigned int *]
852
- # @return [void]
853
- [:rlGetGlTextureFormats, :rlGetGlTextureFormats, [:int, :pointer, :pointer, :pointer], :void],
854
-
855
- # rlGetPixelFormatName : Get name string for pixel format
856
- # @param format [unsigned int]
857
- # @return [const char *]
858
- [:rlGetPixelFormatName, :rlGetPixelFormatName, [:uint], :pointer],
859
-
860
- # rlUnloadTexture : Unload texture from GPU memory
861
- # @param id [unsigned int]
862
- # @return [void]
863
- [:rlUnloadTexture, :rlUnloadTexture, [:uint], :void],
864
-
865
- # rlGenTextureMipmaps : Generate mipmap data for selected texture
866
- # @param id [unsigned int]
867
- # @param width [int]
868
- # @param height [int]
869
- # @param format [int]
870
- # @param mipmaps [int *]
871
- # @return [void]
872
- [:rlGenTextureMipmaps, :rlGenTextureMipmaps, [:uint, :int, :int, :int, :pointer], :void],
873
-
874
- # rlReadTexturePixels : Read texture pixel data
875
- # @param id [unsigned int]
876
- # @param width [int]
877
- # @param height [int]
878
- # @param format [int]
879
- # @return [void *]
880
- [:rlReadTexturePixels, :rlReadTexturePixels, [:uint, :int, :int, :int], :pointer],
881
-
882
- # rlReadScreenPixels : Read screen pixel data (color buffer)
883
- # @param width [int]
884
- # @param height [int]
885
- # @return [unsigned char *]
886
- [:rlReadScreenPixels, :rlReadScreenPixels, [:int, :int], :pointer],
887
-
888
- # rlLoadFramebuffer : Load an empty framebuffer
889
- # @param width [int]
890
- # @param height [int]
891
- # @return [unsigned int]
892
- [:rlLoadFramebuffer, :rlLoadFramebuffer, [:int, :int], :uint],
893
-
894
- # rlFramebufferAttach : Attach texture/renderbuffer to a framebuffer
895
- # @param fboId [unsigned int]
896
- # @param texId [unsigned int]
897
- # @param attachType [int]
898
- # @param texType [int]
899
- # @param mipLevel [int]
900
- # @return [void]
901
- [:rlFramebufferAttach, :rlFramebufferAttach, [:uint, :uint, :int, :int, :int], :void],
902
-
903
- # rlFramebufferComplete : Verify framebuffer is complete
904
- # @param id [unsigned int]
905
- # @return [bool]
906
- [:rlFramebufferComplete, :rlFramebufferComplete, [:uint], :bool],
907
-
908
- # rlUnloadFramebuffer : Delete framebuffer from GPU
909
- # @param id [unsigned int]
910
- # @return [void]
911
- [:rlUnloadFramebuffer, :rlUnloadFramebuffer, [:uint], :void],
912
-
913
- # rlLoadShaderCode : Load shader from code strings
914
- # @param vsCode [const char *]
915
- # @param fsCode [const char *]
916
- # @return [unsigned int]
917
- [:rlLoadShaderCode, :rlLoadShaderCode, [:pointer, :pointer], :uint],
918
-
919
- # rlCompileShader : Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER)
920
- # @param shaderCode [const char *]
921
- # @param type [int]
922
- # @return [unsigned int]
923
- [:rlCompileShader, :rlCompileShader, [:pointer, :int], :uint],
924
-
925
- # rlLoadShaderProgram : Load custom shader program
926
- # @param vShaderId [unsigned int]
927
- # @param fShaderId [unsigned int]
928
- # @return [unsigned int]
929
- [:rlLoadShaderProgram, :rlLoadShaderProgram, [:uint, :uint], :uint],
930
-
931
- # rlUnloadShaderProgram : Unload shader program
932
- # @param id [unsigned int]
933
- # @return [void]
934
- [:rlUnloadShaderProgram, :rlUnloadShaderProgram, [:uint], :void],
935
-
936
- # rlGetLocationUniform : Get shader location uniform
937
- # @param shaderId [unsigned int]
938
- # @param uniformName [const char *]
939
- # @return [int]
940
- [:rlGetLocationUniform, :rlGetLocationUniform, [:uint, :pointer], :int],
941
-
942
- # rlGetLocationAttrib : Get shader location attribute
943
- # @param shaderId [unsigned int]
944
- # @param attribName [const char *]
945
- # @return [int]
946
- [:rlGetLocationAttrib, :rlGetLocationAttrib, [:uint, :pointer], :int],
947
-
948
- # rlSetUniform : Set shader value uniform
949
- # @param locIndex [int]
950
- # @param value [const void *]
951
- # @param uniformType [int]
952
- # @param count [int]
953
- # @return [void]
954
- [:rlSetUniform, :rlSetUniform, [:int, :pointer, :int, :int], :void],
955
-
956
- # rlSetUniformMatrix : Set shader value matrix
957
- # @param locIndex [int]
958
- # @param mat [Matrix]
959
- # @return [void]
960
- [:rlSetUniformMatrix, :rlSetUniformMatrix, [:int, Matrix.by_value], :void],
961
-
962
- # rlSetUniformSampler : Set shader value sampler
963
- # @param locIndex [int]
964
- # @param textureId [unsigned int]
965
- # @return [void]
966
- [:rlSetUniformSampler, :rlSetUniformSampler, [:int, :uint], :void],
967
-
968
- # rlSetShader : Set shader currently active (id and locations)
969
- # @param id [unsigned int]
970
- # @param locs [int *]
971
- # @return [void]
972
- [:rlSetShader, :rlSetShader, [:uint, :pointer], :void],
973
-
974
- # rlLoadComputeShaderProgram : Load compute shader program
975
- # @param shaderId [unsigned int]
976
- # @return [unsigned int]
977
- [:rlLoadComputeShaderProgram, :rlLoadComputeShaderProgram, [:uint], :uint],
978
-
979
- # rlComputeShaderDispatch : Dispatch compute shader (equivalent to *draw* for graphics pilepine)
980
- # @param groupX [unsigned int]
981
- # @param groupY [unsigned int]
982
- # @param groupZ [unsigned int]
983
- # @return [void]
984
- [:rlComputeShaderDispatch, :rlComputeShaderDispatch, [:uint, :uint, :uint], :void],
985
-
986
- # rlLoadShaderBuffer : Load shader storage buffer object (SSBO)
987
- # @param size [unsigned int]
988
- # @param data [const void *]
989
- # @param usageHint [int]
990
- # @return [unsigned int]
991
- [:rlLoadShaderBuffer, :rlLoadShaderBuffer, [:uint, :pointer, :int], :uint],
992
-
993
- # rlUnloadShaderBuffer : Unload shader storage buffer object (SSBO)
994
- # @param ssboId [unsigned int]
995
- # @return [void]
996
- [:rlUnloadShaderBuffer, :rlUnloadShaderBuffer, [:uint], :void],
997
-
998
- # rlUpdateShaderBuffer : Update SSBO buffer data
999
- # @param id [unsigned int]
1000
- # @param data [const void *]
1001
- # @param dataSize [unsigned int]
1002
- # @param offset [unsigned int]
1003
- # @return [void]
1004
- [:rlUpdateShaderBuffer, :rlUpdateShaderBuffer, [:uint, :pointer, :uint, :uint], :void],
1005
-
1006
- # rlBindShaderBuffer : Bind SSBO buffer
1007
- # @param id [unsigned int]
1008
- # @param index [unsigned int]
1009
- # @return [void]
1010
- [:rlBindShaderBuffer, :rlBindShaderBuffer, [:uint, :uint], :void],
1011
-
1012
- # rlReadShaderBuffer : Read SSBO buffer data (GPU->CPU)
1013
- # @param id [unsigned int]
1014
- # @param dest [void *]
1015
- # @param count [unsigned int]
1016
- # @param offset [unsigned int]
1017
- # @return [void]
1018
- [:rlReadShaderBuffer, :rlReadShaderBuffer, [:uint, :pointer, :uint, :uint], :void],
1019
-
1020
- # rlCopyShaderBuffer : Copy SSBO data between buffers
1021
- # @param destId [unsigned int]
1022
- # @param srcId [unsigned int]
1023
- # @param destOffset [unsigned int]
1024
- # @param srcOffset [unsigned int]
1025
- # @param count [unsigned int]
1026
- # @return [void]
1027
- [:rlCopyShaderBuffer, :rlCopyShaderBuffer, [:uint, :uint, :uint, :uint, :uint], :void],
1028
-
1029
- # rlGetShaderBufferSize : Get SSBO buffer size
1030
- # @param id [unsigned int]
1031
- # @return [unsigned int]
1032
- [:rlGetShaderBufferSize, :rlGetShaderBufferSize, [:uint], :uint],
1033
-
1034
- # rlBindImageTexture : Bind image texture
1035
- # @param id [unsigned int]
1036
- # @param index [unsigned int]
1037
- # @param format [int]
1038
- # @param readonly [bool]
1039
- # @return [void]
1040
- [:rlBindImageTexture, :rlBindImageTexture, [:uint, :uint, :int, :bool], :void],
1041
-
1042
- # rlGetMatrixModelview : Get internal modelview matrix
1043
- # @return [Matrix]
1044
- [:rlGetMatrixModelview, :rlGetMatrixModelview, [], Matrix.by_value],
1045
-
1046
- # rlGetMatrixProjection : Get internal projection matrix
1047
- # @return [Matrix]
1048
- [:rlGetMatrixProjection, :rlGetMatrixProjection, [], Matrix.by_value],
1049
-
1050
- # rlGetMatrixTransform : Get internal accumulated transform matrix
1051
- # @return [Matrix]
1052
- [:rlGetMatrixTransform, :rlGetMatrixTransform, [], Matrix.by_value],
1053
-
1054
- # rlGetMatrixProjectionStereo : Get internal projection matrix for stereo render (selected eye)
1055
- # @param eye [int]
1056
- # @return [Matrix]
1057
- [:rlGetMatrixProjectionStereo, :rlGetMatrixProjectionStereo, [:int], Matrix.by_value],
1058
-
1059
- # rlGetMatrixViewOffsetStereo : Get internal view offset matrix for stereo render (selected eye)
1060
- # @param eye [int]
1061
- # @return [Matrix]
1062
- [:rlGetMatrixViewOffsetStereo, :rlGetMatrixViewOffsetStereo, [:int], Matrix.by_value],
1063
-
1064
- # rlSetMatrixProjection : Set a custom projection matrix (replaces internal projection matrix)
1065
- # @param proj [Matrix]
1066
- # @return [void]
1067
- [:rlSetMatrixProjection, :rlSetMatrixProjection, [Matrix.by_value], :void],
1068
-
1069
- # rlSetMatrixModelview : Set a custom modelview matrix (replaces internal modelview matrix)
1070
- # @param view [Matrix]
1071
- # @return [void]
1072
- [:rlSetMatrixModelview, :rlSetMatrixModelview, [Matrix.by_value], :void],
1073
-
1074
- # rlSetMatrixProjectionStereo : Set eyes projection matrices for stereo rendering
1075
- # @param right [Matrix]
1076
- # @param left [Matrix]
1077
- # @return [void]
1078
- [:rlSetMatrixProjectionStereo, :rlSetMatrixProjectionStereo, [Matrix.by_value, Matrix.by_value], :void],
1079
-
1080
- # rlSetMatrixViewOffsetStereo : Set eyes view offsets matrices for stereo rendering
1081
- # @param right [Matrix]
1082
- # @param left [Matrix]
1083
- # @return [void]
1084
- [:rlSetMatrixViewOffsetStereo, :rlSetMatrixViewOffsetStereo, [Matrix.by_value, Matrix.by_value], :void],
1085
-
1086
- # rlLoadDrawCube : Load and draw a cube
1087
- # @return [void]
1088
- [:rlLoadDrawCube, :rlLoadDrawCube, [], :void],
1089
-
1090
- # rlLoadDrawQuad : Load and draw a quad
1091
- # @return [void]
1092
- [:rlLoadDrawQuad, :rlLoadDrawQuad, [], :void],
1093
- ]
1094
- entries.each do |entry|
1095
- attach_function entry[0], entry[1], entry[2], entry[3]
1096
- rescue FFI::NotFoundError => e
1097
- warn "[Warning] Failed to import #{entry[0]} (#{e})."
1098
- end
1099
- end
1100
- end
1
+ # Yet another raylib wrapper for Ruby
2
+ #
3
+ # * https://github.com/vaiorabbit/raylib-bindings
4
+ #
5
+ # [NOTICE] Autogenerated. Do not edit.
6
+
7
+ require 'ffi'
8
+
9
+ module Raylib
10
+ extend FFI::Library
11
+
12
+ # Define/Macro
13
+
14
+ RLGL_VERSION = "4.2"
15
+ RL_DEFAULT_BATCH_BUFFER_ELEMENTS = 8192
16
+ RL_TEXTURE_WRAP_S = 0x2802 # GL_TEXTURE_WRAP_S
17
+ RL_TEXTURE_WRAP_T = 0x2803 # GL_TEXTURE_WRAP_T
18
+ RL_TEXTURE_MAG_FILTER = 0x2800 # GL_TEXTURE_MAG_FILTER
19
+ RL_TEXTURE_MIN_FILTER = 0x2801 # GL_TEXTURE_MIN_FILTER
20
+ RL_TEXTURE_FILTER_NEAREST = 0x2600 # GL_NEAREST
21
+ RL_TEXTURE_FILTER_LINEAR = 0x2601 # GL_LINEAR
22
+ RL_TEXTURE_FILTER_MIP_NEAREST = 0x2700 # GL_NEAREST_MIPMAP_NEAREST
23
+ RL_TEXTURE_FILTER_NEAREST_MIP_LINEAR = 0x2702 # GL_NEAREST_MIPMAP_LINEAR
24
+ RL_TEXTURE_FILTER_LINEAR_MIP_NEAREST = 0x2701 # GL_LINEAR_MIPMAP_NEAREST
25
+ RL_TEXTURE_FILTER_MIP_LINEAR = 0x2703 # GL_LINEAR_MIPMAP_LINEAR
26
+ RL_TEXTURE_FILTER_ANISOTROPIC = 0x3000 # Anisotropic filter (custom identifier)
27
+ RL_TEXTURE_MIPMAP_BIAS_RATIO = 0x4000 # Texture mipmap bias, percentage ratio (custom identifier)
28
+ RL_TEXTURE_WRAP_REPEAT = 0x2901 # GL_REPEAT
29
+ RL_TEXTURE_WRAP_CLAMP = 0x812F # GL_CLAMP_TO_EDGE
30
+ RL_TEXTURE_WRAP_MIRROR_REPEAT = 0x8370 # GL_MIRRORED_REPEAT
31
+ RL_TEXTURE_WRAP_MIRROR_CLAMP = 0x8742 # GL_MIRROR_CLAMP_EXT
32
+ RL_MODELVIEW = 0x1700 # GL_MODELVIEW
33
+ RL_PROJECTION = 0x1701 # GL_PROJECTION
34
+ RL_TEXTURE = 0x1702 # GL_TEXTURE
35
+ RL_LINES = 0x0001 # GL_LINES
36
+ RL_TRIANGLES = 0x0004 # GL_TRIANGLES
37
+ RL_QUADS = 0x0007 # GL_QUADS
38
+ RL_UNSIGNED_BYTE = 0x1401 # GL_UNSIGNED_BYTE
39
+ RL_FLOAT = 0x1406 # GL_FLOAT
40
+ RL_STREAM_DRAW = 0x88E0 # GL_STREAM_DRAW
41
+ RL_STREAM_READ = 0x88E1 # GL_STREAM_READ
42
+ RL_STREAM_COPY = 0x88E2 # GL_STREAM_COPY
43
+ RL_STATIC_DRAW = 0x88E4 # GL_STATIC_DRAW
44
+ RL_STATIC_READ = 0x88E5 # GL_STATIC_READ
45
+ RL_STATIC_COPY = 0x88E6 # GL_STATIC_COPY
46
+ RL_DYNAMIC_DRAW = 0x88E8 # GL_DYNAMIC_DRAW
47
+ RL_DYNAMIC_READ = 0x88E9 # GL_DYNAMIC_READ
48
+ RL_DYNAMIC_COPY = 0x88EA # GL_DYNAMIC_COPY
49
+ RL_FRAGMENT_SHADER = 0x8B30 # GL_FRAGMENT_SHADER
50
+ RL_VERTEX_SHADER = 0x8B31 # GL_VERTEX_SHADER
51
+ RL_COMPUTE_SHADER = 0x91B9 # GL_COMPUTE_SHADER
52
+ RL_ZERO = 0 # GL_ZERO
53
+ RL_ONE = 1 # GL_ONE
54
+ RL_SRC_COLOR = 0x0300 # GL_SRC_COLOR
55
+ RL_ONE_MINUS_SRC_COLOR = 0x0301 # GL_ONE_MINUS_SRC_COLOR
56
+ RL_SRC_ALPHA = 0x0302 # GL_SRC_ALPHA
57
+ RL_ONE_MINUS_SRC_ALPHA = 0x0303 # GL_ONE_MINUS_SRC_ALPHA
58
+ RL_DST_ALPHA = 0x0304 # GL_DST_ALPHA
59
+ RL_ONE_MINUS_DST_ALPHA = 0x0305 # GL_ONE_MINUS_DST_ALPHA
60
+ RL_DST_COLOR = 0x0306 # GL_DST_COLOR
61
+ RL_ONE_MINUS_DST_COLOR = 0x0307 # GL_ONE_MINUS_DST_COLOR
62
+ RL_SRC_ALPHA_SATURATE = 0x0308 # GL_SRC_ALPHA_SATURATE
63
+ RL_CONSTANT_COLOR = 0x8001 # GL_CONSTANT_COLOR
64
+ RL_ONE_MINUS_CONSTANT_COLOR = 0x8002 # GL_ONE_MINUS_CONSTANT_COLOR
65
+ RL_CONSTANT_ALPHA = 0x8003 # GL_CONSTANT_ALPHA
66
+ RL_ONE_MINUS_CONSTANT_ALPHA = 0x8004 # GL_ONE_MINUS_CONSTANT_ALPHA
67
+ RL_FUNC_ADD = 0x8006 # GL_FUNC_ADD
68
+ RL_FUNC_SUBTRACT = 0x800A # GL_FUNC_SUBTRACT
69
+ RL_FUNC_REVERSE_SUBTRACT = 0x800B # GL_FUNC_REVERSE_SUBTRACT
70
+ RL_BLEND_EQUATION = 0x8009 # GL_BLEND_EQUATION
71
+ RL_BLEND_EQUATION_RGB = 0x8009 # GL_BLEND_EQUATION_RGB // (Same as BLEND_EQUATION)
72
+ RL_BLEND_EQUATION_ALPHA = 0x883D # GL_BLEND_EQUATION_ALPHA
73
+ RL_BLEND_DST_RGB = 0x80C8 # GL_BLEND_DST_RGB
74
+ RL_BLEND_SRC_RGB = 0x80C9 # GL_BLEND_SRC_RGB
75
+ RL_BLEND_DST_ALPHA = 0x80CA # GL_BLEND_DST_ALPHA
76
+ RL_BLEND_SRC_ALPHA = 0x80CB # GL_BLEND_SRC_ALPHA
77
+ RL_BLEND_COLOR = 0x8005 # GL_BLEND_COLOR
78
+
79
+ # Enum
80
+
81
+ # enum rlGlVersion
82
+ # OpenGL version
83
+ RL_OPENGL_11 = 1 # OpenGL 1.1
84
+ RL_OPENGL_21 = 2 # OpenGL 2.1 (GLSL 120)
85
+ RL_OPENGL_33 = 3 # OpenGL 3.3 (GLSL 330)
86
+ RL_OPENGL_43 = 4 # OpenGL 4.3 (using GLSL 330)
87
+ RL_OPENGL_ES_20 = 5 # OpenGL ES 2.0 (GLSL 100)
88
+
89
+ # enum rlTraceLogLevel
90
+ # Trace log level
91
+ RL_LOG_ALL = 0 # Display all logs
92
+ RL_LOG_TRACE = 1 # Trace logging, intended for internal use only
93
+ RL_LOG_DEBUG = 2 # Debug logging, used for internal debugging, it should be disabled on release builds
94
+ RL_LOG_INFO = 3 # Info logging, used for program execution info
95
+ RL_LOG_WARNING = 4 # Warning logging, used on recoverable failures
96
+ RL_LOG_ERROR = 5 # Error logging, used on unrecoverable failures
97
+ RL_LOG_FATAL = 6 # Fatal logging, used to abort program: exit(EXIT_FAILURE)
98
+ RL_LOG_NONE = 7 # Disable logging
99
+
100
+ # enum rlPixelFormat
101
+ # Texture pixel formats
102
+ RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1 # 8 bit per pixel (no alpha)
103
+ RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2 # 8*2 bpp (2 channels)
104
+ RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3 # 16 bpp
105
+ RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4 # 24 bpp
106
+ RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5 # 16 bpp (1 bit alpha)
107
+ RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6 # 16 bpp (4 bit alpha)
108
+ RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7 # 32 bpp
109
+ RL_PIXELFORMAT_UNCOMPRESSED_R32 = 8 # 32 bpp (1 channel - float)
110
+ RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9 # 32*3 bpp (3 channels - float)
111
+ RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10 # 32*4 bpp (4 channels - float)
112
+ RL_PIXELFORMAT_COMPRESSED_DXT1_RGB = 11 # 4 bpp (no alpha)
113
+ RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12 # 4 bpp (1 bit alpha)
114
+ RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13 # 8 bpp
115
+ RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14 # 8 bpp
116
+ RL_PIXELFORMAT_COMPRESSED_ETC1_RGB = 15 # 4 bpp
117
+ RL_PIXELFORMAT_COMPRESSED_ETC2_RGB = 16 # 4 bpp
118
+ RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17 # 8 bpp
119
+ RL_PIXELFORMAT_COMPRESSED_PVRT_RGB = 18 # 4 bpp
120
+ RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19 # 4 bpp
121
+ RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20 # 8 bpp
122
+ RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21 # 2 bpp
123
+
124
+ # enum rlTextureFilter
125
+ # Texture parameters: filter mode
126
+ RL_TEXTURE_FILTER_POINT = 0 # No filter, just pixel approximation
127
+ RL_TEXTURE_FILTER_BILINEAR = 1 # Linear filtering
128
+ RL_TEXTURE_FILTER_TRILINEAR = 2 # Trilinear filtering (linear with mipmaps)
129
+ RL_TEXTURE_FILTER_ANISOTROPIC_4X = 3 # Anisotropic filtering 4x
130
+ RL_TEXTURE_FILTER_ANISOTROPIC_8X = 4 # Anisotropic filtering 8x
131
+ RL_TEXTURE_FILTER_ANISOTROPIC_16X = 5 # Anisotropic filtering 16x
132
+
133
+ # enum rlBlendMode
134
+ # Color blending modes (pre-defined)
135
+ RL_BLEND_ALPHA = 0 # Blend textures considering alpha (default)
136
+ RL_BLEND_ADDITIVE = 1 # Blend textures adding colors
137
+ RL_BLEND_MULTIPLIED = 2 # Blend textures multiplying colors
138
+ RL_BLEND_ADD_COLORS = 3 # Blend textures adding colors (alternative)
139
+ RL_BLEND_SUBTRACT_COLORS = 4 # Blend textures subtracting colors (alternative)
140
+ RL_BLEND_ALPHA_PREMULTIPLY = 5 # Blend premultiplied textures considering alpha
141
+ RL_BLEND_CUSTOM = 6 # Blend textures using custom src/dst factors (use rlSetBlendFactors())
142
+ RL_BLEND_CUSTOM_SEPARATE = 7 # Blend textures using custom src/dst factors (use rlSetBlendFactorsSeparate())
143
+
144
+ # enum rlShaderLocationIndex
145
+ # Shader location point type
146
+ RL_SHADER_LOC_VERTEX_POSITION = 0 # Shader location: vertex attribute: position
147
+ RL_SHADER_LOC_VERTEX_TEXCOORD01 = 1 # Shader location: vertex attribute: texcoord01
148
+ RL_SHADER_LOC_VERTEX_TEXCOORD02 = 2 # Shader location: vertex attribute: texcoord02
149
+ RL_SHADER_LOC_VERTEX_NORMAL = 3 # Shader location: vertex attribute: normal
150
+ RL_SHADER_LOC_VERTEX_TANGENT = 4 # Shader location: vertex attribute: tangent
151
+ RL_SHADER_LOC_VERTEX_COLOR = 5 # Shader location: vertex attribute: color
152
+ RL_SHADER_LOC_MATRIX_MVP = 6 # Shader location: matrix uniform: model-view-projection
153
+ RL_SHADER_LOC_MATRIX_VIEW = 7 # Shader location: matrix uniform: view (camera transform)
154
+ RL_SHADER_LOC_MATRIX_PROJECTION = 8 # Shader location: matrix uniform: projection
155
+ RL_SHADER_LOC_MATRIX_MODEL = 9 # Shader location: matrix uniform: model (transform)
156
+ RL_SHADER_LOC_MATRIX_NORMAL = 10 # Shader location: matrix uniform: normal
157
+ RL_SHADER_LOC_VECTOR_VIEW = 11 # Shader location: vector uniform: view
158
+ RL_SHADER_LOC_COLOR_DIFFUSE = 12 # Shader location: vector uniform: diffuse color
159
+ RL_SHADER_LOC_COLOR_SPECULAR = 13 # Shader location: vector uniform: specular color
160
+ RL_SHADER_LOC_COLOR_AMBIENT = 14 # Shader location: vector uniform: ambient color
161
+ RL_SHADER_LOC_MAP_ALBEDO = 15 # Shader location: sampler2d texture: albedo (same as: RL_SHADER_LOC_MAP_DIFFUSE)
162
+ RL_SHADER_LOC_MAP_METALNESS = 16 # Shader location: sampler2d texture: metalness (same as: RL_SHADER_LOC_MAP_SPECULAR)
163
+ RL_SHADER_LOC_MAP_NORMAL = 17 # Shader location: sampler2d texture: normal
164
+ RL_SHADER_LOC_MAP_ROUGHNESS = 18 # Shader location: sampler2d texture: roughness
165
+ RL_SHADER_LOC_MAP_OCCLUSION = 19 # Shader location: sampler2d texture: occlusion
166
+ RL_SHADER_LOC_MAP_EMISSION = 20 # Shader location: sampler2d texture: emission
167
+ RL_SHADER_LOC_MAP_HEIGHT = 21 # Shader location: sampler2d texture: height
168
+ RL_SHADER_LOC_MAP_CUBEMAP = 22 # Shader location: samplerCube texture: cubemap
169
+ RL_SHADER_LOC_MAP_IRRADIANCE = 23 # Shader location: samplerCube texture: irradiance
170
+ RL_SHADER_LOC_MAP_PREFILTER = 24 # Shader location: samplerCube texture: prefilter
171
+ RL_SHADER_LOC_MAP_BRDF = 25 # Shader location: sampler2d texture: brdf
172
+
173
+ # enum rlShaderUniformDataType
174
+ # Shader uniform data type
175
+ RL_SHADER_UNIFORM_FLOAT = 0 # Shader uniform type: float
176
+ RL_SHADER_UNIFORM_VEC2 = 1 # Shader uniform type: vec2 (2 float)
177
+ RL_SHADER_UNIFORM_VEC3 = 2 # Shader uniform type: vec3 (3 float)
178
+ RL_SHADER_UNIFORM_VEC4 = 3 # Shader uniform type: vec4 (4 float)
179
+ RL_SHADER_UNIFORM_INT = 4 # Shader uniform type: int
180
+ RL_SHADER_UNIFORM_IVEC2 = 5 # Shader uniform type: ivec2 (2 int)
181
+ RL_SHADER_UNIFORM_IVEC3 = 6 # Shader uniform type: ivec3 (3 int)
182
+ RL_SHADER_UNIFORM_IVEC4 = 7 # Shader uniform type: ivec4 (4 int)
183
+ RL_SHADER_UNIFORM_SAMPLER2D = 8 # Shader uniform type: sampler2d
184
+
185
+ # enum rlShaderAttributeDataType
186
+ # Shader attribute data types
187
+ RL_SHADER_ATTRIB_FLOAT = 0 # Shader attribute type: float
188
+ RL_SHADER_ATTRIB_VEC2 = 1 # Shader attribute type: vec2 (2 float)
189
+ RL_SHADER_ATTRIB_VEC3 = 2 # Shader attribute type: vec3 (3 float)
190
+ RL_SHADER_ATTRIB_VEC4 = 3 # Shader attribute type: vec4 (4 float)
191
+
192
+ # enum rlFramebufferAttachType
193
+ # Framebuffer attachment type
194
+ RL_ATTACHMENT_COLOR_CHANNEL0 = 0 # Framebuffer attachment type: color 0
195
+ RL_ATTACHMENT_COLOR_CHANNEL1 = 1 # Framebuffer attachment type: color 1
196
+ RL_ATTACHMENT_COLOR_CHANNEL2 = 2 # Framebuffer attachment type: color 2
197
+ RL_ATTACHMENT_COLOR_CHANNEL3 = 3 # Framebuffer attachment type: color 3
198
+ RL_ATTACHMENT_COLOR_CHANNEL4 = 4 # Framebuffer attachment type: color 4
199
+ RL_ATTACHMENT_COLOR_CHANNEL5 = 5 # Framebuffer attachment type: color 5
200
+ RL_ATTACHMENT_COLOR_CHANNEL6 = 6 # Framebuffer attachment type: color 6
201
+ RL_ATTACHMENT_COLOR_CHANNEL7 = 7 # Framebuffer attachment type: color 7
202
+ RL_ATTACHMENT_DEPTH = 100 # Framebuffer attachment type: depth
203
+ RL_ATTACHMENT_STENCIL = 200 # Framebuffer attachment type: stencil
204
+
205
+ # enum rlFramebufferAttachTextureType
206
+ # Framebuffer texture attachment type
207
+ RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0 # Framebuffer texture attachment type: cubemap, +X side
208
+ RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1 # Framebuffer texture attachment type: cubemap, -X side
209
+ RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2 # Framebuffer texture attachment type: cubemap, +Y side
210
+ RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3 # Framebuffer texture attachment type: cubemap, -Y side
211
+ RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4 # Framebuffer texture attachment type: cubemap, +Z side
212
+ RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5 # Framebuffer texture attachment type: cubemap, -Z side
213
+ RL_ATTACHMENT_TEXTURE2D = 100 # Framebuffer texture attachment type: texture2d
214
+ RL_ATTACHMENT_RENDERBUFFER = 200 # Framebuffer texture attachment type: renderbuffer
215
+
216
+ # enum rlCullMode
217
+ # Face culling mode
218
+ RL_CULL_FACE_FRONT = 0
219
+ RL_CULL_FACE_BACK = 1
220
+
221
+
222
+ # Typedef
223
+
224
+ typedef :int, :rlGlVersion
225
+ typedef :int, :rlTraceLogLevel
226
+ typedef :int, :rlPixelFormat
227
+ typedef :int, :rlTextureFilter
228
+ typedef :int, :rlBlendMode
229
+ typedef :int, :rlShaderLocationIndex
230
+ typedef :int, :rlShaderUniformDataType
231
+ typedef :int, :rlShaderAttributeDataType
232
+ typedef :int, :rlFramebufferAttachType
233
+ typedef :int, :rlFramebufferAttachTextureType
234
+ typedef :int, :rlCullMode
235
+
236
+ # Struct
237
+
238
+ # Dynamic vertex buffers (position + texcoords + colors + indices arrays)
239
+ class RlVertexBuffer < FFI::Struct
240
+ layout(
241
+ :elementCount, :int, # Number of elements in the buffer (QUADS)
242
+ :vertices, :pointer, # Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
243
+ :texcoords, :pointer, # Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
244
+ :colors, :pointer, # Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
245
+ :indices, :pointer, # Vertex indices (in case vertex data comes indexed) (6 indices per quad)
246
+ :vaoId, :uint, # OpenGL Vertex Array Object id
247
+ :vboId, [:uint, 4], # OpenGL Vertex Buffer Objects id (4 types of vertex data)
248
+ )
249
+ def elementCount = self[:elementCount]
250
+ def elementCount=(v) self[:elementCount] = v end
251
+ def vertices = self[:vertices]
252
+ def vertices=(v) self[:vertices] = v end
253
+ def texcoords = self[:texcoords]
254
+ def texcoords=(v) self[:texcoords] = v end
255
+ def colors = self[:colors]
256
+ def colors=(v) self[:colors] = v end
257
+ def indices = self[:indices]
258
+ def indices=(v) self[:indices] = v end
259
+ def vaoId = self[:vaoId]
260
+ def vaoId=(v) self[:vaoId] = v end
261
+ def vboId = self[:vboId]
262
+ def vboId=(v) self[:vboId] = v end
263
+ end
264
+
265
+ # of those state-change happens (this is done in core module)
266
+ class RlDrawCall < FFI::Struct
267
+ layout(
268
+ :mode, :int, # Drawing mode: LINES, TRIANGLES, QUADS
269
+ :vertexCount, :int, # Number of vertex of the draw
270
+ :vertexAlignment, :int, # Number of vertex required for index alignment (LINES, TRIANGLES)
271
+ :textureId, :uint, # Texture id to be used on the draw -> Use to create new draw call if changes
272
+ )
273
+ def mode = self[:mode]
274
+ def mode=(v) self[:mode] = v end
275
+ def vertexCount = self[:vertexCount]
276
+ def vertexCount=(v) self[:vertexCount] = v end
277
+ def vertexAlignment = self[:vertexAlignment]
278
+ def vertexAlignment=(v) self[:vertexAlignment] = v end
279
+ def textureId = self[:textureId]
280
+ def textureId=(v) self[:textureId] = v end
281
+ end
282
+
283
+ # rlRenderBatch type
284
+ class RlRenderBatch < FFI::Struct
285
+ layout(
286
+ :bufferCount, :int, # Number of vertex buffers (multi-buffering support)
287
+ :currentBuffer, :int, # Current buffer tracking in case of multi-buffering
288
+ :vertexBuffer, :pointer, # Dynamic buffer(s) for vertex data
289
+ :draws, :pointer, # Draw calls array, depends on textureId
290
+ :drawCounter, :int, # Draw calls counter
291
+ :currentDepth, :float, # Current depth value for next draw
292
+ )
293
+ def bufferCount = self[:bufferCount]
294
+ def bufferCount=(v) self[:bufferCount] = v end
295
+ def currentBuffer = self[:currentBuffer]
296
+ def currentBuffer=(v) self[:currentBuffer] = v end
297
+ def vertexBuffer = self[:vertexBuffer]
298
+ def vertexBuffer=(v) self[:vertexBuffer] = v end
299
+ def draws = self[:draws]
300
+ def draws=(v) self[:draws] = v end
301
+ def drawCounter = self[:drawCounter]
302
+ def drawCounter=(v) self[:drawCounter] = v end
303
+ def currentDepth = self[:currentDepth]
304
+ def currentDepth=(v) self[:currentDepth] = v end
305
+ end
306
+
307
+
308
+ # Function
309
+
310
+ def self.setup_rlgl_symbols
311
+ entries = [
312
+
313
+ # rlMatrixMode : Choose the current matrix to be transformed
314
+ # @param mode [int]
315
+ # @return [void]
316
+ [:rlMatrixMode, :rlMatrixMode, [:int], :void],
317
+
318
+ # rlPushMatrix : Push the current matrix to stack
319
+ # @return [void]
320
+ [:rlPushMatrix, :rlPushMatrix, [], :void],
321
+
322
+ # rlPopMatrix : Pop latest inserted matrix from stack
323
+ # @return [void]
324
+ [:rlPopMatrix, :rlPopMatrix, [], :void],
325
+
326
+ # rlLoadIdentity : Reset current matrix to identity matrix
327
+ # @return [void]
328
+ [:rlLoadIdentity, :rlLoadIdentity, [], :void],
329
+
330
+ # rlTranslatef : Multiply the current matrix by a translation matrix
331
+ # @param x [float]
332
+ # @param y [float]
333
+ # @param z [float]
334
+ # @return [void]
335
+ [:rlTranslatef, :rlTranslatef, [:float, :float, :float], :void],
336
+
337
+ # rlRotatef : Multiply the current matrix by a rotation matrix
338
+ # @param angle [float]
339
+ # @param x [float]
340
+ # @param y [float]
341
+ # @param z [float]
342
+ # @return [void]
343
+ [:rlRotatef, :rlRotatef, [:float, :float, :float, :float], :void],
344
+
345
+ # rlScalef : Multiply the current matrix by a scaling matrix
346
+ # @param x [float]
347
+ # @param y [float]
348
+ # @param z [float]
349
+ # @return [void]
350
+ [:rlScalef, :rlScalef, [:float, :float, :float], :void],
351
+
352
+ # rlMultMatrixf : Multiply the current matrix by another matrix
353
+ # @param matf [const float *]
354
+ # @return [void]
355
+ [:rlMultMatrixf, :rlMultMatrixf, [:pointer], :void],
356
+
357
+ # rlFrustum
358
+ # @param left [double]
359
+ # @param right [double]
360
+ # @param bottom [double]
361
+ # @param top [double]
362
+ # @param znear [double]
363
+ # @param zfar [double]
364
+ # @return [void]
365
+ [:rlFrustum, :rlFrustum, [:double, :double, :double, :double, :double, :double], :void],
366
+
367
+ # rlOrtho
368
+ # @param left [double]
369
+ # @param right [double]
370
+ # @param bottom [double]
371
+ # @param top [double]
372
+ # @param znear [double]
373
+ # @param zfar [double]
374
+ # @return [void]
375
+ [:rlOrtho, :rlOrtho, [:double, :double, :double, :double, :double, :double], :void],
376
+
377
+ # rlViewport : Set the viewport area
378
+ # @param x [int]
379
+ # @param y [int]
380
+ # @param width [int]
381
+ # @param height [int]
382
+ # @return [void]
383
+ [:rlViewport, :rlViewport, [:int, :int, :int, :int], :void],
384
+
385
+ # rlBegin : Initialize drawing mode (how to organize vertex)
386
+ # @param mode [int]
387
+ # @return [void]
388
+ [:rlBegin, :rlBegin, [:int], :void],
389
+
390
+ # rlEnd : Finish vertex providing
391
+ # @return [void]
392
+ [:rlEnd, :rlEnd, [], :void],
393
+
394
+ # rlVertex2i : Define one vertex (position) - 2 int
395
+ # @param x [int]
396
+ # @param y [int]
397
+ # @return [void]
398
+ [:rlVertex2i, :rlVertex2i, [:int, :int], :void],
399
+
400
+ # rlVertex2f : Define one vertex (position) - 2 float
401
+ # @param x [float]
402
+ # @param y [float]
403
+ # @return [void]
404
+ [:rlVertex2f, :rlVertex2f, [:float, :float], :void],
405
+
406
+ # rlVertex3f : Define one vertex (position) - 3 float
407
+ # @param x [float]
408
+ # @param y [float]
409
+ # @param z [float]
410
+ # @return [void]
411
+ [:rlVertex3f, :rlVertex3f, [:float, :float, :float], :void],
412
+
413
+ # rlTexCoord2f : Define one vertex (texture coordinate) - 2 float
414
+ # @param x [float]
415
+ # @param y [float]
416
+ # @return [void]
417
+ [:rlTexCoord2f, :rlTexCoord2f, [:float, :float], :void],
418
+
419
+ # rlNormal3f : Define one vertex (normal) - 3 float
420
+ # @param x [float]
421
+ # @param y [float]
422
+ # @param z [float]
423
+ # @return [void]
424
+ [:rlNormal3f, :rlNormal3f, [:float, :float, :float], :void],
425
+
426
+ # rlColor4ub : Define one vertex (color) - 4 byte
427
+ # @param r [unsigned char]
428
+ # @param g [unsigned char]
429
+ # @param b [unsigned char]
430
+ # @param a [unsigned char]
431
+ # @return [void]
432
+ [:rlColor4ub, :rlColor4ub, [:uchar, :uchar, :uchar, :uchar], :void],
433
+
434
+ # rlColor3f : Define one vertex (color) - 3 float
435
+ # @param x [float]
436
+ # @param y [float]
437
+ # @param z [float]
438
+ # @return [void]
439
+ [:rlColor3f, :rlColor3f, [:float, :float, :float], :void],
440
+
441
+ # rlColor4f : Define one vertex (color) - 4 float
442
+ # @param x [float]
443
+ # @param y [float]
444
+ # @param z [float]
445
+ # @param w [float]
446
+ # @return [void]
447
+ [:rlColor4f, :rlColor4f, [:float, :float, :float, :float], :void],
448
+
449
+ # rlEnableVertexArray : Enable vertex array (VAO, if supported)
450
+ # @param vaoId [unsigned int]
451
+ # @return [bool]
452
+ [:rlEnableVertexArray, :rlEnableVertexArray, [:uint], :bool],
453
+
454
+ # rlDisableVertexArray : Disable vertex array (VAO, if supported)
455
+ # @return [void]
456
+ [:rlDisableVertexArray, :rlDisableVertexArray, [], :void],
457
+
458
+ # rlEnableVertexBuffer : Enable vertex buffer (VBO)
459
+ # @param id [unsigned int]
460
+ # @return [void]
461
+ [:rlEnableVertexBuffer, :rlEnableVertexBuffer, [:uint], :void],
462
+
463
+ # rlDisableVertexBuffer : Disable vertex buffer (VBO)
464
+ # @return [void]
465
+ [:rlDisableVertexBuffer, :rlDisableVertexBuffer, [], :void],
466
+
467
+ # rlEnableVertexBufferElement : Enable vertex buffer element (VBO element)
468
+ # @param id [unsigned int]
469
+ # @return [void]
470
+ [:rlEnableVertexBufferElement, :rlEnableVertexBufferElement, [:uint], :void],
471
+
472
+ # rlDisableVertexBufferElement : Disable vertex buffer element (VBO element)
473
+ # @return [void]
474
+ [:rlDisableVertexBufferElement, :rlDisableVertexBufferElement, [], :void],
475
+
476
+ # rlEnableVertexAttribute : Enable vertex attribute index
477
+ # @param index [unsigned int]
478
+ # @return [void]
479
+ [:rlEnableVertexAttribute, :rlEnableVertexAttribute, [:uint], :void],
480
+
481
+ # rlDisableVertexAttribute : Disable vertex attribute index
482
+ # @param index [unsigned int]
483
+ # @return [void]
484
+ [:rlDisableVertexAttribute, :rlDisableVertexAttribute, [:uint], :void],
485
+
486
+ # rlActiveTextureSlot : Select and active a texture slot
487
+ # @param slot [int]
488
+ # @return [void]
489
+ [:rlActiveTextureSlot, :rlActiveTextureSlot, [:int], :void],
490
+
491
+ # rlEnableTexture : Enable texture
492
+ # @param id [unsigned int]
493
+ # @return [void]
494
+ [:rlEnableTexture, :rlEnableTexture, [:uint], :void],
495
+
496
+ # rlDisableTexture : Disable texture
497
+ # @return [void]
498
+ [:rlDisableTexture, :rlDisableTexture, [], :void],
499
+
500
+ # rlEnableTextureCubemap : Enable texture cubemap
501
+ # @param id [unsigned int]
502
+ # @return [void]
503
+ [:rlEnableTextureCubemap, :rlEnableTextureCubemap, [:uint], :void],
504
+
505
+ # rlDisableTextureCubemap : Disable texture cubemap
506
+ # @return [void]
507
+ [:rlDisableTextureCubemap, :rlDisableTextureCubemap, [], :void],
508
+
509
+ # rlTextureParameters : Set texture parameters (filter, wrap)
510
+ # @param id [unsigned int]
511
+ # @param param [int]
512
+ # @param value [int]
513
+ # @return [void]
514
+ [:rlTextureParameters, :rlTextureParameters, [:uint, :int, :int], :void],
515
+
516
+ # rlCubemapParameters : Set cubemap parameters (filter, wrap)
517
+ # @param id [unsigned int]
518
+ # @param param [int]
519
+ # @param value [int]
520
+ # @return [void]
521
+ [:rlCubemapParameters, :rlCubemapParameters, [:uint, :int, :int], :void],
522
+
523
+ # rlEnableShader : Enable shader program
524
+ # @param id [unsigned int]
525
+ # @return [void]
526
+ [:rlEnableShader, :rlEnableShader, [:uint], :void],
527
+
528
+ # rlDisableShader : Disable shader program
529
+ # @return [void]
530
+ [:rlDisableShader, :rlDisableShader, [], :void],
531
+
532
+ # rlEnableFramebuffer : Enable render texture (fbo)
533
+ # @param id [unsigned int]
534
+ # @return [void]
535
+ [:rlEnableFramebuffer, :rlEnableFramebuffer, [:uint], :void],
536
+
537
+ # rlDisableFramebuffer : Disable render texture (fbo), return to default framebuffer
538
+ # @return [void]
539
+ [:rlDisableFramebuffer, :rlDisableFramebuffer, [], :void],
540
+
541
+ # rlActiveDrawBuffers : Activate multiple draw color buffers
542
+ # @param count [int]
543
+ # @return [void]
544
+ [:rlActiveDrawBuffers, :rlActiveDrawBuffers, [:int], :void],
545
+
546
+ # rlEnableColorBlend : Enable color blending
547
+ # @return [void]
548
+ [:rlEnableColorBlend, :rlEnableColorBlend, [], :void],
549
+
550
+ # rlDisableColorBlend : Disable color blending
551
+ # @return [void]
552
+ [:rlDisableColorBlend, :rlDisableColorBlend, [], :void],
553
+
554
+ # rlEnableDepthTest : Enable depth test
555
+ # @return [void]
556
+ [:rlEnableDepthTest, :rlEnableDepthTest, [], :void],
557
+
558
+ # rlDisableDepthTest : Disable depth test
559
+ # @return [void]
560
+ [:rlDisableDepthTest, :rlDisableDepthTest, [], :void],
561
+
562
+ # rlEnableDepthMask : Enable depth write
563
+ # @return [void]
564
+ [:rlEnableDepthMask, :rlEnableDepthMask, [], :void],
565
+
566
+ # rlDisableDepthMask : Disable depth write
567
+ # @return [void]
568
+ [:rlDisableDepthMask, :rlDisableDepthMask, [], :void],
569
+
570
+ # rlEnableBackfaceCulling : Enable backface culling
571
+ # @return [void]
572
+ [:rlEnableBackfaceCulling, :rlEnableBackfaceCulling, [], :void],
573
+
574
+ # rlDisableBackfaceCulling : Disable backface culling
575
+ # @return [void]
576
+ [:rlDisableBackfaceCulling, :rlDisableBackfaceCulling, [], :void],
577
+
578
+ # rlSetCullFace : Set face culling mode
579
+ # @param mode [int]
580
+ # @return [void]
581
+ [:rlSetCullFace, :rlSetCullFace, [:int], :void],
582
+
583
+ # rlEnableScissorTest : Enable scissor test
584
+ # @return [void]
585
+ [:rlEnableScissorTest, :rlEnableScissorTest, [], :void],
586
+
587
+ # rlDisableScissorTest : Disable scissor test
588
+ # @return [void]
589
+ [:rlDisableScissorTest, :rlDisableScissorTest, [], :void],
590
+
591
+ # rlScissor : Scissor test
592
+ # @param x [int]
593
+ # @param y [int]
594
+ # @param width [int]
595
+ # @param height [int]
596
+ # @return [void]
597
+ [:rlScissor, :rlScissor, [:int, :int, :int, :int], :void],
598
+
599
+ # rlEnableWireMode : Enable wire mode
600
+ # @return [void]
601
+ [:rlEnableWireMode, :rlEnableWireMode, [], :void],
602
+
603
+ # rlDisableWireMode : Disable wire mode
604
+ # @return [void]
605
+ [:rlDisableWireMode, :rlDisableWireMode, [], :void],
606
+
607
+ # rlSetLineWidth : Set the line drawing width
608
+ # @param width [float]
609
+ # @return [void]
610
+ [:rlSetLineWidth, :rlSetLineWidth, [:float], :void],
611
+
612
+ # rlGetLineWidth : Get the line drawing width
613
+ # @return [float]
614
+ [:rlGetLineWidth, :rlGetLineWidth, [], :float],
615
+
616
+ # rlEnableSmoothLines : Enable line aliasing
617
+ # @return [void]
618
+ [:rlEnableSmoothLines, :rlEnableSmoothLines, [], :void],
619
+
620
+ # rlDisableSmoothLines : Disable line aliasing
621
+ # @return [void]
622
+ [:rlDisableSmoothLines, :rlDisableSmoothLines, [], :void],
623
+
624
+ # rlEnableStereoRender : Enable stereo rendering
625
+ # @return [void]
626
+ [:rlEnableStereoRender, :rlEnableStereoRender, [], :void],
627
+
628
+ # rlDisableStereoRender : Disable stereo rendering
629
+ # @return [void]
630
+ [:rlDisableStereoRender, :rlDisableStereoRender, [], :void],
631
+
632
+ # rlIsStereoRenderEnabled : Check if stereo render is enabled
633
+ # @return [bool]
634
+ [:rlIsStereoRenderEnabled, :rlIsStereoRenderEnabled, [], :bool],
635
+
636
+ # rlClearColor : Clear color buffer with color
637
+ # @param r [unsigned char]
638
+ # @param g [unsigned char]
639
+ # @param b [unsigned char]
640
+ # @param a [unsigned char]
641
+ # @return [void]
642
+ [:rlClearColor, :rlClearColor, [:uchar, :uchar, :uchar, :uchar], :void],
643
+
644
+ # rlClearScreenBuffers : Clear used screen buffers (color and depth)
645
+ # @return [void]
646
+ [:rlClearScreenBuffers, :rlClearScreenBuffers, [], :void],
647
+
648
+ # rlCheckErrors : Check and log OpenGL error codes
649
+ # @return [void]
650
+ [:rlCheckErrors, :rlCheckErrors, [], :void],
651
+
652
+ # rlSetBlendMode : Set blending mode
653
+ # @param mode [int]
654
+ # @return [void]
655
+ [:rlSetBlendMode, :rlSetBlendMode, [:int], :void],
656
+
657
+ # rlSetBlendFactors : Set blending mode factor and equation (using OpenGL factors)
658
+ # @param glSrcFactor [int]
659
+ # @param glDstFactor [int]
660
+ # @param glEquation [int]
661
+ # @return [void]
662
+ [:rlSetBlendFactors, :rlSetBlendFactors, [:int, :int, :int], :void],
663
+
664
+ # rlSetBlendFactorsSeparate : Set blending mode factors and equations separately (using OpenGL factors)
665
+ # @param glSrcRGB [int]
666
+ # @param glDstRGB [int]
667
+ # @param glSrcAlpha [int]
668
+ # @param glDstAlpha [int]
669
+ # @param glEqRGB [int]
670
+ # @param glEqAlpha [int]
671
+ # @return [void]
672
+ [:rlSetBlendFactorsSeparate, :rlSetBlendFactorsSeparate, [:int, :int, :int, :int, :int, :int], :void],
673
+
674
+ # rlglInit : Initialize rlgl (buffers, shaders, textures, states)
675
+ # @param width [int]
676
+ # @param height [int]
677
+ # @return [void]
678
+ [:rlglInit, :rlglInit, [:int, :int], :void],
679
+
680
+ # rlglClose : De-initialize rlgl (buffers, shaders, textures)
681
+ # @return [void]
682
+ [:rlglClose, :rlglClose, [], :void],
683
+
684
+ # rlLoadExtensions : Load OpenGL extensions (loader function required)
685
+ # @param loader [void *]
686
+ # @return [void]
687
+ [:rlLoadExtensions, :rlLoadExtensions, [:pointer], :void],
688
+
689
+ # rlGetVersion : Get current OpenGL version
690
+ # @return [int]
691
+ [:rlGetVersion, :rlGetVersion, [], :int],
692
+
693
+ # rlSetFramebufferWidth : Set current framebuffer width
694
+ # @param width [int]
695
+ # @return [void]
696
+ [:rlSetFramebufferWidth, :rlSetFramebufferWidth, [:int], :void],
697
+
698
+ # rlGetFramebufferWidth : Get default framebuffer width
699
+ # @return [int]
700
+ [:rlGetFramebufferWidth, :rlGetFramebufferWidth, [], :int],
701
+
702
+ # rlSetFramebufferHeight : Set current framebuffer height
703
+ # @param height [int]
704
+ # @return [void]
705
+ [:rlSetFramebufferHeight, :rlSetFramebufferHeight, [:int], :void],
706
+
707
+ # rlGetFramebufferHeight : Get default framebuffer height
708
+ # @return [int]
709
+ [:rlGetFramebufferHeight, :rlGetFramebufferHeight, [], :int],
710
+
711
+ # rlGetTextureIdDefault : Get default texture id
712
+ # @return [unsigned int]
713
+ [:rlGetTextureIdDefault, :rlGetTextureIdDefault, [], :uint],
714
+
715
+ # rlGetShaderIdDefault : Get default shader id
716
+ # @return [unsigned int]
717
+ [:rlGetShaderIdDefault, :rlGetShaderIdDefault, [], :uint],
718
+
719
+ # rlGetShaderLocsDefault : Get default shader locations
720
+ # @return [int *]
721
+ [:rlGetShaderLocsDefault, :rlGetShaderLocsDefault, [], :pointer],
722
+
723
+ # rlLoadRenderBatch : Load a render batch system
724
+ # @param numBuffers [int]
725
+ # @param bufferElements [int]
726
+ # @return [rlRenderBatch]
727
+ [:rlLoadRenderBatch, :rlLoadRenderBatch, [:int, :int], RlRenderBatch.by_value],
728
+
729
+ # rlUnloadRenderBatch : Unload render batch system
730
+ # @param batch [rlRenderBatch]
731
+ # @return [void]
732
+ [:rlUnloadRenderBatch, :rlUnloadRenderBatch, [RlRenderBatch.by_value], :void],
733
+
734
+ # rlDrawRenderBatch : Draw render batch data (Update->Draw->Reset)
735
+ # @param batch [rlRenderBatch *]
736
+ # @return [void]
737
+ [:rlDrawRenderBatch, :rlDrawRenderBatch, [:pointer], :void],
738
+
739
+ # rlSetRenderBatchActive : Set the active render batch for rlgl (NULL for default internal)
740
+ # @param batch [rlRenderBatch *]
741
+ # @return [void]
742
+ [:rlSetRenderBatchActive, :rlSetRenderBatchActive, [:pointer], :void],
743
+
744
+ # rlDrawRenderBatchActive : Update and draw internal render batch
745
+ # @return [void]
746
+ [:rlDrawRenderBatchActive, :rlDrawRenderBatchActive, [], :void],
747
+
748
+ # rlCheckRenderBatchLimit : Check internal buffer overflow for a given number of vertex
749
+ # @param vCount [int]
750
+ # @return [bool]
751
+ [:rlCheckRenderBatchLimit, :rlCheckRenderBatchLimit, [:int], :bool],
752
+
753
+ # rlSetTexture : Set current texture for render batch and check buffers limits
754
+ # @param id [unsigned int]
755
+ # @return [void]
756
+ [:rlSetTexture, :rlSetTexture, [:uint], :void],
757
+
758
+ # rlLoadVertexArray : Load vertex array (vao) if supported
759
+ # @return [unsigned int]
760
+ [:rlLoadVertexArray, :rlLoadVertexArray, [], :uint],
761
+
762
+ # rlLoadVertexBuffer : Load a vertex buffer attribute
763
+ # @param buffer [const void *]
764
+ # @param size [int]
765
+ # @param dynamic [bool]
766
+ # @return [unsigned int]
767
+ [:rlLoadVertexBuffer, :rlLoadVertexBuffer, [:pointer, :int, :bool], :uint],
768
+
769
+ # rlLoadVertexBufferElement : Load a new attributes element buffer
770
+ # @param buffer [const void *]
771
+ # @param size [int]
772
+ # @param dynamic [bool]
773
+ # @return [unsigned int]
774
+ [:rlLoadVertexBufferElement, :rlLoadVertexBufferElement, [:pointer, :int, :bool], :uint],
775
+
776
+ # rlUpdateVertexBuffer : Update GPU buffer with new data
777
+ # @param bufferId [unsigned int]
778
+ # @param data [const void *]
779
+ # @param dataSize [int]
780
+ # @param offset [int]
781
+ # @return [void]
782
+ [:rlUpdateVertexBuffer, :rlUpdateVertexBuffer, [:uint, :pointer, :int, :int], :void],
783
+
784
+ # rlUpdateVertexBufferElements : Update vertex buffer elements with new data
785
+ # @param id [unsigned int]
786
+ # @param data [const void *]
787
+ # @param dataSize [int]
788
+ # @param offset [int]
789
+ # @return [void]
790
+ [:rlUpdateVertexBufferElements, :rlUpdateVertexBufferElements, [:uint, :pointer, :int, :int], :void],
791
+
792
+ # rlUnloadVertexArray
793
+ # @param vaoId [unsigned int]
794
+ # @return [void]
795
+ [:rlUnloadVertexArray, :rlUnloadVertexArray, [:uint], :void],
796
+
797
+ # rlUnloadVertexBuffer
798
+ # @param vboId [unsigned int]
799
+ # @return [void]
800
+ [:rlUnloadVertexBuffer, :rlUnloadVertexBuffer, [:uint], :void],
801
+
802
+ # rlSetVertexAttribute
803
+ # @param index [unsigned int]
804
+ # @param compSize [int]
805
+ # @param type [int]
806
+ # @param normalized [bool]
807
+ # @param stride [int]
808
+ # @param pointer [const void *]
809
+ # @return [void]
810
+ [:rlSetVertexAttribute, :rlSetVertexAttribute, [:uint, :int, :int, :bool, :int, :pointer], :void],
811
+
812
+ # rlSetVertexAttributeDivisor
813
+ # @param index [unsigned int]
814
+ # @param divisor [int]
815
+ # @return [void]
816
+ [:rlSetVertexAttributeDivisor, :rlSetVertexAttributeDivisor, [:uint, :int], :void],
817
+
818
+ # rlSetVertexAttributeDefault : Set vertex attribute default value
819
+ # @param locIndex [int]
820
+ # @param value [const void *]
821
+ # @param attribType [int]
822
+ # @param count [int]
823
+ # @return [void]
824
+ [:rlSetVertexAttributeDefault, :rlSetVertexAttributeDefault, [:int, :pointer, :int, :int], :void],
825
+
826
+ # rlDrawVertexArray
827
+ # @param offset [int]
828
+ # @param count [int]
829
+ # @return [void]
830
+ [:rlDrawVertexArray, :rlDrawVertexArray, [:int, :int], :void],
831
+
832
+ # rlDrawVertexArrayElements
833
+ # @param offset [int]
834
+ # @param count [int]
835
+ # @param buffer [const void *]
836
+ # @return [void]
837
+ [:rlDrawVertexArrayElements, :rlDrawVertexArrayElements, [:int, :int, :pointer], :void],
838
+
839
+ # rlDrawVertexArrayInstanced
840
+ # @param offset [int]
841
+ # @param count [int]
842
+ # @param instances [int]
843
+ # @return [void]
844
+ [:rlDrawVertexArrayInstanced, :rlDrawVertexArrayInstanced, [:int, :int, :int], :void],
845
+
846
+ # rlDrawVertexArrayElementsInstanced
847
+ # @param offset [int]
848
+ # @param count [int]
849
+ # @param buffer [const void *]
850
+ # @param instances [int]
851
+ # @return [void]
852
+ [:rlDrawVertexArrayElementsInstanced, :rlDrawVertexArrayElementsInstanced, [:int, :int, :pointer, :int], :void],
853
+
854
+ # rlLoadTexture : Load texture in GPU
855
+ # @param data [const void *]
856
+ # @param width [int]
857
+ # @param height [int]
858
+ # @param format [int]
859
+ # @param mipmapCount [int]
860
+ # @return [unsigned int]
861
+ [:rlLoadTexture, :rlLoadTexture, [:pointer, :int, :int, :int, :int], :uint],
862
+
863
+ # rlLoadTextureDepth : Load depth texture/renderbuffer (to be attached to fbo)
864
+ # @param width [int]
865
+ # @param height [int]
866
+ # @param useRenderBuffer [bool]
867
+ # @return [unsigned int]
868
+ [:rlLoadTextureDepth, :rlLoadTextureDepth, [:int, :int, :bool], :uint],
869
+
870
+ # rlLoadTextureCubemap : Load texture cubemap
871
+ # @param data [const void *]
872
+ # @param size [int]
873
+ # @param format [int]
874
+ # @return [unsigned int]
875
+ [:rlLoadTextureCubemap, :rlLoadTextureCubemap, [:pointer, :int, :int], :uint],
876
+
877
+ # rlUpdateTexture : Update GPU texture with new data
878
+ # @param id [unsigned int]
879
+ # @param offsetX [int]
880
+ # @param offsetY [int]
881
+ # @param width [int]
882
+ # @param height [int]
883
+ # @param format [int]
884
+ # @param data [const void *]
885
+ # @return [void]
886
+ [:rlUpdateTexture, :rlUpdateTexture, [:uint, :int, :int, :int, :int, :int, :pointer], :void],
887
+
888
+ # rlGetGlTextureFormats : Get OpenGL internal formats
889
+ # @param format [int]
890
+ # @param glInternalFormat [unsigned int *]
891
+ # @param glFormat [unsigned int *]
892
+ # @param glType [unsigned int *]
893
+ # @return [void]
894
+ [:rlGetGlTextureFormats, :rlGetGlTextureFormats, [:int, :pointer, :pointer, :pointer], :void],
895
+
896
+ # rlGetPixelFormatName : Get name string for pixel format
897
+ # @param format [unsigned int]
898
+ # @return [const char *]
899
+ [:rlGetPixelFormatName, :rlGetPixelFormatName, [:uint], :pointer],
900
+
901
+ # rlUnloadTexture : Unload texture from GPU memory
902
+ # @param id [unsigned int]
903
+ # @return [void]
904
+ [:rlUnloadTexture, :rlUnloadTexture, [:uint], :void],
905
+
906
+ # rlGenTextureMipmaps : Generate mipmap data for selected texture
907
+ # @param id [unsigned int]
908
+ # @param width [int]
909
+ # @param height [int]
910
+ # @param format [int]
911
+ # @param mipmaps [int *]
912
+ # @return [void]
913
+ [:rlGenTextureMipmaps, :rlGenTextureMipmaps, [:uint, :int, :int, :int, :pointer], :void],
914
+
915
+ # rlReadTexturePixels : Read texture pixel data
916
+ # @param id [unsigned int]
917
+ # @param width [int]
918
+ # @param height [int]
919
+ # @param format [int]
920
+ # @return [void *]
921
+ [:rlReadTexturePixels, :rlReadTexturePixels, [:uint, :int, :int, :int], :pointer],
922
+
923
+ # rlReadScreenPixels : Read screen pixel data (color buffer)
924
+ # @param width [int]
925
+ # @param height [int]
926
+ # @return [unsigned char *]
927
+ [:rlReadScreenPixels, :rlReadScreenPixels, [:int, :int], :pointer],
928
+
929
+ # rlLoadFramebuffer : Load an empty framebuffer
930
+ # @param width [int]
931
+ # @param height [int]
932
+ # @return [unsigned int]
933
+ [:rlLoadFramebuffer, :rlLoadFramebuffer, [:int, :int], :uint],
934
+
935
+ # rlFramebufferAttach : Attach texture/renderbuffer to a framebuffer
936
+ # @param fboId [unsigned int]
937
+ # @param texId [unsigned int]
938
+ # @param attachType [int]
939
+ # @param texType [int]
940
+ # @param mipLevel [int]
941
+ # @return [void]
942
+ [:rlFramebufferAttach, :rlFramebufferAttach, [:uint, :uint, :int, :int, :int], :void],
943
+
944
+ # rlFramebufferComplete : Verify framebuffer is complete
945
+ # @param id [unsigned int]
946
+ # @return [bool]
947
+ [:rlFramebufferComplete, :rlFramebufferComplete, [:uint], :bool],
948
+
949
+ # rlUnloadFramebuffer : Delete framebuffer from GPU
950
+ # @param id [unsigned int]
951
+ # @return [void]
952
+ [:rlUnloadFramebuffer, :rlUnloadFramebuffer, [:uint], :void],
953
+
954
+ # rlLoadShaderCode : Load shader from code strings
955
+ # @param vsCode [const char *]
956
+ # @param fsCode [const char *]
957
+ # @return [unsigned int]
958
+ [:rlLoadShaderCode, :rlLoadShaderCode, [:pointer, :pointer], :uint],
959
+
960
+ # rlCompileShader : Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER)
961
+ # @param shaderCode [const char *]
962
+ # @param type [int]
963
+ # @return [unsigned int]
964
+ [:rlCompileShader, :rlCompileShader, [:pointer, :int], :uint],
965
+
966
+ # rlLoadShaderProgram : Load custom shader program
967
+ # @param vShaderId [unsigned int]
968
+ # @param fShaderId [unsigned int]
969
+ # @return [unsigned int]
970
+ [:rlLoadShaderProgram, :rlLoadShaderProgram, [:uint, :uint], :uint],
971
+
972
+ # rlUnloadShaderProgram : Unload shader program
973
+ # @param id [unsigned int]
974
+ # @return [void]
975
+ [:rlUnloadShaderProgram, :rlUnloadShaderProgram, [:uint], :void],
976
+
977
+ # rlGetLocationUniform : Get shader location uniform
978
+ # @param shaderId [unsigned int]
979
+ # @param uniformName [const char *]
980
+ # @return [int]
981
+ [:rlGetLocationUniform, :rlGetLocationUniform, [:uint, :pointer], :int],
982
+
983
+ # rlGetLocationAttrib : Get shader location attribute
984
+ # @param shaderId [unsigned int]
985
+ # @param attribName [const char *]
986
+ # @return [int]
987
+ [:rlGetLocationAttrib, :rlGetLocationAttrib, [:uint, :pointer], :int],
988
+
989
+ # rlSetUniform : Set shader value uniform
990
+ # @param locIndex [int]
991
+ # @param value [const void *]
992
+ # @param uniformType [int]
993
+ # @param count [int]
994
+ # @return [void]
995
+ [:rlSetUniform, :rlSetUniform, [:int, :pointer, :int, :int], :void],
996
+
997
+ # rlSetUniformMatrix : Set shader value matrix
998
+ # @param locIndex [int]
999
+ # @param mat [Matrix]
1000
+ # @return [void]
1001
+ [:rlSetUniformMatrix, :rlSetUniformMatrix, [:int, Matrix.by_value], :void],
1002
+
1003
+ # rlSetUniformSampler : Set shader value sampler
1004
+ # @param locIndex [int]
1005
+ # @param textureId [unsigned int]
1006
+ # @return [void]
1007
+ [:rlSetUniformSampler, :rlSetUniformSampler, [:int, :uint], :void],
1008
+
1009
+ # rlSetShader : Set shader currently active (id and locations)
1010
+ # @param id [unsigned int]
1011
+ # @param locs [int *]
1012
+ # @return [void]
1013
+ [:rlSetShader, :rlSetShader, [:uint, :pointer], :void],
1014
+
1015
+ # rlLoadComputeShaderProgram : Load compute shader program
1016
+ # @param shaderId [unsigned int]
1017
+ # @return [unsigned int]
1018
+ [:rlLoadComputeShaderProgram, :rlLoadComputeShaderProgram, [:uint], :uint],
1019
+
1020
+ # rlComputeShaderDispatch : Dispatch compute shader (equivalent to *draw* for graphics pipeline)
1021
+ # @param groupX [unsigned int]
1022
+ # @param groupY [unsigned int]
1023
+ # @param groupZ [unsigned int]
1024
+ # @return [void]
1025
+ [:rlComputeShaderDispatch, :rlComputeShaderDispatch, [:uint, :uint, :uint], :void],
1026
+
1027
+ # rlLoadShaderBuffer : Load shader storage buffer object (SSBO)
1028
+ # @param size [unsigned int]
1029
+ # @param data [const void *]
1030
+ # @param usageHint [int]
1031
+ # @return [unsigned int]
1032
+ [:rlLoadShaderBuffer, :rlLoadShaderBuffer, [:uint, :pointer, :int], :uint],
1033
+
1034
+ # rlUnloadShaderBuffer : Unload shader storage buffer object (SSBO)
1035
+ # @param ssboId [unsigned int]
1036
+ # @return [void]
1037
+ [:rlUnloadShaderBuffer, :rlUnloadShaderBuffer, [:uint], :void],
1038
+
1039
+ # rlUpdateShaderBuffer : Update SSBO buffer data
1040
+ # @param id [unsigned int]
1041
+ # @param data [const void *]
1042
+ # @param dataSize [unsigned int]
1043
+ # @param offset [unsigned int]
1044
+ # @return [void]
1045
+ [:rlUpdateShaderBuffer, :rlUpdateShaderBuffer, [:uint, :pointer, :uint, :uint], :void],
1046
+
1047
+ # rlBindShaderBuffer : Bind SSBO buffer
1048
+ # @param id [unsigned int]
1049
+ # @param index [unsigned int]
1050
+ # @return [void]
1051
+ [:rlBindShaderBuffer, :rlBindShaderBuffer, [:uint, :uint], :void],
1052
+
1053
+ # rlReadShaderBuffer : Read SSBO buffer data (GPU->CPU)
1054
+ # @param id [unsigned int]
1055
+ # @param dest [void *]
1056
+ # @param count [unsigned int]
1057
+ # @param offset [unsigned int]
1058
+ # @return [void]
1059
+ [:rlReadShaderBuffer, :rlReadShaderBuffer, [:uint, :pointer, :uint, :uint], :void],
1060
+
1061
+ # rlCopyShaderBuffer : Copy SSBO data between buffers
1062
+ # @param destId [unsigned int]
1063
+ # @param srcId [unsigned int]
1064
+ # @param destOffset [unsigned int]
1065
+ # @param srcOffset [unsigned int]
1066
+ # @param count [unsigned int]
1067
+ # @return [void]
1068
+ [:rlCopyShaderBuffer, :rlCopyShaderBuffer, [:uint, :uint, :uint, :uint, :uint], :void],
1069
+
1070
+ # rlGetShaderBufferSize : Get SSBO buffer size
1071
+ # @param id [unsigned int]
1072
+ # @return [unsigned int]
1073
+ [:rlGetShaderBufferSize, :rlGetShaderBufferSize, [:uint], :uint],
1074
+
1075
+ # rlBindImageTexture : Bind image texture
1076
+ # @param id [unsigned int]
1077
+ # @param index [unsigned int]
1078
+ # @param format [int]
1079
+ # @param readonly [bool]
1080
+ # @return [void]
1081
+ [:rlBindImageTexture, :rlBindImageTexture, [:uint, :uint, :int, :bool], :void],
1082
+
1083
+ # rlGetMatrixModelview : Get internal modelview matrix
1084
+ # @return [Matrix]
1085
+ [:rlGetMatrixModelview, :rlGetMatrixModelview, [], Matrix.by_value],
1086
+
1087
+ # rlGetMatrixProjection : Get internal projection matrix
1088
+ # @return [Matrix]
1089
+ [:rlGetMatrixProjection, :rlGetMatrixProjection, [], Matrix.by_value],
1090
+
1091
+ # rlGetMatrixTransform : Get internal accumulated transform matrix
1092
+ # @return [Matrix]
1093
+ [:rlGetMatrixTransform, :rlGetMatrixTransform, [], Matrix.by_value],
1094
+
1095
+ # rlGetMatrixProjectionStereo : Get internal projection matrix for stereo render (selected eye)
1096
+ # @param eye [int]
1097
+ # @return [Matrix]
1098
+ [:rlGetMatrixProjectionStereo, :rlGetMatrixProjectionStereo, [:int], Matrix.by_value],
1099
+
1100
+ # rlGetMatrixViewOffsetStereo : Get internal view offset matrix for stereo render (selected eye)
1101
+ # @param eye [int]
1102
+ # @return [Matrix]
1103
+ [:rlGetMatrixViewOffsetStereo, :rlGetMatrixViewOffsetStereo, [:int], Matrix.by_value],
1104
+
1105
+ # rlSetMatrixProjection : Set a custom projection matrix (replaces internal projection matrix)
1106
+ # @param proj [Matrix]
1107
+ # @return [void]
1108
+ [:rlSetMatrixProjection, :rlSetMatrixProjection, [Matrix.by_value], :void],
1109
+
1110
+ # rlSetMatrixModelview : Set a custom modelview matrix (replaces internal modelview matrix)
1111
+ # @param view [Matrix]
1112
+ # @return [void]
1113
+ [:rlSetMatrixModelview, :rlSetMatrixModelview, [Matrix.by_value], :void],
1114
+
1115
+ # rlSetMatrixProjectionStereo : Set eyes projection matrices for stereo rendering
1116
+ # @param right [Matrix]
1117
+ # @param left [Matrix]
1118
+ # @return [void]
1119
+ [:rlSetMatrixProjectionStereo, :rlSetMatrixProjectionStereo, [Matrix.by_value, Matrix.by_value], :void],
1120
+
1121
+ # rlSetMatrixViewOffsetStereo : Set eyes view offsets matrices for stereo rendering
1122
+ # @param right [Matrix]
1123
+ # @param left [Matrix]
1124
+ # @return [void]
1125
+ [:rlSetMatrixViewOffsetStereo, :rlSetMatrixViewOffsetStereo, [Matrix.by_value, Matrix.by_value], :void],
1126
+
1127
+ # rlLoadDrawCube : Load and draw a cube
1128
+ # @return [void]
1129
+ [:rlLoadDrawCube, :rlLoadDrawCube, [], :void],
1130
+
1131
+ # rlLoadDrawQuad : Load and draw a quad
1132
+ # @return [void]
1133
+ [:rlLoadDrawQuad, :rlLoadDrawQuad, [], :void],
1134
+ ]
1135
+ entries.each do |entry|
1136
+ attach_function entry[0], entry[1], entry[2], entry[3]
1137
+ rescue FFI::NotFoundError => e
1138
+ warn "[Warning] Failed to import #{entry[0]} (#{e})."
1139
+ end
1140
+ end
1141
+ end