raylib-bindings 0.7.9-x86_64-linux → 0.7.10-x86_64-linux

Sign up to get free protection for your applications and to get access to all the features.
data/lib/rlgl.rb CHANGED
@@ -1,1374 +1,1375 @@
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 = "5.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_MIN = 0x8007 # GL_MIN
69
- RL_MAX = 0x8008 # GL_MAX
70
- RL_FUNC_SUBTRACT = 0x800A # GL_FUNC_SUBTRACT
71
- RL_FUNC_REVERSE_SUBTRACT = 0x800B # GL_FUNC_REVERSE_SUBTRACT
72
- RL_BLEND_EQUATION = 0x8009 # GL_BLEND_EQUATION
73
- RL_BLEND_EQUATION_RGB = 0x8009 # GL_BLEND_EQUATION_RGB // (Same as BLEND_EQUATION)
74
- RL_BLEND_EQUATION_ALPHA = 0x883D # GL_BLEND_EQUATION_ALPHA
75
- RL_BLEND_DST_RGB = 0x80C8 # GL_BLEND_DST_RGB
76
- RL_BLEND_SRC_RGB = 0x80C9 # GL_BLEND_SRC_RGB
77
- RL_BLEND_DST_ALPHA = 0x80CA # GL_BLEND_DST_ALPHA
78
- RL_BLEND_SRC_ALPHA = 0x80CB # GL_BLEND_SRC_ALPHA
79
- RL_BLEND_COLOR = 0x8005 # GL_BLEND_COLOR
80
- RL_READ_FRAMEBUFFER = 0x8CA8 # GL_READ_FRAMEBUFFER
81
- RL_DRAW_FRAMEBUFFER = 0x8CA9 # GL_DRAW_FRAMEBUFFER
82
-
83
- # Enum
84
-
85
- # enum rlGlVersion
86
- # OpenGL version
87
- RL_OPENGL_11 = 1 # OpenGL 1.1
88
- RL_OPENGL_21 = 2 # OpenGL 2.1 (GLSL 120)
89
- RL_OPENGL_33 = 3 # OpenGL 3.3 (GLSL 330)
90
- RL_OPENGL_43 = 4 # OpenGL 4.3 (using GLSL 330)
91
- RL_OPENGL_ES_20 = 5 # OpenGL ES 2.0 (GLSL 100)
92
- RL_OPENGL_ES_30 = 6 # OpenGL ES 3.0 (GLSL 300 es)
93
-
94
- # enum rlTraceLogLevel
95
- # Trace log level
96
- RL_LOG_ALL = 0 # Display all logs
97
- RL_LOG_TRACE = 1 # Trace logging, intended for internal use only
98
- RL_LOG_DEBUG = 2 # Debug logging, used for internal debugging, it should be disabled on release builds
99
- RL_LOG_INFO = 3 # Info logging, used for program execution info
100
- RL_LOG_WARNING = 4 # Warning logging, used on recoverable failures
101
- RL_LOG_ERROR = 5 # Error logging, used on unrecoverable failures
102
- RL_LOG_FATAL = 6 # Fatal logging, used to abort program: exit(EXIT_FAILURE)
103
- RL_LOG_NONE = 7 # Disable logging
104
-
105
- # enum rlPixelFormat
106
- # Texture pixel formats
107
- RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1 # 8 bit per pixel (no alpha)
108
- RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2 # 8*2 bpp (2 channels)
109
- RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3 # 16 bpp
110
- RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4 # 24 bpp
111
- RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5 # 16 bpp (1 bit alpha)
112
- RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6 # 16 bpp (4 bit alpha)
113
- RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7 # 32 bpp
114
- RL_PIXELFORMAT_UNCOMPRESSED_R32 = 8 # 32 bpp (1 channel - float)
115
- RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9 # 32*3 bpp (3 channels - float)
116
- RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10 # 32*4 bpp (4 channels - float)
117
- RL_PIXELFORMAT_UNCOMPRESSED_R16 = 11 # 16 bpp (1 channel - half float)
118
- RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12 # 16*3 bpp (3 channels - half float)
119
- RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13 # 16*4 bpp (4 channels - half float)
120
- RL_PIXELFORMAT_COMPRESSED_DXT1_RGB = 14 # 4 bpp (no alpha)
121
- RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15 # 4 bpp (1 bit alpha)
122
- RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16 # 8 bpp
123
- RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17 # 8 bpp
124
- RL_PIXELFORMAT_COMPRESSED_ETC1_RGB = 18 # 4 bpp
125
- RL_PIXELFORMAT_COMPRESSED_ETC2_RGB = 19 # 4 bpp
126
- RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20 # 8 bpp
127
- RL_PIXELFORMAT_COMPRESSED_PVRT_RGB = 21 # 4 bpp
128
- RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22 # 4 bpp
129
- RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23 # 8 bpp
130
- RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24 # 2 bpp
131
-
132
- # enum rlTextureFilter
133
- # Texture parameters: filter mode
134
- RL_TEXTURE_FILTER_POINT = 0 # No filter, just pixel approximation
135
- RL_TEXTURE_FILTER_BILINEAR = 1 # Linear filtering
136
- RL_TEXTURE_FILTER_TRILINEAR = 2 # Trilinear filtering (linear with mipmaps)
137
- RL_TEXTURE_FILTER_ANISOTROPIC_4X = 3 # Anisotropic filtering 4x
138
- RL_TEXTURE_FILTER_ANISOTROPIC_8X = 4 # Anisotropic filtering 8x
139
- RL_TEXTURE_FILTER_ANISOTROPIC_16X = 5 # Anisotropic filtering 16x
140
-
141
- # enum rlBlendMode
142
- # Color blending modes (pre-defined)
143
- RL_BLEND_ALPHA = 0 # Blend textures considering alpha (default)
144
- RL_BLEND_ADDITIVE = 1 # Blend textures adding colors
145
- RL_BLEND_MULTIPLIED = 2 # Blend textures multiplying colors
146
- RL_BLEND_ADD_COLORS = 3 # Blend textures adding colors (alternative)
147
- RL_BLEND_SUBTRACT_COLORS = 4 # Blend textures subtracting colors (alternative)
148
- RL_BLEND_ALPHA_PREMULTIPLY = 5 # Blend premultiplied textures considering alpha
149
- RL_BLEND_CUSTOM = 6 # Blend textures using custom src/dst factors (use rlSetBlendFactors())
150
- RL_BLEND_CUSTOM_SEPARATE = 7 # Blend textures using custom src/dst factors (use rlSetBlendFactorsSeparate())
151
-
152
- # enum rlShaderLocationIndex
153
- # Shader location point type
154
- RL_SHADER_LOC_VERTEX_POSITION = 0 # Shader location: vertex attribute: position
155
- RL_SHADER_LOC_VERTEX_TEXCOORD01 = 1 # Shader location: vertex attribute: texcoord01
156
- RL_SHADER_LOC_VERTEX_TEXCOORD02 = 2 # Shader location: vertex attribute: texcoord02
157
- RL_SHADER_LOC_VERTEX_NORMAL = 3 # Shader location: vertex attribute: normal
158
- RL_SHADER_LOC_VERTEX_TANGENT = 4 # Shader location: vertex attribute: tangent
159
- RL_SHADER_LOC_VERTEX_COLOR = 5 # Shader location: vertex attribute: color
160
- RL_SHADER_LOC_MATRIX_MVP = 6 # Shader location: matrix uniform: model-view-projection
161
- RL_SHADER_LOC_MATRIX_VIEW = 7 # Shader location: matrix uniform: view (camera transform)
162
- RL_SHADER_LOC_MATRIX_PROJECTION = 8 # Shader location: matrix uniform: projection
163
- RL_SHADER_LOC_MATRIX_MODEL = 9 # Shader location: matrix uniform: model (transform)
164
- RL_SHADER_LOC_MATRIX_NORMAL = 10 # Shader location: matrix uniform: normal
165
- RL_SHADER_LOC_VECTOR_VIEW = 11 # Shader location: vector uniform: view
166
- RL_SHADER_LOC_COLOR_DIFFUSE = 12 # Shader location: vector uniform: diffuse color
167
- RL_SHADER_LOC_COLOR_SPECULAR = 13 # Shader location: vector uniform: specular color
168
- RL_SHADER_LOC_COLOR_AMBIENT = 14 # Shader location: vector uniform: ambient color
169
- RL_SHADER_LOC_MAP_ALBEDO = 15 # Shader location: sampler2d texture: albedo (same as: RL_SHADER_LOC_MAP_DIFFUSE)
170
- RL_SHADER_LOC_MAP_METALNESS = 16 # Shader location: sampler2d texture: metalness (same as: RL_SHADER_LOC_MAP_SPECULAR)
171
- RL_SHADER_LOC_MAP_NORMAL = 17 # Shader location: sampler2d texture: normal
172
- RL_SHADER_LOC_MAP_ROUGHNESS = 18 # Shader location: sampler2d texture: roughness
173
- RL_SHADER_LOC_MAP_OCCLUSION = 19 # Shader location: sampler2d texture: occlusion
174
- RL_SHADER_LOC_MAP_EMISSION = 20 # Shader location: sampler2d texture: emission
175
- RL_SHADER_LOC_MAP_HEIGHT = 21 # Shader location: sampler2d texture: height
176
- RL_SHADER_LOC_MAP_CUBEMAP = 22 # Shader location: samplerCube texture: cubemap
177
- RL_SHADER_LOC_MAP_IRRADIANCE = 23 # Shader location: samplerCube texture: irradiance
178
- RL_SHADER_LOC_MAP_PREFILTER = 24 # Shader location: samplerCube texture: prefilter
179
- RL_SHADER_LOC_MAP_BRDF = 25 # Shader location: sampler2d texture: brdf
180
-
181
- # enum rlShaderUniformDataType
182
- # Shader uniform data type
183
- RL_SHADER_UNIFORM_FLOAT = 0 # Shader uniform type: float
184
- RL_SHADER_UNIFORM_VEC2 = 1 # Shader uniform type: vec2 (2 float)
185
- RL_SHADER_UNIFORM_VEC3 = 2 # Shader uniform type: vec3 (3 float)
186
- RL_SHADER_UNIFORM_VEC4 = 3 # Shader uniform type: vec4 (4 float)
187
- RL_SHADER_UNIFORM_INT = 4 # Shader uniform type: int
188
- RL_SHADER_UNIFORM_IVEC2 = 5 # Shader uniform type: ivec2 (2 int)
189
- RL_SHADER_UNIFORM_IVEC3 = 6 # Shader uniform type: ivec3 (3 int)
190
- RL_SHADER_UNIFORM_IVEC4 = 7 # Shader uniform type: ivec4 (4 int)
191
- RL_SHADER_UNIFORM_UINT = 8 # Shader uniform type: unsigned int
192
- RL_SHADER_UNIFORM_UIVEC2 = 9 # Shader uniform type: uivec2 (2 unsigned int)
193
- RL_SHADER_UNIFORM_UIVEC3 = 10 # Shader uniform type: uivec3 (3 unsigned int)
194
- RL_SHADER_UNIFORM_UIVEC4 = 11 # Shader uniform type: uivec4 (4 unsigned int)
195
- RL_SHADER_UNIFORM_SAMPLER2D = 12 # Shader uniform type: sampler2d
196
-
197
- # enum rlShaderAttributeDataType
198
- # Shader attribute data types
199
- RL_SHADER_ATTRIB_FLOAT = 0 # Shader attribute type: float
200
- RL_SHADER_ATTRIB_VEC2 = 1 # Shader attribute type: vec2 (2 float)
201
- RL_SHADER_ATTRIB_VEC3 = 2 # Shader attribute type: vec3 (3 float)
202
- RL_SHADER_ATTRIB_VEC4 = 3 # Shader attribute type: vec4 (4 float)
203
-
204
- # enum rlFramebufferAttachType
205
- # Framebuffer attachment type
206
- RL_ATTACHMENT_COLOR_CHANNEL0 = 0 # Framebuffer attachment type: color 0
207
- RL_ATTACHMENT_COLOR_CHANNEL1 = 1 # Framebuffer attachment type: color 1
208
- RL_ATTACHMENT_COLOR_CHANNEL2 = 2 # Framebuffer attachment type: color 2
209
- RL_ATTACHMENT_COLOR_CHANNEL3 = 3 # Framebuffer attachment type: color 3
210
- RL_ATTACHMENT_COLOR_CHANNEL4 = 4 # Framebuffer attachment type: color 4
211
- RL_ATTACHMENT_COLOR_CHANNEL5 = 5 # Framebuffer attachment type: color 5
212
- RL_ATTACHMENT_COLOR_CHANNEL6 = 6 # Framebuffer attachment type: color 6
213
- RL_ATTACHMENT_COLOR_CHANNEL7 = 7 # Framebuffer attachment type: color 7
214
- RL_ATTACHMENT_DEPTH = 100 # Framebuffer attachment type: depth
215
- RL_ATTACHMENT_STENCIL = 200 # Framebuffer attachment type: stencil
216
-
217
- # enum rlFramebufferAttachTextureType
218
- # Framebuffer texture attachment type
219
- RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0 # Framebuffer texture attachment type: cubemap, +X side
220
- RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1 # Framebuffer texture attachment type: cubemap, -X side
221
- RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2 # Framebuffer texture attachment type: cubemap, +Y side
222
- RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3 # Framebuffer texture attachment type: cubemap, -Y side
223
- RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4 # Framebuffer texture attachment type: cubemap, +Z side
224
- RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5 # Framebuffer texture attachment type: cubemap, -Z side
225
- RL_ATTACHMENT_TEXTURE2D = 100 # Framebuffer texture attachment type: texture2d
226
- RL_ATTACHMENT_RENDERBUFFER = 200 # Framebuffer texture attachment type: renderbuffer
227
-
228
- # enum rlCullMode
229
- # Face culling mode
230
- RL_CULL_FACE_FRONT = 0
231
- RL_CULL_FACE_BACK = 1
232
-
233
-
234
- # Typedef
235
-
236
- typedef :int, :rlGlVersion
237
- typedef :int, :rlTraceLogLevel
238
- typedef :int, :rlPixelFormat
239
- typedef :int, :rlTextureFilter
240
- typedef :int, :rlBlendMode
241
- typedef :int, :rlShaderLocationIndex
242
- typedef :int, :rlShaderUniformDataType
243
- typedef :int, :rlShaderAttributeDataType
244
- typedef :int, :rlFramebufferAttachType
245
- typedef :int, :rlFramebufferAttachTextureType
246
- typedef :int, :rlCullMode
247
-
248
- # Struct
249
-
250
- # Dynamic vertex buffers (position + texcoords + colors + indices arrays)
251
- class RlVertexBuffer < FFI::Struct
252
- layout(
253
- :elementCount, :int, # Number of elements in the buffer (QUADS)
254
- :vertices, :pointer, # Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
255
- :texcoords, :pointer, # Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
256
- :normals, :pointer, # Vertex normal (XYZ - 3 components per vertex) (shader-location = 2)
257
- :colors, :pointer, # Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
258
- :indices, :pointer, # Vertex indices (in case vertex data comes indexed) (6 indices per quad)
259
- :vaoId, :uint, # OpenGL Vertex Array Object id
260
- :vboId, [:uint, 5], # OpenGL Vertex Buffer Objects id (5 types of vertex data)
261
- )
262
- def elementCount = self[:elementCount]
263
- def elementCount=(v) self[:elementCount] = v end
264
- def vertices = self[:vertices]
265
- def vertices=(v) self[:vertices] = v end
266
- def texcoords = self[:texcoords]
267
- def texcoords=(v) self[:texcoords] = v end
268
- def normals = self[:normals]
269
- def normals=(v) self[:normals] = v end
270
- def colors = self[:colors]
271
- def colors=(v) self[:colors] = v end
272
- def indices = self[:indices]
273
- def indices=(v) self[:indices] = v end
274
- def vaoId = self[:vaoId]
275
- def vaoId=(v) self[:vaoId] = v end
276
- def vboId = self[:vboId]
277
- def vboId=(v) self[:vboId] = v end
278
- end
279
-
280
- # of those state-change happens (this is done in core module)
281
- class RlDrawCall < FFI::Struct
282
- layout(
283
- :mode, :int, # Drawing mode: LINES, TRIANGLES, QUADS
284
- :vertexCount, :int, # Number of vertex of the draw
285
- :vertexAlignment, :int, # Number of vertex required for index alignment (LINES, TRIANGLES)
286
- :textureId, :uint, # Texture id to be used on the draw -> Use to create new draw call if changes
287
- )
288
- def mode = self[:mode]
289
- def mode=(v) self[:mode] = v end
290
- def vertexCount = self[:vertexCount]
291
- def vertexCount=(v) self[:vertexCount] = v end
292
- def vertexAlignment = self[:vertexAlignment]
293
- def vertexAlignment=(v) self[:vertexAlignment] = v end
294
- def textureId = self[:textureId]
295
- def textureId=(v) self[:textureId] = v end
296
- end
297
-
298
- # rlRenderBatch type
299
- class RlRenderBatch < FFI::Struct
300
- layout(
301
- :bufferCount, :int, # Number of vertex buffers (multi-buffering support)
302
- :currentBuffer, :int, # Current buffer tracking in case of multi-buffering
303
- :vertexBuffer, :pointer, # Dynamic buffer(s) for vertex data
304
- :draws, :pointer, # Draw calls array, depends on textureId
305
- :drawCounter, :int, # Draw calls counter
306
- :currentDepth, :float, # Current depth value for next draw
307
- )
308
- def bufferCount = self[:bufferCount]
309
- def bufferCount=(v) self[:bufferCount] = v end
310
- def currentBuffer = self[:currentBuffer]
311
- def currentBuffer=(v) self[:currentBuffer] = v end
312
- def vertexBuffer = self[:vertexBuffer]
313
- def vertexBuffer=(v) self[:vertexBuffer] = v end
314
- def draws = self[:draws]
315
- def draws=(v) self[:draws] = v end
316
- def drawCounter = self[:drawCounter]
317
- def drawCounter=(v) self[:drawCounter] = v end
318
- def currentDepth = self[:currentDepth]
319
- def currentDepth=(v) self[:currentDepth] = v end
320
- end
321
-
322
-
323
- # Function
324
-
325
- def self.setup_rlgl_symbols(method_naming: :original)
326
- entries = [
327
-
328
- # @!method rlMatrixMode(mode)
329
- # rlMatrixMode : Choose the current matrix to be transformed
330
- # @param mode [int]
331
- # @return [void]
332
- [:rlMatrixMode, :rlMatrixMode, [:int], :void],
333
-
334
- # @!method rlPushMatrix()
335
- # rlPushMatrix : Push the current matrix to stack
336
- # @return [void]
337
- [:rlPushMatrix, :rlPushMatrix, [], :void],
338
-
339
- # @!method rlPopMatrix()
340
- # rlPopMatrix : Pop latest inserted matrix from stack
341
- # @return [void]
342
- [:rlPopMatrix, :rlPopMatrix, [], :void],
343
-
344
- # @!method rlLoadIdentity()
345
- # rlLoadIdentity : Reset current matrix to identity matrix
346
- # @return [void]
347
- [:rlLoadIdentity, :rlLoadIdentity, [], :void],
348
-
349
- # @!method rlTranslatef(x, y, z)
350
- # rlTranslatef : Multiply the current matrix by a translation matrix
351
- # @param x [float]
352
- # @param y [float]
353
- # @param z [float]
354
- # @return [void]
355
- [:rlTranslatef, :rlTranslatef, [:float, :float, :float], :void],
356
-
357
- # @!method rlRotatef(angle, x, y, z)
358
- # rlRotatef : Multiply the current matrix by a rotation matrix
359
- # @param angle [float]
360
- # @param x [float]
361
- # @param y [float]
362
- # @param z [float]
363
- # @return [void]
364
- [:rlRotatef, :rlRotatef, [:float, :float, :float, :float], :void],
365
-
366
- # @!method rlScalef(x, y, z)
367
- # rlScalef : Multiply the current matrix by a scaling matrix
368
- # @param x [float]
369
- # @param y [float]
370
- # @param z [float]
371
- # @return [void]
372
- [:rlScalef, :rlScalef, [:float, :float, :float], :void],
373
-
374
- # @!method rlMultMatrixf(matf)
375
- # rlMultMatrixf : Multiply the current matrix by another matrix
376
- # @param matf [const float *]
377
- # @return [void]
378
- [:rlMultMatrixf, :rlMultMatrixf, [:pointer], :void],
379
-
380
- # @!method rlFrustum(left, right, bottom, top, znear, zfar)
381
- # rlFrustum
382
- # @param left [double]
383
- # @param right [double]
384
- # @param bottom [double]
385
- # @param top [double]
386
- # @param znear [double]
387
- # @param zfar [double]
388
- # @return [void]
389
- [:rlFrustum, :rlFrustum, [:double, :double, :double, :double, :double, :double], :void],
390
-
391
- # @!method rlOrtho(left, right, bottom, top, znear, zfar)
392
- # rlOrtho
393
- # @param left [double]
394
- # @param right [double]
395
- # @param bottom [double]
396
- # @param top [double]
397
- # @param znear [double]
398
- # @param zfar [double]
399
- # @return [void]
400
- [:rlOrtho, :rlOrtho, [:double, :double, :double, :double, :double, :double], :void],
401
-
402
- # @!method rlViewport(x, y, width, height)
403
- # rlViewport : Set the viewport area
404
- # @param x [int]
405
- # @param y [int]
406
- # @param width [int]
407
- # @param height [int]
408
- # @return [void]
409
- [:rlViewport, :rlViewport, [:int, :int, :int, :int], :void],
410
-
411
- # @!method rlSetClipPlanes(nearPlane, farPlane)
412
- # rlSetClipPlanes : Set clip planes distances
413
- # @param nearPlane [double]
414
- # @param farPlane [double]
415
- # @return [void]
416
- [:rlSetClipPlanes, :rlSetClipPlanes, [:double, :double], :void],
417
-
418
- # @!method rlGetCullDistanceNear()
419
- # rlGetCullDistanceNear : Get cull plane distance near
420
- # @return [double]
421
- [:rlGetCullDistanceNear, :rlGetCullDistanceNear, [], :double],
422
-
423
- # @!method rlGetCullDistanceFar()
424
- # rlGetCullDistanceFar : Get cull plane distance far
425
- # @return [double]
426
- [:rlGetCullDistanceFar, :rlGetCullDistanceFar, [], :double],
427
-
428
- # @!method rlBegin(mode)
429
- # rlBegin : Initialize drawing mode (how to organize vertex)
430
- # @param mode [int]
431
- # @return [void]
432
- [:rlBegin, :rlBegin, [:int], :void],
433
-
434
- # @!method rlEnd()
435
- # rlEnd : Finish vertex providing
436
- # @return [void]
437
- [:rlEnd, :rlEnd, [], :void],
438
-
439
- # @!method rlVertex2i(x, y)
440
- # rlVertex2i : Define one vertex (position) - 2 int
441
- # @param x [int]
442
- # @param y [int]
443
- # @return [void]
444
- [:rlVertex2i, :rlVertex2i, [:int, :int], :void],
445
-
446
- # @!method rlVertex2f(x, y)
447
- # rlVertex2f : Define one vertex (position) - 2 float
448
- # @param x [float]
449
- # @param y [float]
450
- # @return [void]
451
- [:rlVertex2f, :rlVertex2f, [:float, :float], :void],
452
-
453
- # @!method rlVertex3f(x, y, z)
454
- # rlVertex3f : Define one vertex (position) - 3 float
455
- # @param x [float]
456
- # @param y [float]
457
- # @param z [float]
458
- # @return [void]
459
- [:rlVertex3f, :rlVertex3f, [:float, :float, :float], :void],
460
-
461
- # @!method rlTexCoord2f(x, y)
462
- # rlTexCoord2f : Define one vertex (texture coordinate) - 2 float
463
- # @param x [float]
464
- # @param y [float]
465
- # @return [void]
466
- [:rlTexCoord2f, :rlTexCoord2f, [:float, :float], :void],
467
-
468
- # @!method rlNormal3f(x, y, z)
469
- # rlNormal3f : Define one vertex (normal) - 3 float
470
- # @param x [float]
471
- # @param y [float]
472
- # @param z [float]
473
- # @return [void]
474
- [:rlNormal3f, :rlNormal3f, [:float, :float, :float], :void],
475
-
476
- # @!method rlColor4ub(r, g, b, a)
477
- # rlColor4ub : Define one vertex (color) - 4 byte
478
- # @param r [unsigned char]
479
- # @param g [unsigned char]
480
- # @param b [unsigned char]
481
- # @param a [unsigned char]
482
- # @return [void]
483
- [:rlColor4ub, :rlColor4ub, [:uchar, :uchar, :uchar, :uchar], :void],
484
-
485
- # @!method rlColor3f(x, y, z)
486
- # rlColor3f : Define one vertex (color) - 3 float
487
- # @param x [float]
488
- # @param y [float]
489
- # @param z [float]
490
- # @return [void]
491
- [:rlColor3f, :rlColor3f, [:float, :float, :float], :void],
492
-
493
- # @!method rlColor4f(x, y, z, w)
494
- # rlColor4f : Define one vertex (color) - 4 float
495
- # @param x [float]
496
- # @param y [float]
497
- # @param z [float]
498
- # @param w [float]
499
- # @return [void]
500
- [:rlColor4f, :rlColor4f, [:float, :float, :float, :float], :void],
501
-
502
- # @!method rlEnableVertexArray(vaoId)
503
- # rlEnableVertexArray : Enable vertex array (VAO, if supported)
504
- # @param vaoId [unsigned int]
505
- # @return [bool]
506
- [:rlEnableVertexArray, :rlEnableVertexArray, [:uint], :bool],
507
-
508
- # @!method rlDisableVertexArray()
509
- # rlDisableVertexArray : Disable vertex array (VAO, if supported)
510
- # @return [void]
511
- [:rlDisableVertexArray, :rlDisableVertexArray, [], :void],
512
-
513
- # @!method rlEnableVertexBuffer(id)
514
- # rlEnableVertexBuffer : Enable vertex buffer (VBO)
515
- # @param id [unsigned int]
516
- # @return [void]
517
- [:rlEnableVertexBuffer, :rlEnableVertexBuffer, [:uint], :void],
518
-
519
- # @!method rlDisableVertexBuffer()
520
- # rlDisableVertexBuffer : Disable vertex buffer (VBO)
521
- # @return [void]
522
- [:rlDisableVertexBuffer, :rlDisableVertexBuffer, [], :void],
523
-
524
- # @!method rlEnableVertexBufferElement(id)
525
- # rlEnableVertexBufferElement : Enable vertex buffer element (VBO element)
526
- # @param id [unsigned int]
527
- # @return [void]
528
- [:rlEnableVertexBufferElement, :rlEnableVertexBufferElement, [:uint], :void],
529
-
530
- # @!method rlDisableVertexBufferElement()
531
- # rlDisableVertexBufferElement : Disable vertex buffer element (VBO element)
532
- # @return [void]
533
- [:rlDisableVertexBufferElement, :rlDisableVertexBufferElement, [], :void],
534
-
535
- # @!method rlEnableVertexAttribute(index)
536
- # rlEnableVertexAttribute : Enable vertex attribute index
537
- # @param index [unsigned int]
538
- # @return [void]
539
- [:rlEnableVertexAttribute, :rlEnableVertexAttribute, [:uint], :void],
540
-
541
- # @!method rlDisableVertexAttribute(index)
542
- # rlDisableVertexAttribute : Disable vertex attribute index
543
- # @param index [unsigned int]
544
- # @return [void]
545
- [:rlDisableVertexAttribute, :rlDisableVertexAttribute, [:uint], :void],
546
-
547
- # @!method rlActiveTextureSlot(slot)
548
- # rlActiveTextureSlot : Select and active a texture slot
549
- # @param slot [int]
550
- # @return [void]
551
- [:rlActiveTextureSlot, :rlActiveTextureSlot, [:int], :void],
552
-
553
- # @!method rlEnableTexture(id)
554
- # rlEnableTexture : Enable texture
555
- # @param id [unsigned int]
556
- # @return [void]
557
- [:rlEnableTexture, :rlEnableTexture, [:uint], :void],
558
-
559
- # @!method rlDisableTexture()
560
- # rlDisableTexture : Disable texture
561
- # @return [void]
562
- [:rlDisableTexture, :rlDisableTexture, [], :void],
563
-
564
- # @!method rlEnableTextureCubemap(id)
565
- # rlEnableTextureCubemap : Enable texture cubemap
566
- # @param id [unsigned int]
567
- # @return [void]
568
- [:rlEnableTextureCubemap, :rlEnableTextureCubemap, [:uint], :void],
569
-
570
- # @!method rlDisableTextureCubemap()
571
- # rlDisableTextureCubemap : Disable texture cubemap
572
- # @return [void]
573
- [:rlDisableTextureCubemap, :rlDisableTextureCubemap, [], :void],
574
-
575
- # @!method rlTextureParameters(id, param, value)
576
- # rlTextureParameters : Set texture parameters (filter, wrap)
577
- # @param id [unsigned int]
578
- # @param param [int]
579
- # @param value [int]
580
- # @return [void]
581
- [:rlTextureParameters, :rlTextureParameters, [:uint, :int, :int], :void],
582
-
583
- # @!method rlCubemapParameters(id, param, value)
584
- # rlCubemapParameters : Set cubemap parameters (filter, wrap)
585
- # @param id [unsigned int]
586
- # @param param [int]
587
- # @param value [int]
588
- # @return [void]
589
- [:rlCubemapParameters, :rlCubemapParameters, [:uint, :int, :int], :void],
590
-
591
- # @!method rlEnableShader(id)
592
- # rlEnableShader : Enable shader program
593
- # @param id [unsigned int]
594
- # @return [void]
595
- [:rlEnableShader, :rlEnableShader, [:uint], :void],
596
-
597
- # @!method rlDisableShader()
598
- # rlDisableShader : Disable shader program
599
- # @return [void]
600
- [:rlDisableShader, :rlDisableShader, [], :void],
601
-
602
- # @!method rlEnableFramebuffer(id)
603
- # rlEnableFramebuffer : Enable render texture (fbo)
604
- # @param id [unsigned int]
605
- # @return [void]
606
- [:rlEnableFramebuffer, :rlEnableFramebuffer, [:uint], :void],
607
-
608
- # @!method rlDisableFramebuffer()
609
- # rlDisableFramebuffer : Disable render texture (fbo), return to default framebuffer
610
- # @return [void]
611
- [:rlDisableFramebuffer, :rlDisableFramebuffer, [], :void],
612
-
613
- # @!method rlGetActiveFramebuffer()
614
- # rlGetActiveFramebuffer : Get the currently active render texture (fbo), 0 for default framebuffer
615
- # @return [unsigned int]
616
- [:rlGetActiveFramebuffer, :rlGetActiveFramebuffer, [], :uint],
617
-
618
- # @!method rlActiveDrawBuffers(count)
619
- # rlActiveDrawBuffers : Activate multiple draw color buffers
620
- # @param count [int]
621
- # @return [void]
622
- [:rlActiveDrawBuffers, :rlActiveDrawBuffers, [:int], :void],
623
-
624
- # @!method rlBlitFramebuffer(srcX, srcY, srcWidth, srcHeight, dstX, dstY, dstWidth, dstHeight, bufferMask)
625
- # rlBlitFramebuffer : Blit active framebuffer to main framebuffer
626
- # @param srcX [int]
627
- # @param srcY [int]
628
- # @param srcWidth [int]
629
- # @param srcHeight [int]
630
- # @param dstX [int]
631
- # @param dstY [int]
632
- # @param dstWidth [int]
633
- # @param dstHeight [int]
634
- # @param bufferMask [int]
635
- # @return [void]
636
- [:rlBlitFramebuffer, :rlBlitFramebuffer, [:int, :int, :int, :int, :int, :int, :int, :int, :int], :void],
637
-
638
- # @!method rlBindFramebuffer(target, framebuffer)
639
- # rlBindFramebuffer : Bind framebuffer (FBO)
640
- # @param target [unsigned int]
641
- # @param framebuffer [unsigned int]
642
- # @return [void]
643
- [:rlBindFramebuffer, :rlBindFramebuffer, [:uint, :uint], :void],
644
-
645
- # @!method rlEnableColorBlend()
646
- # rlEnableColorBlend : Enable color blending
647
- # @return [void]
648
- [:rlEnableColorBlend, :rlEnableColorBlend, [], :void],
649
-
650
- # @!method rlDisableColorBlend()
651
- # rlDisableColorBlend : Disable color blending
652
- # @return [void]
653
- [:rlDisableColorBlend, :rlDisableColorBlend, [], :void],
654
-
655
- # @!method rlEnableDepthTest()
656
- # rlEnableDepthTest : Enable depth test
657
- # @return [void]
658
- [:rlEnableDepthTest, :rlEnableDepthTest, [], :void],
659
-
660
- # @!method rlDisableDepthTest()
661
- # rlDisableDepthTest : Disable depth test
662
- # @return [void]
663
- [:rlDisableDepthTest, :rlDisableDepthTest, [], :void],
664
-
665
- # @!method rlEnableDepthMask()
666
- # rlEnableDepthMask : Enable depth write
667
- # @return [void]
668
- [:rlEnableDepthMask, :rlEnableDepthMask, [], :void],
669
-
670
- # @!method rlDisableDepthMask()
671
- # rlDisableDepthMask : Disable depth write
672
- # @return [void]
673
- [:rlDisableDepthMask, :rlDisableDepthMask, [], :void],
674
-
675
- # @!method rlEnableBackfaceCulling()
676
- # rlEnableBackfaceCulling : Enable backface culling
677
- # @return [void]
678
- [:rlEnableBackfaceCulling, :rlEnableBackfaceCulling, [], :void],
679
-
680
- # @!method rlDisableBackfaceCulling()
681
- # rlDisableBackfaceCulling : Disable backface culling
682
- # @return [void]
683
- [:rlDisableBackfaceCulling, :rlDisableBackfaceCulling, [], :void],
684
-
685
- # @!method rlColorMask(r, g, b, a)
686
- # rlColorMask : Color mask control
687
- # @param r [bool]
688
- # @param g [bool]
689
- # @param b [bool]
690
- # @param a [bool]
691
- # @return [void]
692
- [:rlColorMask, :rlColorMask, [:bool, :bool, :bool, :bool], :void],
693
-
694
- # @!method rlSetCullFace(mode)
695
- # rlSetCullFace : Set face culling mode
696
- # @param mode [int]
697
- # @return [void]
698
- [:rlSetCullFace, :rlSetCullFace, [:int], :void],
699
-
700
- # @!method rlEnableScissorTest()
701
- # rlEnableScissorTest : Enable scissor test
702
- # @return [void]
703
- [:rlEnableScissorTest, :rlEnableScissorTest, [], :void],
704
-
705
- # @!method rlDisableScissorTest()
706
- # rlDisableScissorTest : Disable scissor test
707
- # @return [void]
708
- [:rlDisableScissorTest, :rlDisableScissorTest, [], :void],
709
-
710
- # @!method rlScissor(x, y, width, height)
711
- # rlScissor : Scissor test
712
- # @param x [int]
713
- # @param y [int]
714
- # @param width [int]
715
- # @param height [int]
716
- # @return [void]
717
- [:rlScissor, :rlScissor, [:int, :int, :int, :int], :void],
718
-
719
- # @!method rlEnableWireMode()
720
- # rlEnableWireMode : Enable wire mode
721
- # @return [void]
722
- [:rlEnableWireMode, :rlEnableWireMode, [], :void],
723
-
724
- # @!method rlEnablePointMode()
725
- # rlEnablePointMode : Enable point mode
726
- # @return [void]
727
- [:rlEnablePointMode, :rlEnablePointMode, [], :void],
728
-
729
- # @!method rlDisableWireMode()
730
- # rlDisableWireMode : Disable wire (and point) mode
731
- # @return [void]
732
- [:rlDisableWireMode, :rlDisableWireMode, [], :void],
733
-
734
- # @!method rlSetLineWidth(width)
735
- # rlSetLineWidth : Set the line drawing width
736
- # @param width [float]
737
- # @return [void]
738
- [:rlSetLineWidth, :rlSetLineWidth, [:float], :void],
739
-
740
- # @!method rlGetLineWidth()
741
- # rlGetLineWidth : Get the line drawing width
742
- # @return [float]
743
- [:rlGetLineWidth, :rlGetLineWidth, [], :float],
744
-
745
- # @!method rlEnableSmoothLines()
746
- # rlEnableSmoothLines : Enable line aliasing
747
- # @return [void]
748
- [:rlEnableSmoothLines, :rlEnableSmoothLines, [], :void],
749
-
750
- # @!method rlDisableSmoothLines()
751
- # rlDisableSmoothLines : Disable line aliasing
752
- # @return [void]
753
- [:rlDisableSmoothLines, :rlDisableSmoothLines, [], :void],
754
-
755
- # @!method rlEnableStereoRender()
756
- # rlEnableStereoRender : Enable stereo rendering
757
- # @return [void]
758
- [:rlEnableStereoRender, :rlEnableStereoRender, [], :void],
759
-
760
- # @!method rlDisableStereoRender()
761
- # rlDisableStereoRender : Disable stereo rendering
762
- # @return [void]
763
- [:rlDisableStereoRender, :rlDisableStereoRender, [], :void],
764
-
765
- # @!method rlIsStereoRenderEnabled()
766
- # rlIsStereoRenderEnabled : Check if stereo render is enabled
767
- # @return [bool]
768
- [:rlIsStereoRenderEnabled, :rlIsStereoRenderEnabled, [], :bool],
769
-
770
- # @!method rlClearColor(r, g, b, a)
771
- # rlClearColor : Clear color buffer with color
772
- # @param r [unsigned char]
773
- # @param g [unsigned char]
774
- # @param b [unsigned char]
775
- # @param a [unsigned char]
776
- # @return [void]
777
- [:rlClearColor, :rlClearColor, [:uchar, :uchar, :uchar, :uchar], :void],
778
-
779
- # @!method rlClearScreenBuffers()
780
- # rlClearScreenBuffers : Clear used screen buffers (color and depth)
781
- # @return [void]
782
- [:rlClearScreenBuffers, :rlClearScreenBuffers, [], :void],
783
-
784
- # @!method rlCheckErrors()
785
- # rlCheckErrors : Check and log OpenGL error codes
786
- # @return [void]
787
- [:rlCheckErrors, :rlCheckErrors, [], :void],
788
-
789
- # @!method rlSetBlendMode(mode)
790
- # rlSetBlendMode : Set blending mode
791
- # @param mode [int]
792
- # @return [void]
793
- [:rlSetBlendMode, :rlSetBlendMode, [:int], :void],
794
-
795
- # @!method rlSetBlendFactors(glSrcFactor, glDstFactor, glEquation)
796
- # rlSetBlendFactors : Set blending mode factor and equation (using OpenGL factors)
797
- # @param glSrcFactor [int]
798
- # @param glDstFactor [int]
799
- # @param glEquation [int]
800
- # @return [void]
801
- [:rlSetBlendFactors, :rlSetBlendFactors, [:int, :int, :int], :void],
802
-
803
- # @!method rlSetBlendFactorsSeparate(glSrcRGB, glDstRGB, glSrcAlpha, glDstAlpha, glEqRGB, glEqAlpha)
804
- # rlSetBlendFactorsSeparate : Set blending mode factors and equations separately (using OpenGL factors)
805
- # @param glSrcRGB [int]
806
- # @param glDstRGB [int]
807
- # @param glSrcAlpha [int]
808
- # @param glDstAlpha [int]
809
- # @param glEqRGB [int]
810
- # @param glEqAlpha [int]
811
- # @return [void]
812
- [:rlSetBlendFactorsSeparate, :rlSetBlendFactorsSeparate, [:int, :int, :int, :int, :int, :int], :void],
813
-
814
- # @!method rlglInit(width, height)
815
- # rlglInit : Initialize rlgl (buffers, shaders, textures, states)
816
- # @param width [int]
817
- # @param height [int]
818
- # @return [void]
819
- [:rlglInit, :rlglInit, [:int, :int], :void],
820
-
821
- # @!method rlglClose()
822
- # rlglClose : De-initialize rlgl (buffers, shaders, textures)
823
- # @return [void]
824
- [:rlglClose, :rlglClose, [], :void],
825
-
826
- # @!method rlLoadExtensions(loader)
827
- # rlLoadExtensions : Load OpenGL extensions (loader function required)
828
- # @param loader [void *]
829
- # @return [void]
830
- [:rlLoadExtensions, :rlLoadExtensions, [:pointer], :void],
831
-
832
- # @!method rlGetVersion()
833
- # rlGetVersion : Get current OpenGL version
834
- # @return [int]
835
- [:rlGetVersion, :rlGetVersion, [], :int],
836
-
837
- # @!method rlSetFramebufferWidth(width)
838
- # rlSetFramebufferWidth : Set current framebuffer width
839
- # @param width [int]
840
- # @return [void]
841
- [:rlSetFramebufferWidth, :rlSetFramebufferWidth, [:int], :void],
842
-
843
- # @!method rlGetFramebufferWidth()
844
- # rlGetFramebufferWidth : Get default framebuffer width
845
- # @return [int]
846
- [:rlGetFramebufferWidth, :rlGetFramebufferWidth, [], :int],
847
-
848
- # @!method rlSetFramebufferHeight(height)
849
- # rlSetFramebufferHeight : Set current framebuffer height
850
- # @param height [int]
851
- # @return [void]
852
- [:rlSetFramebufferHeight, :rlSetFramebufferHeight, [:int], :void],
853
-
854
- # @!method rlGetFramebufferHeight()
855
- # rlGetFramebufferHeight : Get default framebuffer height
856
- # @return [int]
857
- [:rlGetFramebufferHeight, :rlGetFramebufferHeight, [], :int],
858
-
859
- # @!method rlGetTextureIdDefault()
860
- # rlGetTextureIdDefault : Get default texture id
861
- # @return [unsigned int]
862
- [:rlGetTextureIdDefault, :rlGetTextureIdDefault, [], :uint],
863
-
864
- # @!method rlGetShaderIdDefault()
865
- # rlGetShaderIdDefault : Get default shader id
866
- # @return [unsigned int]
867
- [:rlGetShaderIdDefault, :rlGetShaderIdDefault, [], :uint],
868
-
869
- # @!method rlGetShaderLocsDefault()
870
- # rlGetShaderLocsDefault : Get default shader locations
871
- # @return [int *]
872
- [:rlGetShaderLocsDefault, :rlGetShaderLocsDefault, [], :pointer],
873
-
874
- # @!method rlLoadRenderBatch(numBuffers, bufferElements)
875
- # rlLoadRenderBatch : Load a render batch system
876
- # @param numBuffers [int]
877
- # @param bufferElements [int]
878
- # @return [rlRenderBatch]
879
- [:rlLoadRenderBatch, :rlLoadRenderBatch, [:int, :int], RlRenderBatch.by_value],
880
-
881
- # @!method rlUnloadRenderBatch(batch)
882
- # rlUnloadRenderBatch : Unload render batch system
883
- # @param batch [rlRenderBatch]
884
- # @return [void]
885
- [:rlUnloadRenderBatch, :rlUnloadRenderBatch, [RlRenderBatch.by_value], :void],
886
-
887
- # @!method rlDrawRenderBatch(batch)
888
- # rlDrawRenderBatch : Draw render batch data (Update->Draw->Reset)
889
- # @param batch [rlRenderBatch *]
890
- # @return [void]
891
- [:rlDrawRenderBatch, :rlDrawRenderBatch, [:pointer], :void],
892
-
893
- # @!method rlSetRenderBatchActive(batch)
894
- # rlSetRenderBatchActive : Set the active render batch for rlgl (NULL for default internal)
895
- # @param batch [rlRenderBatch *]
896
- # @return [void]
897
- [:rlSetRenderBatchActive, :rlSetRenderBatchActive, [:pointer], :void],
898
-
899
- # @!method rlDrawRenderBatchActive()
900
- # rlDrawRenderBatchActive : Update and draw internal render batch
901
- # @return [void]
902
- [:rlDrawRenderBatchActive, :rlDrawRenderBatchActive, [], :void],
903
-
904
- # @!method rlCheckRenderBatchLimit(vCount)
905
- # rlCheckRenderBatchLimit : Check internal buffer overflow for a given number of vertex
906
- # @param vCount [int]
907
- # @return [bool]
908
- [:rlCheckRenderBatchLimit, :rlCheckRenderBatchLimit, [:int], :bool],
909
-
910
- # @!method rlSetTexture(id)
911
- # rlSetTexture : Set current texture for render batch and check buffers limits
912
- # @param id [unsigned int]
913
- # @return [void]
914
- [:rlSetTexture, :rlSetTexture, [:uint], :void],
915
-
916
- # @!method rlLoadVertexArray()
917
- # rlLoadVertexArray : Load vertex array (vao) if supported
918
- # @return [unsigned int]
919
- [:rlLoadVertexArray, :rlLoadVertexArray, [], :uint],
920
-
921
- # @!method rlLoadVertexBuffer(buffer, size, dynamic)
922
- # rlLoadVertexBuffer : Load a vertex buffer object
923
- # @param buffer [const void *]
924
- # @param size [int]
925
- # @param dynamic [bool]
926
- # @return [unsigned int]
927
- [:rlLoadVertexBuffer, :rlLoadVertexBuffer, [:pointer, :int, :bool], :uint],
928
-
929
- # @!method rlLoadVertexBufferElement(buffer, size, dynamic)
930
- # rlLoadVertexBufferElement : Load vertex buffer elements object
931
- # @param buffer [const void *]
932
- # @param size [int]
933
- # @param dynamic [bool]
934
- # @return [unsigned int]
935
- [:rlLoadVertexBufferElement, :rlLoadVertexBufferElement, [:pointer, :int, :bool], :uint],
936
-
937
- # @!method rlUpdateVertexBuffer(bufferId, data, dataSize, offset)
938
- # rlUpdateVertexBuffer : Update vertex buffer object data on GPU buffer
939
- # @param bufferId [unsigned int]
940
- # @param data [const void *]
941
- # @param dataSize [int]
942
- # @param offset [int]
943
- # @return [void]
944
- [:rlUpdateVertexBuffer, :rlUpdateVertexBuffer, [:uint, :pointer, :int, :int], :void],
945
-
946
- # @!method rlUpdateVertexBufferElements(id, data, dataSize, offset)
947
- # rlUpdateVertexBufferElements : Update vertex buffer elements data on GPU buffer
948
- # @param id [unsigned int]
949
- # @param data [const void *]
950
- # @param dataSize [int]
951
- # @param offset [int]
952
- # @return [void]
953
- [:rlUpdateVertexBufferElements, :rlUpdateVertexBufferElements, [:uint, :pointer, :int, :int], :void],
954
-
955
- # @!method rlUnloadVertexArray(vaoId)
956
- # rlUnloadVertexArray : Unload vertex array (vao)
957
- # @param vaoId [unsigned int]
958
- # @return [void]
959
- [:rlUnloadVertexArray, :rlUnloadVertexArray, [:uint], :void],
960
-
961
- # @!method rlUnloadVertexBuffer(vboId)
962
- # rlUnloadVertexBuffer : Unload vertex buffer object
963
- # @param vboId [unsigned int]
964
- # @return [void]
965
- [:rlUnloadVertexBuffer, :rlUnloadVertexBuffer, [:uint], :void],
966
-
967
- # @!method rlSetVertexAttribute(index, compSize, type, normalized, stride, offset)
968
- # rlSetVertexAttribute : Set vertex attribute data configuration
969
- # @param index [unsigned int]
970
- # @param compSize [int]
971
- # @param type [int]
972
- # @param normalized [bool]
973
- # @param stride [int]
974
- # @param offset [int]
975
- # @return [void]
976
- [:rlSetVertexAttribute, :rlSetVertexAttribute, [:uint, :int, :int, :bool, :int, :int], :void],
977
-
978
- # @!method rlSetVertexAttributeDivisor(index, divisor)
979
- # rlSetVertexAttributeDivisor : Set vertex attribute data divisor
980
- # @param index [unsigned int]
981
- # @param divisor [int]
982
- # @return [void]
983
- [:rlSetVertexAttributeDivisor, :rlSetVertexAttributeDivisor, [:uint, :int], :void],
984
-
985
- # @!method rlSetVertexAttributeDefault(locIndex, value, attribType, count)
986
- # rlSetVertexAttributeDefault : Set vertex attribute default value, when attribute to provided
987
- # @param locIndex [int]
988
- # @param value [const void *]
989
- # @param attribType [int]
990
- # @param count [int]
991
- # @return [void]
992
- [:rlSetVertexAttributeDefault, :rlSetVertexAttributeDefault, [:int, :pointer, :int, :int], :void],
993
-
994
- # @!method rlDrawVertexArray(offset, count)
995
- # rlDrawVertexArray : Draw vertex array (currently active vao)
996
- # @param offset [int]
997
- # @param count [int]
998
- # @return [void]
999
- [:rlDrawVertexArray, :rlDrawVertexArray, [:int, :int], :void],
1000
-
1001
- # @!method rlDrawVertexArrayElements(offset, count, buffer)
1002
- # rlDrawVertexArrayElements : Draw vertex array elements
1003
- # @param offset [int]
1004
- # @param count [int]
1005
- # @param buffer [const void *]
1006
- # @return [void]
1007
- [:rlDrawVertexArrayElements, :rlDrawVertexArrayElements, [:int, :int, :pointer], :void],
1008
-
1009
- # @!method rlDrawVertexArrayInstanced(offset, count, instances)
1010
- # rlDrawVertexArrayInstanced : Draw vertex array (currently active vao) with instancing
1011
- # @param offset [int]
1012
- # @param count [int]
1013
- # @param instances [int]
1014
- # @return [void]
1015
- [:rlDrawVertexArrayInstanced, :rlDrawVertexArrayInstanced, [:int, :int, :int], :void],
1016
-
1017
- # @!method rlDrawVertexArrayElementsInstanced(offset, count, buffer, instances)
1018
- # rlDrawVertexArrayElementsInstanced : Draw vertex array elements with instancing
1019
- # @param offset [int]
1020
- # @param count [int]
1021
- # @param buffer [const void *]
1022
- # @param instances [int]
1023
- # @return [void]
1024
- [:rlDrawVertexArrayElementsInstanced, :rlDrawVertexArrayElementsInstanced, [:int, :int, :pointer, :int], :void],
1025
-
1026
- # @!method rlLoadTexture(data, width, height, format, mipmapCount)
1027
- # rlLoadTexture : Load texture data
1028
- # @param data [const void *]
1029
- # @param width [int]
1030
- # @param height [int]
1031
- # @param format [int]
1032
- # @param mipmapCount [int]
1033
- # @return [unsigned int]
1034
- [:rlLoadTexture, :rlLoadTexture, [:pointer, :int, :int, :int, :int], :uint],
1035
-
1036
- # @!method rlLoadTextureDepth(width, height, useRenderBuffer)
1037
- # rlLoadTextureDepth : Load depth texture/renderbuffer (to be attached to fbo)
1038
- # @param width [int]
1039
- # @param height [int]
1040
- # @param useRenderBuffer [bool]
1041
- # @return [unsigned int]
1042
- [:rlLoadTextureDepth, :rlLoadTextureDepth, [:int, :int, :bool], :uint],
1043
-
1044
- # @!method rlLoadTextureCubemap(data, size, format, mipmapCount)
1045
- # rlLoadTextureCubemap : Load texture cubemap data
1046
- # @param data [const void *]
1047
- # @param size [int]
1048
- # @param format [int]
1049
- # @param mipmapCount [int]
1050
- # @return [unsigned int]
1051
- [:rlLoadTextureCubemap, :rlLoadTextureCubemap, [:pointer, :int, :int, :int], :uint],
1052
-
1053
- # @!method rlUpdateTexture(id, offsetX, offsetY, width, height, format, data)
1054
- # rlUpdateTexture : Update texture with new data on GPU
1055
- # @param id [unsigned int]
1056
- # @param offsetX [int]
1057
- # @param offsetY [int]
1058
- # @param width [int]
1059
- # @param height [int]
1060
- # @param format [int]
1061
- # @param data [const void *]
1062
- # @return [void]
1063
- [:rlUpdateTexture, :rlUpdateTexture, [:uint, :int, :int, :int, :int, :int, :pointer], :void],
1064
-
1065
- # @!method rlGetGlTextureFormats(format, glInternalFormat, glFormat, glType)
1066
- # rlGetGlTextureFormats : Get OpenGL internal formats
1067
- # @param format [int]
1068
- # @param glInternalFormat [unsigned int *]
1069
- # @param glFormat [unsigned int *]
1070
- # @param glType [unsigned int *]
1071
- # @return [void]
1072
- [:rlGetGlTextureFormats, :rlGetGlTextureFormats, [:int, :pointer, :pointer, :pointer], :void],
1073
-
1074
- # @!method rlGetPixelFormatName(format)
1075
- # rlGetPixelFormatName : Get name string for pixel format
1076
- # @param format [unsigned int]
1077
- # @return [const char *]
1078
- [:rlGetPixelFormatName, :rlGetPixelFormatName, [:uint], :pointer],
1079
-
1080
- # @!method rlUnloadTexture(id)
1081
- # rlUnloadTexture : Unload texture from GPU memory
1082
- # @param id [unsigned int]
1083
- # @return [void]
1084
- [:rlUnloadTexture, :rlUnloadTexture, [:uint], :void],
1085
-
1086
- # @!method rlGenTextureMipmaps(id, width, height, format, mipmaps)
1087
- # rlGenTextureMipmaps : Generate mipmap data for selected texture
1088
- # @param id [unsigned int]
1089
- # @param width [int]
1090
- # @param height [int]
1091
- # @param format [int]
1092
- # @param mipmaps [int *]
1093
- # @return [void]
1094
- [:rlGenTextureMipmaps, :rlGenTextureMipmaps, [:uint, :int, :int, :int, :pointer], :void],
1095
-
1096
- # @!method rlReadTexturePixels(id, width, height, format)
1097
- # rlReadTexturePixels : Read texture pixel data
1098
- # @param id [unsigned int]
1099
- # @param width [int]
1100
- # @param height [int]
1101
- # @param format [int]
1102
- # @return [void *]
1103
- [:rlReadTexturePixels, :rlReadTexturePixels, [:uint, :int, :int, :int], :pointer],
1104
-
1105
- # @!method rlReadScreenPixels(width, height)
1106
- # rlReadScreenPixels : Read screen pixel data (color buffer)
1107
- # @param width [int]
1108
- # @param height [int]
1109
- # @return [unsigned char *]
1110
- [:rlReadScreenPixels, :rlReadScreenPixels, [:int, :int], :pointer],
1111
-
1112
- # @!method rlLoadFramebuffer()
1113
- # rlLoadFramebuffer : Load an empty framebuffer
1114
- # @return [unsigned int]
1115
- [:rlLoadFramebuffer, :rlLoadFramebuffer, [], :uint],
1116
-
1117
- # @!method rlFramebufferAttach(fboId, texId, attachType, texType, mipLevel)
1118
- # rlFramebufferAttach : Attach texture/renderbuffer to a framebuffer
1119
- # @param fboId [unsigned int]
1120
- # @param texId [unsigned int]
1121
- # @param attachType [int]
1122
- # @param texType [int]
1123
- # @param mipLevel [int]
1124
- # @return [void]
1125
- [:rlFramebufferAttach, :rlFramebufferAttach, [:uint, :uint, :int, :int, :int], :void],
1126
-
1127
- # @!method rlFramebufferComplete(id)
1128
- # rlFramebufferComplete : Verify framebuffer is complete
1129
- # @param id [unsigned int]
1130
- # @return [bool]
1131
- [:rlFramebufferComplete, :rlFramebufferComplete, [:uint], :bool],
1132
-
1133
- # @!method rlUnloadFramebuffer(id)
1134
- # rlUnloadFramebuffer : Delete framebuffer from GPU
1135
- # @param id [unsigned int]
1136
- # @return [void]
1137
- [:rlUnloadFramebuffer, :rlUnloadFramebuffer, [:uint], :void],
1138
-
1139
- # @!method rlLoadShaderCode(vsCode, fsCode)
1140
- # rlLoadShaderCode : Load shader from code strings
1141
- # @param vsCode [const char *]
1142
- # @param fsCode [const char *]
1143
- # @return [unsigned int]
1144
- [:rlLoadShaderCode, :rlLoadShaderCode, [:pointer, :pointer], :uint],
1145
-
1146
- # @!method rlCompileShader(shaderCode, type)
1147
- # rlCompileShader : Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER)
1148
- # @param shaderCode [const char *]
1149
- # @param type [int]
1150
- # @return [unsigned int]
1151
- [:rlCompileShader, :rlCompileShader, [:pointer, :int], :uint],
1152
-
1153
- # @!method rlLoadShaderProgram(vShaderId, fShaderId)
1154
- # rlLoadShaderProgram : Load custom shader program
1155
- # @param vShaderId [unsigned int]
1156
- # @param fShaderId [unsigned int]
1157
- # @return [unsigned int]
1158
- [:rlLoadShaderProgram, :rlLoadShaderProgram, [:uint, :uint], :uint],
1159
-
1160
- # @!method rlUnloadShaderProgram(id)
1161
- # rlUnloadShaderProgram : Unload shader program
1162
- # @param id [unsigned int]
1163
- # @return [void]
1164
- [:rlUnloadShaderProgram, :rlUnloadShaderProgram, [:uint], :void],
1165
-
1166
- # @!method rlGetLocationUniform(shaderId, uniformName)
1167
- # rlGetLocationUniform : Get shader location uniform
1168
- # @param shaderId [unsigned int]
1169
- # @param uniformName [const char *]
1170
- # @return [int]
1171
- [:rlGetLocationUniform, :rlGetLocationUniform, [:uint, :pointer], :int],
1172
-
1173
- # @!method rlGetLocationAttrib(shaderId, attribName)
1174
- # rlGetLocationAttrib : Get shader location attribute
1175
- # @param shaderId [unsigned int]
1176
- # @param attribName [const char *]
1177
- # @return [int]
1178
- [:rlGetLocationAttrib, :rlGetLocationAttrib, [:uint, :pointer], :int],
1179
-
1180
- # @!method rlSetUniform(locIndex, value, uniformType, count)
1181
- # rlSetUniform : Set shader value uniform
1182
- # @param locIndex [int]
1183
- # @param value [const void *]
1184
- # @param uniformType [int]
1185
- # @param count [int]
1186
- # @return [void]
1187
- [:rlSetUniform, :rlSetUniform, [:int, :pointer, :int, :int], :void],
1188
-
1189
- # @!method rlSetUniformMatrix(locIndex, mat)
1190
- # rlSetUniformMatrix : Set shader value matrix
1191
- # @param locIndex [int]
1192
- # @param mat [Matrix]
1193
- # @return [void]
1194
- [:rlSetUniformMatrix, :rlSetUniformMatrix, [:int, Matrix.by_value], :void],
1195
-
1196
- # @!method rlSetUniformMatrices(locIndex, mat, count)
1197
- # rlSetUniformMatrices : Set shader value matrices
1198
- # @param locIndex [int]
1199
- # @param mat [const Matrix *]
1200
- # @param count [int]
1201
- # @return [void]
1202
- [:rlSetUniformMatrices, :rlSetUniformMatrices, [:int, :pointer, :int], :void],
1203
-
1204
- # @!method rlSetUniformSampler(locIndex, textureId)
1205
- # rlSetUniformSampler : Set shader value sampler
1206
- # @param locIndex [int]
1207
- # @param textureId [unsigned int]
1208
- # @return [void]
1209
- [:rlSetUniformSampler, :rlSetUniformSampler, [:int, :uint], :void],
1210
-
1211
- # @!method rlSetShader(id, locs)
1212
- # rlSetShader : Set shader currently active (id and locations)
1213
- # @param id [unsigned int]
1214
- # @param locs [int *]
1215
- # @return [void]
1216
- [:rlSetShader, :rlSetShader, [:uint, :pointer], :void],
1217
-
1218
- # @!method rlLoadComputeShaderProgram(shaderId)
1219
- # rlLoadComputeShaderProgram : Load compute shader program
1220
- # @param shaderId [unsigned int]
1221
- # @return [unsigned int]
1222
- [:rlLoadComputeShaderProgram, :rlLoadComputeShaderProgram, [:uint], :uint],
1223
-
1224
- # @!method rlComputeShaderDispatch(groupX, groupY, groupZ)
1225
- # rlComputeShaderDispatch : Dispatch compute shader (equivalent to *draw* for graphics pipeline)
1226
- # @param groupX [unsigned int]
1227
- # @param groupY [unsigned int]
1228
- # @param groupZ [unsigned int]
1229
- # @return [void]
1230
- [:rlComputeShaderDispatch, :rlComputeShaderDispatch, [:uint, :uint, :uint], :void],
1231
-
1232
- # @!method rlLoadShaderBuffer(size, data, usageHint)
1233
- # rlLoadShaderBuffer : Load shader storage buffer object (SSBO)
1234
- # @param size [unsigned int]
1235
- # @param data [const void *]
1236
- # @param usageHint [int]
1237
- # @return [unsigned int]
1238
- [:rlLoadShaderBuffer, :rlLoadShaderBuffer, [:uint, :pointer, :int], :uint],
1239
-
1240
- # @!method rlUnloadShaderBuffer(ssboId)
1241
- # rlUnloadShaderBuffer : Unload shader storage buffer object (SSBO)
1242
- # @param ssboId [unsigned int]
1243
- # @return [void]
1244
- [:rlUnloadShaderBuffer, :rlUnloadShaderBuffer, [:uint], :void],
1245
-
1246
- # @!method rlUpdateShaderBuffer(id, data, dataSize, offset)
1247
- # rlUpdateShaderBuffer : Update SSBO buffer data
1248
- # @param id [unsigned int]
1249
- # @param data [const void *]
1250
- # @param dataSize [unsigned int]
1251
- # @param offset [unsigned int]
1252
- # @return [void]
1253
- [:rlUpdateShaderBuffer, :rlUpdateShaderBuffer, [:uint, :pointer, :uint, :uint], :void],
1254
-
1255
- # @!method rlBindShaderBuffer(id, index)
1256
- # rlBindShaderBuffer : Bind SSBO buffer
1257
- # @param id [unsigned int]
1258
- # @param index [unsigned int]
1259
- # @return [void]
1260
- [:rlBindShaderBuffer, :rlBindShaderBuffer, [:uint, :uint], :void],
1261
-
1262
- # @!method rlReadShaderBuffer(id, dest, count, offset)
1263
- # rlReadShaderBuffer : Read SSBO buffer data (GPU->CPU)
1264
- # @param id [unsigned int]
1265
- # @param dest [void *]
1266
- # @param count [unsigned int]
1267
- # @param offset [unsigned int]
1268
- # @return [void]
1269
- [:rlReadShaderBuffer, :rlReadShaderBuffer, [:uint, :pointer, :uint, :uint], :void],
1270
-
1271
- # @!method rlCopyShaderBuffer(destId, srcId, destOffset, srcOffset, count)
1272
- # rlCopyShaderBuffer : Copy SSBO data between buffers
1273
- # @param destId [unsigned int]
1274
- # @param srcId [unsigned int]
1275
- # @param destOffset [unsigned int]
1276
- # @param srcOffset [unsigned int]
1277
- # @param count [unsigned int]
1278
- # @return [void]
1279
- [:rlCopyShaderBuffer, :rlCopyShaderBuffer, [:uint, :uint, :uint, :uint, :uint], :void],
1280
-
1281
- # @!method rlGetShaderBufferSize(id)
1282
- # rlGetShaderBufferSize : Get SSBO buffer size
1283
- # @param id [unsigned int]
1284
- # @return [unsigned int]
1285
- [:rlGetShaderBufferSize, :rlGetShaderBufferSize, [:uint], :uint],
1286
-
1287
- # @!method rlBindImageTexture(id, index, format, readonly)
1288
- # rlBindImageTexture : Bind image texture
1289
- # @param id [unsigned int]
1290
- # @param index [unsigned int]
1291
- # @param format [int]
1292
- # @param readonly [bool]
1293
- # @return [void]
1294
- [:rlBindImageTexture, :rlBindImageTexture, [:uint, :uint, :int, :bool], :void],
1295
-
1296
- # @!method rlGetMatrixModelview()
1297
- # rlGetMatrixModelview : Get internal modelview matrix
1298
- # @return [Matrix]
1299
- [:rlGetMatrixModelview, :rlGetMatrixModelview, [], Matrix.by_value],
1300
-
1301
- # @!method rlGetMatrixProjection()
1302
- # rlGetMatrixProjection : Get internal projection matrix
1303
- # @return [Matrix]
1304
- [:rlGetMatrixProjection, :rlGetMatrixProjection, [], Matrix.by_value],
1305
-
1306
- # @!method rlGetMatrixTransform()
1307
- # rlGetMatrixTransform : Get internal accumulated transform matrix
1308
- # @return [Matrix]
1309
- [:rlGetMatrixTransform, :rlGetMatrixTransform, [], Matrix.by_value],
1310
-
1311
- # @!method rlGetMatrixProjectionStereo(eye)
1312
- # rlGetMatrixProjectionStereo : Get internal projection matrix for stereo render (selected eye)
1313
- # @param eye [int]
1314
- # @return [Matrix]
1315
- [:rlGetMatrixProjectionStereo, :rlGetMatrixProjectionStereo, [:int], Matrix.by_value],
1316
-
1317
- # @!method rlGetMatrixViewOffsetStereo(eye)
1318
- # rlGetMatrixViewOffsetStereo : Get internal view offset matrix for stereo render (selected eye)
1319
- # @param eye [int]
1320
- # @return [Matrix]
1321
- [:rlGetMatrixViewOffsetStereo, :rlGetMatrixViewOffsetStereo, [:int], Matrix.by_value],
1322
-
1323
- # @!method rlSetMatrixProjection(proj)
1324
- # rlSetMatrixProjection : Set a custom projection matrix (replaces internal projection matrix)
1325
- # @param proj [Matrix]
1326
- # @return [void]
1327
- [:rlSetMatrixProjection, :rlSetMatrixProjection, [Matrix.by_value], :void],
1328
-
1329
- # @!method rlSetMatrixModelview(view)
1330
- # rlSetMatrixModelview : Set a custom modelview matrix (replaces internal modelview matrix)
1331
- # @param view [Matrix]
1332
- # @return [void]
1333
- [:rlSetMatrixModelview, :rlSetMatrixModelview, [Matrix.by_value], :void],
1334
-
1335
- # @!method rlSetMatrixProjectionStereo(right, left)
1336
- # rlSetMatrixProjectionStereo : Set eyes projection matrices for stereo rendering
1337
- # @param right [Matrix]
1338
- # @param left [Matrix]
1339
- # @return [void]
1340
- [:rlSetMatrixProjectionStereo, :rlSetMatrixProjectionStereo, [Matrix.by_value, Matrix.by_value], :void],
1341
-
1342
- # @!method rlSetMatrixViewOffsetStereo(right, left)
1343
- # rlSetMatrixViewOffsetStereo : Set eyes view offsets matrices for stereo rendering
1344
- # @param right [Matrix]
1345
- # @param left [Matrix]
1346
- # @return [void]
1347
- [:rlSetMatrixViewOffsetStereo, :rlSetMatrixViewOffsetStereo, [Matrix.by_value, Matrix.by_value], :void],
1348
-
1349
- # @!method rlLoadDrawCube()
1350
- # rlLoadDrawCube : Load and draw a cube
1351
- # @return [void]
1352
- [:rlLoadDrawCube, :rlLoadDrawCube, [], :void],
1353
-
1354
- # @!method rlLoadDrawQuad()
1355
- # rlLoadDrawQuad : Load and draw a quad
1356
- # @return [void]
1357
- [:rlLoadDrawQuad, :rlLoadDrawQuad, [], :void],
1358
- ]
1359
- entries.each do |entry|
1360
- api_name = if method_naming == :snake_case
1361
- snake_case_name = entry[0].to_s.gsub(/([A-Z]+)([A-Z0-9][a-z])/, '\1_\2').gsub(/([a-z\d])([A-Z0-9])/, '\1_\2').downcase
1362
- snake_case_name.gsub!('vector_3', 'vector3_') if snake_case_name.include?('vector_3')
1363
- snake_case_name.gsub!('vector_2', 'vector2_') if snake_case_name.include?('vector_2')
1364
- snake_case_name.chop! if snake_case_name.end_with?('_')
1365
- snake_case_name.to_sym
1366
- else
1367
- entry[0]
1368
- end
1369
- attach_function api_name, entry[1], entry[2], entry[3]
1370
- rescue FFI::NotFoundError => e
1371
- warn "[Warning] Failed to import #{entry[0]} (#{e})."
1372
- end
1373
- end
1374
- 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 = "5.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_MIN = 0x8007 # GL_MIN
69
+ RL_MAX = 0x8008 # GL_MAX
70
+ RL_FUNC_SUBTRACT = 0x800A # GL_FUNC_SUBTRACT
71
+ RL_FUNC_REVERSE_SUBTRACT = 0x800B # GL_FUNC_REVERSE_SUBTRACT
72
+ RL_BLEND_EQUATION = 0x8009 # GL_BLEND_EQUATION
73
+ RL_BLEND_EQUATION_RGB = 0x8009 # GL_BLEND_EQUATION_RGB // (Same as BLEND_EQUATION)
74
+ RL_BLEND_EQUATION_ALPHA = 0x883D # GL_BLEND_EQUATION_ALPHA
75
+ RL_BLEND_DST_RGB = 0x80C8 # GL_BLEND_DST_RGB
76
+ RL_BLEND_SRC_RGB = 0x80C9 # GL_BLEND_SRC_RGB
77
+ RL_BLEND_DST_ALPHA = 0x80CA # GL_BLEND_DST_ALPHA
78
+ RL_BLEND_SRC_ALPHA = 0x80CB # GL_BLEND_SRC_ALPHA
79
+ RL_BLEND_COLOR = 0x8005 # GL_BLEND_COLOR
80
+ RL_READ_FRAMEBUFFER = 0x8CA8 # GL_READ_FRAMEBUFFER
81
+ RL_DRAW_FRAMEBUFFER = 0x8CA9 # GL_DRAW_FRAMEBUFFER
82
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_INSTANCE_TX = 9
83
+
84
+ # Enum
85
+
86
+ # enum rlGlVersion
87
+ # OpenGL version
88
+ RL_OPENGL_11 = 1 # OpenGL 1.1
89
+ RL_OPENGL_21 = 2 # OpenGL 2.1 (GLSL 120)
90
+ RL_OPENGL_33 = 3 # OpenGL 3.3 (GLSL 330)
91
+ RL_OPENGL_43 = 4 # OpenGL 4.3 (using GLSL 330)
92
+ RL_OPENGL_ES_20 = 5 # OpenGL ES 2.0 (GLSL 100)
93
+ RL_OPENGL_ES_30 = 6 # OpenGL ES 3.0 (GLSL 300 es)
94
+
95
+ # enum rlTraceLogLevel
96
+ # Trace log level
97
+ RL_LOG_ALL = 0 # Display all logs
98
+ RL_LOG_TRACE = 1 # Trace logging, intended for internal use only
99
+ RL_LOG_DEBUG = 2 # Debug logging, used for internal debugging, it should be disabled on release builds
100
+ RL_LOG_INFO = 3 # Info logging, used for program execution info
101
+ RL_LOG_WARNING = 4 # Warning logging, used on recoverable failures
102
+ RL_LOG_ERROR = 5 # Error logging, used on unrecoverable failures
103
+ RL_LOG_FATAL = 6 # Fatal logging, used to abort program: exit(EXIT_FAILURE)
104
+ RL_LOG_NONE = 7 # Disable logging
105
+
106
+ # enum rlPixelFormat
107
+ # Texture pixel formats
108
+ RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1 # 8 bit per pixel (no alpha)
109
+ RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2 # 8*2 bpp (2 channels)
110
+ RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3 # 16 bpp
111
+ RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4 # 24 bpp
112
+ RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5 # 16 bpp (1 bit alpha)
113
+ RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6 # 16 bpp (4 bit alpha)
114
+ RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7 # 32 bpp
115
+ RL_PIXELFORMAT_UNCOMPRESSED_R32 = 8 # 32 bpp (1 channel - float)
116
+ RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9 # 32*3 bpp (3 channels - float)
117
+ RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10 # 32*4 bpp (4 channels - float)
118
+ RL_PIXELFORMAT_UNCOMPRESSED_R16 = 11 # 16 bpp (1 channel - half float)
119
+ RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12 # 16*3 bpp (3 channels - half float)
120
+ RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13 # 16*4 bpp (4 channels - half float)
121
+ RL_PIXELFORMAT_COMPRESSED_DXT1_RGB = 14 # 4 bpp (no alpha)
122
+ RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15 # 4 bpp (1 bit alpha)
123
+ RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16 # 8 bpp
124
+ RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17 # 8 bpp
125
+ RL_PIXELFORMAT_COMPRESSED_ETC1_RGB = 18 # 4 bpp
126
+ RL_PIXELFORMAT_COMPRESSED_ETC2_RGB = 19 # 4 bpp
127
+ RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20 # 8 bpp
128
+ RL_PIXELFORMAT_COMPRESSED_PVRT_RGB = 21 # 4 bpp
129
+ RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22 # 4 bpp
130
+ RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23 # 8 bpp
131
+ RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24 # 2 bpp
132
+
133
+ # enum rlTextureFilter
134
+ # Texture parameters: filter mode
135
+ RL_TEXTURE_FILTER_POINT = 0 # No filter, just pixel approximation
136
+ RL_TEXTURE_FILTER_BILINEAR = 1 # Linear filtering
137
+ RL_TEXTURE_FILTER_TRILINEAR = 2 # Trilinear filtering (linear with mipmaps)
138
+ RL_TEXTURE_FILTER_ANISOTROPIC_4X = 3 # Anisotropic filtering 4x
139
+ RL_TEXTURE_FILTER_ANISOTROPIC_8X = 4 # Anisotropic filtering 8x
140
+ RL_TEXTURE_FILTER_ANISOTROPIC_16X = 5 # Anisotropic filtering 16x
141
+
142
+ # enum rlBlendMode
143
+ # Color blending modes (pre-defined)
144
+ RL_BLEND_ALPHA = 0 # Blend textures considering alpha (default)
145
+ RL_BLEND_ADDITIVE = 1 # Blend textures adding colors
146
+ RL_BLEND_MULTIPLIED = 2 # Blend textures multiplying colors
147
+ RL_BLEND_ADD_COLORS = 3 # Blend textures adding colors (alternative)
148
+ RL_BLEND_SUBTRACT_COLORS = 4 # Blend textures subtracting colors (alternative)
149
+ RL_BLEND_ALPHA_PREMULTIPLY = 5 # Blend premultiplied textures considering alpha
150
+ RL_BLEND_CUSTOM = 6 # Blend textures using custom src/dst factors (use rlSetBlendFactors())
151
+ RL_BLEND_CUSTOM_SEPARATE = 7 # Blend textures using custom src/dst factors (use rlSetBlendFactorsSeparate())
152
+
153
+ # enum rlShaderLocationIndex
154
+ # Shader location point type
155
+ RL_SHADER_LOC_VERTEX_POSITION = 0 # Shader location: vertex attribute: position
156
+ RL_SHADER_LOC_VERTEX_TEXCOORD01 = 1 # Shader location: vertex attribute: texcoord01
157
+ RL_SHADER_LOC_VERTEX_TEXCOORD02 = 2 # Shader location: vertex attribute: texcoord02
158
+ RL_SHADER_LOC_VERTEX_NORMAL = 3 # Shader location: vertex attribute: normal
159
+ RL_SHADER_LOC_VERTEX_TANGENT = 4 # Shader location: vertex attribute: tangent
160
+ RL_SHADER_LOC_VERTEX_COLOR = 5 # Shader location: vertex attribute: color
161
+ RL_SHADER_LOC_MATRIX_MVP = 6 # Shader location: matrix uniform: model-view-projection
162
+ RL_SHADER_LOC_MATRIX_VIEW = 7 # Shader location: matrix uniform: view (camera transform)
163
+ RL_SHADER_LOC_MATRIX_PROJECTION = 8 # Shader location: matrix uniform: projection
164
+ RL_SHADER_LOC_MATRIX_MODEL = 9 # Shader location: matrix uniform: model (transform)
165
+ RL_SHADER_LOC_MATRIX_NORMAL = 10 # Shader location: matrix uniform: normal
166
+ RL_SHADER_LOC_VECTOR_VIEW = 11 # Shader location: vector uniform: view
167
+ RL_SHADER_LOC_COLOR_DIFFUSE = 12 # Shader location: vector uniform: diffuse color
168
+ RL_SHADER_LOC_COLOR_SPECULAR = 13 # Shader location: vector uniform: specular color
169
+ RL_SHADER_LOC_COLOR_AMBIENT = 14 # Shader location: vector uniform: ambient color
170
+ RL_SHADER_LOC_MAP_ALBEDO = 15 # Shader location: sampler2d texture: albedo (same as: RL_SHADER_LOC_MAP_DIFFUSE)
171
+ RL_SHADER_LOC_MAP_METALNESS = 16 # Shader location: sampler2d texture: metalness (same as: RL_SHADER_LOC_MAP_SPECULAR)
172
+ RL_SHADER_LOC_MAP_NORMAL = 17 # Shader location: sampler2d texture: normal
173
+ RL_SHADER_LOC_MAP_ROUGHNESS = 18 # Shader location: sampler2d texture: roughness
174
+ RL_SHADER_LOC_MAP_OCCLUSION = 19 # Shader location: sampler2d texture: occlusion
175
+ RL_SHADER_LOC_MAP_EMISSION = 20 # Shader location: sampler2d texture: emission
176
+ RL_SHADER_LOC_MAP_HEIGHT = 21 # Shader location: sampler2d texture: height
177
+ RL_SHADER_LOC_MAP_CUBEMAP = 22 # Shader location: samplerCube texture: cubemap
178
+ RL_SHADER_LOC_MAP_IRRADIANCE = 23 # Shader location: samplerCube texture: irradiance
179
+ RL_SHADER_LOC_MAP_PREFILTER = 24 # Shader location: samplerCube texture: prefilter
180
+ RL_SHADER_LOC_MAP_BRDF = 25 # Shader location: sampler2d texture: brdf
181
+
182
+ # enum rlShaderUniformDataType
183
+ # Shader uniform data type
184
+ RL_SHADER_UNIFORM_FLOAT = 0 # Shader uniform type: float
185
+ RL_SHADER_UNIFORM_VEC2 = 1 # Shader uniform type: vec2 (2 float)
186
+ RL_SHADER_UNIFORM_VEC3 = 2 # Shader uniform type: vec3 (3 float)
187
+ RL_SHADER_UNIFORM_VEC4 = 3 # Shader uniform type: vec4 (4 float)
188
+ RL_SHADER_UNIFORM_INT = 4 # Shader uniform type: int
189
+ RL_SHADER_UNIFORM_IVEC2 = 5 # Shader uniform type: ivec2 (2 int)
190
+ RL_SHADER_UNIFORM_IVEC3 = 6 # Shader uniform type: ivec3 (3 int)
191
+ RL_SHADER_UNIFORM_IVEC4 = 7 # Shader uniform type: ivec4 (4 int)
192
+ RL_SHADER_UNIFORM_UINT = 8 # Shader uniform type: unsigned int
193
+ RL_SHADER_UNIFORM_UIVEC2 = 9 # Shader uniform type: uivec2 (2 unsigned int)
194
+ RL_SHADER_UNIFORM_UIVEC3 = 10 # Shader uniform type: uivec3 (3 unsigned int)
195
+ RL_SHADER_UNIFORM_UIVEC4 = 11 # Shader uniform type: uivec4 (4 unsigned int)
196
+ RL_SHADER_UNIFORM_SAMPLER2D = 12 # Shader uniform type: sampler2d
197
+
198
+ # enum rlShaderAttributeDataType
199
+ # Shader attribute data types
200
+ RL_SHADER_ATTRIB_FLOAT = 0 # Shader attribute type: float
201
+ RL_SHADER_ATTRIB_VEC2 = 1 # Shader attribute type: vec2 (2 float)
202
+ RL_SHADER_ATTRIB_VEC3 = 2 # Shader attribute type: vec3 (3 float)
203
+ RL_SHADER_ATTRIB_VEC4 = 3 # Shader attribute type: vec4 (4 float)
204
+
205
+ # enum rlFramebufferAttachType
206
+ # Framebuffer attachment type
207
+ RL_ATTACHMENT_COLOR_CHANNEL0 = 0 # Framebuffer attachment type: color 0
208
+ RL_ATTACHMENT_COLOR_CHANNEL1 = 1 # Framebuffer attachment type: color 1
209
+ RL_ATTACHMENT_COLOR_CHANNEL2 = 2 # Framebuffer attachment type: color 2
210
+ RL_ATTACHMENT_COLOR_CHANNEL3 = 3 # Framebuffer attachment type: color 3
211
+ RL_ATTACHMENT_COLOR_CHANNEL4 = 4 # Framebuffer attachment type: color 4
212
+ RL_ATTACHMENT_COLOR_CHANNEL5 = 5 # Framebuffer attachment type: color 5
213
+ RL_ATTACHMENT_COLOR_CHANNEL6 = 6 # Framebuffer attachment type: color 6
214
+ RL_ATTACHMENT_COLOR_CHANNEL7 = 7 # Framebuffer attachment type: color 7
215
+ RL_ATTACHMENT_DEPTH = 100 # Framebuffer attachment type: depth
216
+ RL_ATTACHMENT_STENCIL = 200 # Framebuffer attachment type: stencil
217
+
218
+ # enum rlFramebufferAttachTextureType
219
+ # Framebuffer texture attachment type
220
+ RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0 # Framebuffer texture attachment type: cubemap, +X side
221
+ RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1 # Framebuffer texture attachment type: cubemap, -X side
222
+ RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2 # Framebuffer texture attachment type: cubemap, +Y side
223
+ RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3 # Framebuffer texture attachment type: cubemap, -Y side
224
+ RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4 # Framebuffer texture attachment type: cubemap, +Z side
225
+ RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5 # Framebuffer texture attachment type: cubemap, -Z side
226
+ RL_ATTACHMENT_TEXTURE2D = 100 # Framebuffer texture attachment type: texture2d
227
+ RL_ATTACHMENT_RENDERBUFFER = 200 # Framebuffer texture attachment type: renderbuffer
228
+
229
+ # enum rlCullMode
230
+ # Face culling mode
231
+ RL_CULL_FACE_FRONT = 0
232
+ RL_CULL_FACE_BACK = 1
233
+
234
+
235
+ # Typedef
236
+
237
+ typedef :int, :rlGlVersion
238
+ typedef :int, :rlTraceLogLevel
239
+ typedef :int, :rlPixelFormat
240
+ typedef :int, :rlTextureFilter
241
+ typedef :int, :rlBlendMode
242
+ typedef :int, :rlShaderLocationIndex
243
+ typedef :int, :rlShaderUniformDataType
244
+ typedef :int, :rlShaderAttributeDataType
245
+ typedef :int, :rlFramebufferAttachType
246
+ typedef :int, :rlFramebufferAttachTextureType
247
+ typedef :int, :rlCullMode
248
+
249
+ # Struct
250
+
251
+ # Dynamic vertex buffers (position + texcoords + colors + indices arrays)
252
+ class RlVertexBuffer < FFI::Struct
253
+ layout(
254
+ :elementCount, :int, # Number of elements in the buffer (QUADS)
255
+ :vertices, :pointer, # Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
256
+ :texcoords, :pointer, # Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
257
+ :normals, :pointer, # Vertex normal (XYZ - 3 components per vertex) (shader-location = 2)
258
+ :colors, :pointer, # Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
259
+ :indices, :pointer, # Vertex indices (in case vertex data comes indexed) (6 indices per quad)
260
+ :vaoId, :uint, # OpenGL Vertex Array Object id
261
+ :vboId, [:uint, 5], # OpenGL Vertex Buffer Objects id (5 types of vertex data)
262
+ )
263
+ def elementCount = self[:elementCount]
264
+ def elementCount=(v) self[:elementCount] = v end
265
+ def vertices = self[:vertices]
266
+ def vertices=(v) self[:vertices] = v end
267
+ def texcoords = self[:texcoords]
268
+ def texcoords=(v) self[:texcoords] = v end
269
+ def normals = self[:normals]
270
+ def normals=(v) self[:normals] = v end
271
+ def colors = self[:colors]
272
+ def colors=(v) self[:colors] = v end
273
+ def indices = self[:indices]
274
+ def indices=(v) self[:indices] = v end
275
+ def vaoId = self[:vaoId]
276
+ def vaoId=(v) self[:vaoId] = v end
277
+ def vboId = self[:vboId]
278
+ def vboId=(v) self[:vboId] = v end
279
+ end
280
+
281
+ # of those state-change happens (this is done in core module)
282
+ class RlDrawCall < FFI::Struct
283
+ layout(
284
+ :mode, :int, # Drawing mode: LINES, TRIANGLES, QUADS
285
+ :vertexCount, :int, # Number of vertex of the draw
286
+ :vertexAlignment, :int, # Number of vertex required for index alignment (LINES, TRIANGLES)
287
+ :textureId, :uint, # Texture id to be used on the draw -> Use to create new draw call if changes
288
+ )
289
+ def mode = self[:mode]
290
+ def mode=(v) self[:mode] = v end
291
+ def vertexCount = self[:vertexCount]
292
+ def vertexCount=(v) self[:vertexCount] = v end
293
+ def vertexAlignment = self[:vertexAlignment]
294
+ def vertexAlignment=(v) self[:vertexAlignment] = v end
295
+ def textureId = self[:textureId]
296
+ def textureId=(v) self[:textureId] = v end
297
+ end
298
+
299
+ # rlRenderBatch type
300
+ class RlRenderBatch < FFI::Struct
301
+ layout(
302
+ :bufferCount, :int, # Number of vertex buffers (multi-buffering support)
303
+ :currentBuffer, :int, # Current buffer tracking in case of multi-buffering
304
+ :vertexBuffer, :pointer, # Dynamic buffer(s) for vertex data
305
+ :draws, :pointer, # Draw calls array, depends on textureId
306
+ :drawCounter, :int, # Draw calls counter
307
+ :currentDepth, :float, # Current depth value for next draw
308
+ )
309
+ def bufferCount = self[:bufferCount]
310
+ def bufferCount=(v) self[:bufferCount] = v end
311
+ def currentBuffer = self[:currentBuffer]
312
+ def currentBuffer=(v) self[:currentBuffer] = v end
313
+ def vertexBuffer = self[:vertexBuffer]
314
+ def vertexBuffer=(v) self[:vertexBuffer] = v end
315
+ def draws = self[:draws]
316
+ def draws=(v) self[:draws] = v end
317
+ def drawCounter = self[:drawCounter]
318
+ def drawCounter=(v) self[:drawCounter] = v end
319
+ def currentDepth = self[:currentDepth]
320
+ def currentDepth=(v) self[:currentDepth] = v end
321
+ end
322
+
323
+
324
+ # Function
325
+
326
+ def self.setup_rlgl_symbols(method_naming: :original)
327
+ entries = [
328
+
329
+ # @!method rlMatrixMode(mode)
330
+ # rlMatrixMode : Choose the current matrix to be transformed
331
+ # @param mode [int]
332
+ # @return [void]
333
+ [:rlMatrixMode, :rlMatrixMode, [:int], :void],
334
+
335
+ # @!method rlPushMatrix()
336
+ # rlPushMatrix : Push the current matrix to stack
337
+ # @return [void]
338
+ [:rlPushMatrix, :rlPushMatrix, [], :void],
339
+
340
+ # @!method rlPopMatrix()
341
+ # rlPopMatrix : Pop latest inserted matrix from stack
342
+ # @return [void]
343
+ [:rlPopMatrix, :rlPopMatrix, [], :void],
344
+
345
+ # @!method rlLoadIdentity()
346
+ # rlLoadIdentity : Reset current matrix to identity matrix
347
+ # @return [void]
348
+ [:rlLoadIdentity, :rlLoadIdentity, [], :void],
349
+
350
+ # @!method rlTranslatef(x, y, z)
351
+ # rlTranslatef : Multiply the current matrix by a translation matrix
352
+ # @param x [float]
353
+ # @param y [float]
354
+ # @param z [float]
355
+ # @return [void]
356
+ [:rlTranslatef, :rlTranslatef, [:float, :float, :float], :void],
357
+
358
+ # @!method rlRotatef(angle, x, y, z)
359
+ # rlRotatef : Multiply the current matrix by a rotation matrix
360
+ # @param angle [float]
361
+ # @param x [float]
362
+ # @param y [float]
363
+ # @param z [float]
364
+ # @return [void]
365
+ [:rlRotatef, :rlRotatef, [:float, :float, :float, :float], :void],
366
+
367
+ # @!method rlScalef(x, y, z)
368
+ # rlScalef : Multiply the current matrix by a scaling matrix
369
+ # @param x [float]
370
+ # @param y [float]
371
+ # @param z [float]
372
+ # @return [void]
373
+ [:rlScalef, :rlScalef, [:float, :float, :float], :void],
374
+
375
+ # @!method rlMultMatrixf(matf)
376
+ # rlMultMatrixf : Multiply the current matrix by another matrix
377
+ # @param matf [const float *]
378
+ # @return [void]
379
+ [:rlMultMatrixf, :rlMultMatrixf, [:pointer], :void],
380
+
381
+ # @!method rlFrustum(left, right, bottom, top, znear, zfar)
382
+ # rlFrustum
383
+ # @param left [double]
384
+ # @param right [double]
385
+ # @param bottom [double]
386
+ # @param top [double]
387
+ # @param znear [double]
388
+ # @param zfar [double]
389
+ # @return [void]
390
+ [:rlFrustum, :rlFrustum, [:double, :double, :double, :double, :double, :double], :void],
391
+
392
+ # @!method rlOrtho(left, right, bottom, top, znear, zfar)
393
+ # rlOrtho
394
+ # @param left [double]
395
+ # @param right [double]
396
+ # @param bottom [double]
397
+ # @param top [double]
398
+ # @param znear [double]
399
+ # @param zfar [double]
400
+ # @return [void]
401
+ [:rlOrtho, :rlOrtho, [:double, :double, :double, :double, :double, :double], :void],
402
+
403
+ # @!method rlViewport(x, y, width, height)
404
+ # rlViewport : Set the viewport area
405
+ # @param x [int]
406
+ # @param y [int]
407
+ # @param width [int]
408
+ # @param height [int]
409
+ # @return [void]
410
+ [:rlViewport, :rlViewport, [:int, :int, :int, :int], :void],
411
+
412
+ # @!method rlSetClipPlanes(nearPlane, farPlane)
413
+ # rlSetClipPlanes : Set clip planes distances
414
+ # @param nearPlane [double]
415
+ # @param farPlane [double]
416
+ # @return [void]
417
+ [:rlSetClipPlanes, :rlSetClipPlanes, [:double, :double], :void],
418
+
419
+ # @!method rlGetCullDistanceNear()
420
+ # rlGetCullDistanceNear : Get cull plane distance near
421
+ # @return [double]
422
+ [:rlGetCullDistanceNear, :rlGetCullDistanceNear, [], :double],
423
+
424
+ # @!method rlGetCullDistanceFar()
425
+ # rlGetCullDistanceFar : Get cull plane distance far
426
+ # @return [double]
427
+ [:rlGetCullDistanceFar, :rlGetCullDistanceFar, [], :double],
428
+
429
+ # @!method rlBegin(mode)
430
+ # rlBegin : Initialize drawing mode (how to organize vertex)
431
+ # @param mode [int]
432
+ # @return [void]
433
+ [:rlBegin, :rlBegin, [:int], :void],
434
+
435
+ # @!method rlEnd()
436
+ # rlEnd : Finish vertex providing
437
+ # @return [void]
438
+ [:rlEnd, :rlEnd, [], :void],
439
+
440
+ # @!method rlVertex2i(x, y)
441
+ # rlVertex2i : Define one vertex (position) - 2 int
442
+ # @param x [int]
443
+ # @param y [int]
444
+ # @return [void]
445
+ [:rlVertex2i, :rlVertex2i, [:int, :int], :void],
446
+
447
+ # @!method rlVertex2f(x, y)
448
+ # rlVertex2f : Define one vertex (position) - 2 float
449
+ # @param x [float]
450
+ # @param y [float]
451
+ # @return [void]
452
+ [:rlVertex2f, :rlVertex2f, [:float, :float], :void],
453
+
454
+ # @!method rlVertex3f(x, y, z)
455
+ # rlVertex3f : Define one vertex (position) - 3 float
456
+ # @param x [float]
457
+ # @param y [float]
458
+ # @param z [float]
459
+ # @return [void]
460
+ [:rlVertex3f, :rlVertex3f, [:float, :float, :float], :void],
461
+
462
+ # @!method rlTexCoord2f(x, y)
463
+ # rlTexCoord2f : Define one vertex (texture coordinate) - 2 float
464
+ # @param x [float]
465
+ # @param y [float]
466
+ # @return [void]
467
+ [:rlTexCoord2f, :rlTexCoord2f, [:float, :float], :void],
468
+
469
+ # @!method rlNormal3f(x, y, z)
470
+ # rlNormal3f : Define one vertex (normal) - 3 float
471
+ # @param x [float]
472
+ # @param y [float]
473
+ # @param z [float]
474
+ # @return [void]
475
+ [:rlNormal3f, :rlNormal3f, [:float, :float, :float], :void],
476
+
477
+ # @!method rlColor4ub(r, g, b, a)
478
+ # rlColor4ub : Define one vertex (color) - 4 byte
479
+ # @param r [unsigned char]
480
+ # @param g [unsigned char]
481
+ # @param b [unsigned char]
482
+ # @param a [unsigned char]
483
+ # @return [void]
484
+ [:rlColor4ub, :rlColor4ub, [:uchar, :uchar, :uchar, :uchar], :void],
485
+
486
+ # @!method rlColor3f(x, y, z)
487
+ # rlColor3f : Define one vertex (color) - 3 float
488
+ # @param x [float]
489
+ # @param y [float]
490
+ # @param z [float]
491
+ # @return [void]
492
+ [:rlColor3f, :rlColor3f, [:float, :float, :float], :void],
493
+
494
+ # @!method rlColor4f(x, y, z, w)
495
+ # rlColor4f : Define one vertex (color) - 4 float
496
+ # @param x [float]
497
+ # @param y [float]
498
+ # @param z [float]
499
+ # @param w [float]
500
+ # @return [void]
501
+ [:rlColor4f, :rlColor4f, [:float, :float, :float, :float], :void],
502
+
503
+ # @!method rlEnableVertexArray(vaoId)
504
+ # rlEnableVertexArray : Enable vertex array (VAO, if supported)
505
+ # @param vaoId [unsigned int]
506
+ # @return [bool]
507
+ [:rlEnableVertexArray, :rlEnableVertexArray, [:uint], :bool],
508
+
509
+ # @!method rlDisableVertexArray()
510
+ # rlDisableVertexArray : Disable vertex array (VAO, if supported)
511
+ # @return [void]
512
+ [:rlDisableVertexArray, :rlDisableVertexArray, [], :void],
513
+
514
+ # @!method rlEnableVertexBuffer(id)
515
+ # rlEnableVertexBuffer : Enable vertex buffer (VBO)
516
+ # @param id [unsigned int]
517
+ # @return [void]
518
+ [:rlEnableVertexBuffer, :rlEnableVertexBuffer, [:uint], :void],
519
+
520
+ # @!method rlDisableVertexBuffer()
521
+ # rlDisableVertexBuffer : Disable vertex buffer (VBO)
522
+ # @return [void]
523
+ [:rlDisableVertexBuffer, :rlDisableVertexBuffer, [], :void],
524
+
525
+ # @!method rlEnableVertexBufferElement(id)
526
+ # rlEnableVertexBufferElement : Enable vertex buffer element (VBO element)
527
+ # @param id [unsigned int]
528
+ # @return [void]
529
+ [:rlEnableVertexBufferElement, :rlEnableVertexBufferElement, [:uint], :void],
530
+
531
+ # @!method rlDisableVertexBufferElement()
532
+ # rlDisableVertexBufferElement : Disable vertex buffer element (VBO element)
533
+ # @return [void]
534
+ [:rlDisableVertexBufferElement, :rlDisableVertexBufferElement, [], :void],
535
+
536
+ # @!method rlEnableVertexAttribute(index)
537
+ # rlEnableVertexAttribute : Enable vertex attribute index
538
+ # @param index [unsigned int]
539
+ # @return [void]
540
+ [:rlEnableVertexAttribute, :rlEnableVertexAttribute, [:uint], :void],
541
+
542
+ # @!method rlDisableVertexAttribute(index)
543
+ # rlDisableVertexAttribute : Disable vertex attribute index
544
+ # @param index [unsigned int]
545
+ # @return [void]
546
+ [:rlDisableVertexAttribute, :rlDisableVertexAttribute, [:uint], :void],
547
+
548
+ # @!method rlActiveTextureSlot(slot)
549
+ # rlActiveTextureSlot : Select and active a texture slot
550
+ # @param slot [int]
551
+ # @return [void]
552
+ [:rlActiveTextureSlot, :rlActiveTextureSlot, [:int], :void],
553
+
554
+ # @!method rlEnableTexture(id)
555
+ # rlEnableTexture : Enable texture
556
+ # @param id [unsigned int]
557
+ # @return [void]
558
+ [:rlEnableTexture, :rlEnableTexture, [:uint], :void],
559
+
560
+ # @!method rlDisableTexture()
561
+ # rlDisableTexture : Disable texture
562
+ # @return [void]
563
+ [:rlDisableTexture, :rlDisableTexture, [], :void],
564
+
565
+ # @!method rlEnableTextureCubemap(id)
566
+ # rlEnableTextureCubemap : Enable texture cubemap
567
+ # @param id [unsigned int]
568
+ # @return [void]
569
+ [:rlEnableTextureCubemap, :rlEnableTextureCubemap, [:uint], :void],
570
+
571
+ # @!method rlDisableTextureCubemap()
572
+ # rlDisableTextureCubemap : Disable texture cubemap
573
+ # @return [void]
574
+ [:rlDisableTextureCubemap, :rlDisableTextureCubemap, [], :void],
575
+
576
+ # @!method rlTextureParameters(id, param, value)
577
+ # rlTextureParameters : Set texture parameters (filter, wrap)
578
+ # @param id [unsigned int]
579
+ # @param param [int]
580
+ # @param value [int]
581
+ # @return [void]
582
+ [:rlTextureParameters, :rlTextureParameters, [:uint, :int, :int], :void],
583
+
584
+ # @!method rlCubemapParameters(id, param, value)
585
+ # rlCubemapParameters : Set cubemap parameters (filter, wrap)
586
+ # @param id [unsigned int]
587
+ # @param param [int]
588
+ # @param value [int]
589
+ # @return [void]
590
+ [:rlCubemapParameters, :rlCubemapParameters, [:uint, :int, :int], :void],
591
+
592
+ # @!method rlEnableShader(id)
593
+ # rlEnableShader : Enable shader program
594
+ # @param id [unsigned int]
595
+ # @return [void]
596
+ [:rlEnableShader, :rlEnableShader, [:uint], :void],
597
+
598
+ # @!method rlDisableShader()
599
+ # rlDisableShader : Disable shader program
600
+ # @return [void]
601
+ [:rlDisableShader, :rlDisableShader, [], :void],
602
+
603
+ # @!method rlEnableFramebuffer(id)
604
+ # rlEnableFramebuffer : Enable render texture (fbo)
605
+ # @param id [unsigned int]
606
+ # @return [void]
607
+ [:rlEnableFramebuffer, :rlEnableFramebuffer, [:uint], :void],
608
+
609
+ # @!method rlDisableFramebuffer()
610
+ # rlDisableFramebuffer : Disable render texture (fbo), return to default framebuffer
611
+ # @return [void]
612
+ [:rlDisableFramebuffer, :rlDisableFramebuffer, [], :void],
613
+
614
+ # @!method rlGetActiveFramebuffer()
615
+ # rlGetActiveFramebuffer : Get the currently active render texture (fbo), 0 for default framebuffer
616
+ # @return [unsigned int]
617
+ [:rlGetActiveFramebuffer, :rlGetActiveFramebuffer, [], :uint],
618
+
619
+ # @!method rlActiveDrawBuffers(count)
620
+ # rlActiveDrawBuffers : Activate multiple draw color buffers
621
+ # @param count [int]
622
+ # @return [void]
623
+ [:rlActiveDrawBuffers, :rlActiveDrawBuffers, [:int], :void],
624
+
625
+ # @!method rlBlitFramebuffer(srcX, srcY, srcWidth, srcHeight, dstX, dstY, dstWidth, dstHeight, bufferMask)
626
+ # rlBlitFramebuffer : Blit active framebuffer to main framebuffer
627
+ # @param srcX [int]
628
+ # @param srcY [int]
629
+ # @param srcWidth [int]
630
+ # @param srcHeight [int]
631
+ # @param dstX [int]
632
+ # @param dstY [int]
633
+ # @param dstWidth [int]
634
+ # @param dstHeight [int]
635
+ # @param bufferMask [int]
636
+ # @return [void]
637
+ [:rlBlitFramebuffer, :rlBlitFramebuffer, [:int, :int, :int, :int, :int, :int, :int, :int, :int], :void],
638
+
639
+ # @!method rlBindFramebuffer(target, framebuffer)
640
+ # rlBindFramebuffer : Bind framebuffer (FBO)
641
+ # @param target [unsigned int]
642
+ # @param framebuffer [unsigned int]
643
+ # @return [void]
644
+ [:rlBindFramebuffer, :rlBindFramebuffer, [:uint, :uint], :void],
645
+
646
+ # @!method rlEnableColorBlend()
647
+ # rlEnableColorBlend : Enable color blending
648
+ # @return [void]
649
+ [:rlEnableColorBlend, :rlEnableColorBlend, [], :void],
650
+
651
+ # @!method rlDisableColorBlend()
652
+ # rlDisableColorBlend : Disable color blending
653
+ # @return [void]
654
+ [:rlDisableColorBlend, :rlDisableColorBlend, [], :void],
655
+
656
+ # @!method rlEnableDepthTest()
657
+ # rlEnableDepthTest : Enable depth test
658
+ # @return [void]
659
+ [:rlEnableDepthTest, :rlEnableDepthTest, [], :void],
660
+
661
+ # @!method rlDisableDepthTest()
662
+ # rlDisableDepthTest : Disable depth test
663
+ # @return [void]
664
+ [:rlDisableDepthTest, :rlDisableDepthTest, [], :void],
665
+
666
+ # @!method rlEnableDepthMask()
667
+ # rlEnableDepthMask : Enable depth write
668
+ # @return [void]
669
+ [:rlEnableDepthMask, :rlEnableDepthMask, [], :void],
670
+
671
+ # @!method rlDisableDepthMask()
672
+ # rlDisableDepthMask : Disable depth write
673
+ # @return [void]
674
+ [:rlDisableDepthMask, :rlDisableDepthMask, [], :void],
675
+
676
+ # @!method rlEnableBackfaceCulling()
677
+ # rlEnableBackfaceCulling : Enable backface culling
678
+ # @return [void]
679
+ [:rlEnableBackfaceCulling, :rlEnableBackfaceCulling, [], :void],
680
+
681
+ # @!method rlDisableBackfaceCulling()
682
+ # rlDisableBackfaceCulling : Disable backface culling
683
+ # @return [void]
684
+ [:rlDisableBackfaceCulling, :rlDisableBackfaceCulling, [], :void],
685
+
686
+ # @!method rlColorMask(r, g, b, a)
687
+ # rlColorMask : Color mask control
688
+ # @param r [bool]
689
+ # @param g [bool]
690
+ # @param b [bool]
691
+ # @param a [bool]
692
+ # @return [void]
693
+ [:rlColorMask, :rlColorMask, [:bool, :bool, :bool, :bool], :void],
694
+
695
+ # @!method rlSetCullFace(mode)
696
+ # rlSetCullFace : Set face culling mode
697
+ # @param mode [int]
698
+ # @return [void]
699
+ [:rlSetCullFace, :rlSetCullFace, [:int], :void],
700
+
701
+ # @!method rlEnableScissorTest()
702
+ # rlEnableScissorTest : Enable scissor test
703
+ # @return [void]
704
+ [:rlEnableScissorTest, :rlEnableScissorTest, [], :void],
705
+
706
+ # @!method rlDisableScissorTest()
707
+ # rlDisableScissorTest : Disable scissor test
708
+ # @return [void]
709
+ [:rlDisableScissorTest, :rlDisableScissorTest, [], :void],
710
+
711
+ # @!method rlScissor(x, y, width, height)
712
+ # rlScissor : Scissor test
713
+ # @param x [int]
714
+ # @param y [int]
715
+ # @param width [int]
716
+ # @param height [int]
717
+ # @return [void]
718
+ [:rlScissor, :rlScissor, [:int, :int, :int, :int], :void],
719
+
720
+ # @!method rlEnableWireMode()
721
+ # rlEnableWireMode : Enable wire mode
722
+ # @return [void]
723
+ [:rlEnableWireMode, :rlEnableWireMode, [], :void],
724
+
725
+ # @!method rlEnablePointMode()
726
+ # rlEnablePointMode : Enable point mode
727
+ # @return [void]
728
+ [:rlEnablePointMode, :rlEnablePointMode, [], :void],
729
+
730
+ # @!method rlDisableWireMode()
731
+ # rlDisableWireMode : Disable wire (and point) mode
732
+ # @return [void]
733
+ [:rlDisableWireMode, :rlDisableWireMode, [], :void],
734
+
735
+ # @!method rlSetLineWidth(width)
736
+ # rlSetLineWidth : Set the line drawing width
737
+ # @param width [float]
738
+ # @return [void]
739
+ [:rlSetLineWidth, :rlSetLineWidth, [:float], :void],
740
+
741
+ # @!method rlGetLineWidth()
742
+ # rlGetLineWidth : Get the line drawing width
743
+ # @return [float]
744
+ [:rlGetLineWidth, :rlGetLineWidth, [], :float],
745
+
746
+ # @!method rlEnableSmoothLines()
747
+ # rlEnableSmoothLines : Enable line aliasing
748
+ # @return [void]
749
+ [:rlEnableSmoothLines, :rlEnableSmoothLines, [], :void],
750
+
751
+ # @!method rlDisableSmoothLines()
752
+ # rlDisableSmoothLines : Disable line aliasing
753
+ # @return [void]
754
+ [:rlDisableSmoothLines, :rlDisableSmoothLines, [], :void],
755
+
756
+ # @!method rlEnableStereoRender()
757
+ # rlEnableStereoRender : Enable stereo rendering
758
+ # @return [void]
759
+ [:rlEnableStereoRender, :rlEnableStereoRender, [], :void],
760
+
761
+ # @!method rlDisableStereoRender()
762
+ # rlDisableStereoRender : Disable stereo rendering
763
+ # @return [void]
764
+ [:rlDisableStereoRender, :rlDisableStereoRender, [], :void],
765
+
766
+ # @!method rlIsStereoRenderEnabled()
767
+ # rlIsStereoRenderEnabled : Check if stereo render is enabled
768
+ # @return [bool]
769
+ [:rlIsStereoRenderEnabled, :rlIsStereoRenderEnabled, [], :bool],
770
+
771
+ # @!method rlClearColor(r, g, b, a)
772
+ # rlClearColor : Clear color buffer with color
773
+ # @param r [unsigned char]
774
+ # @param g [unsigned char]
775
+ # @param b [unsigned char]
776
+ # @param a [unsigned char]
777
+ # @return [void]
778
+ [:rlClearColor, :rlClearColor, [:uchar, :uchar, :uchar, :uchar], :void],
779
+
780
+ # @!method rlClearScreenBuffers()
781
+ # rlClearScreenBuffers : Clear used screen buffers (color and depth)
782
+ # @return [void]
783
+ [:rlClearScreenBuffers, :rlClearScreenBuffers, [], :void],
784
+
785
+ # @!method rlCheckErrors()
786
+ # rlCheckErrors : Check and log OpenGL error codes
787
+ # @return [void]
788
+ [:rlCheckErrors, :rlCheckErrors, [], :void],
789
+
790
+ # @!method rlSetBlendMode(mode)
791
+ # rlSetBlendMode : Set blending mode
792
+ # @param mode [int]
793
+ # @return [void]
794
+ [:rlSetBlendMode, :rlSetBlendMode, [:int], :void],
795
+
796
+ # @!method rlSetBlendFactors(glSrcFactor, glDstFactor, glEquation)
797
+ # rlSetBlendFactors : Set blending mode factor and equation (using OpenGL factors)
798
+ # @param glSrcFactor [int]
799
+ # @param glDstFactor [int]
800
+ # @param glEquation [int]
801
+ # @return [void]
802
+ [:rlSetBlendFactors, :rlSetBlendFactors, [:int, :int, :int], :void],
803
+
804
+ # @!method rlSetBlendFactorsSeparate(glSrcRGB, glDstRGB, glSrcAlpha, glDstAlpha, glEqRGB, glEqAlpha)
805
+ # rlSetBlendFactorsSeparate : Set blending mode factors and equations separately (using OpenGL factors)
806
+ # @param glSrcRGB [int]
807
+ # @param glDstRGB [int]
808
+ # @param glSrcAlpha [int]
809
+ # @param glDstAlpha [int]
810
+ # @param glEqRGB [int]
811
+ # @param glEqAlpha [int]
812
+ # @return [void]
813
+ [:rlSetBlendFactorsSeparate, :rlSetBlendFactorsSeparate, [:int, :int, :int, :int, :int, :int], :void],
814
+
815
+ # @!method rlglInit(width, height)
816
+ # rlglInit : Initialize rlgl (buffers, shaders, textures, states)
817
+ # @param width [int]
818
+ # @param height [int]
819
+ # @return [void]
820
+ [:rlglInit, :rlglInit, [:int, :int], :void],
821
+
822
+ # @!method rlglClose()
823
+ # rlglClose : De-initialize rlgl (buffers, shaders, textures)
824
+ # @return [void]
825
+ [:rlglClose, :rlglClose, [], :void],
826
+
827
+ # @!method rlLoadExtensions(loader)
828
+ # rlLoadExtensions : Load OpenGL extensions (loader function required)
829
+ # @param loader [void *]
830
+ # @return [void]
831
+ [:rlLoadExtensions, :rlLoadExtensions, [:pointer], :void],
832
+
833
+ # @!method rlGetVersion()
834
+ # rlGetVersion : Get current OpenGL version
835
+ # @return [int]
836
+ [:rlGetVersion, :rlGetVersion, [], :int],
837
+
838
+ # @!method rlSetFramebufferWidth(width)
839
+ # rlSetFramebufferWidth : Set current framebuffer width
840
+ # @param width [int]
841
+ # @return [void]
842
+ [:rlSetFramebufferWidth, :rlSetFramebufferWidth, [:int], :void],
843
+
844
+ # @!method rlGetFramebufferWidth()
845
+ # rlGetFramebufferWidth : Get default framebuffer width
846
+ # @return [int]
847
+ [:rlGetFramebufferWidth, :rlGetFramebufferWidth, [], :int],
848
+
849
+ # @!method rlSetFramebufferHeight(height)
850
+ # rlSetFramebufferHeight : Set current framebuffer height
851
+ # @param height [int]
852
+ # @return [void]
853
+ [:rlSetFramebufferHeight, :rlSetFramebufferHeight, [:int], :void],
854
+
855
+ # @!method rlGetFramebufferHeight()
856
+ # rlGetFramebufferHeight : Get default framebuffer height
857
+ # @return [int]
858
+ [:rlGetFramebufferHeight, :rlGetFramebufferHeight, [], :int],
859
+
860
+ # @!method rlGetTextureIdDefault()
861
+ # rlGetTextureIdDefault : Get default texture id
862
+ # @return [unsigned int]
863
+ [:rlGetTextureIdDefault, :rlGetTextureIdDefault, [], :uint],
864
+
865
+ # @!method rlGetShaderIdDefault()
866
+ # rlGetShaderIdDefault : Get default shader id
867
+ # @return [unsigned int]
868
+ [:rlGetShaderIdDefault, :rlGetShaderIdDefault, [], :uint],
869
+
870
+ # @!method rlGetShaderLocsDefault()
871
+ # rlGetShaderLocsDefault : Get default shader locations
872
+ # @return [int *]
873
+ [:rlGetShaderLocsDefault, :rlGetShaderLocsDefault, [], :pointer],
874
+
875
+ # @!method rlLoadRenderBatch(numBuffers, bufferElements)
876
+ # rlLoadRenderBatch : Load a render batch system
877
+ # @param numBuffers [int]
878
+ # @param bufferElements [int]
879
+ # @return [rlRenderBatch]
880
+ [:rlLoadRenderBatch, :rlLoadRenderBatch, [:int, :int], RlRenderBatch.by_value],
881
+
882
+ # @!method rlUnloadRenderBatch(batch)
883
+ # rlUnloadRenderBatch : Unload render batch system
884
+ # @param batch [rlRenderBatch]
885
+ # @return [void]
886
+ [:rlUnloadRenderBatch, :rlUnloadRenderBatch, [RlRenderBatch.by_value], :void],
887
+
888
+ # @!method rlDrawRenderBatch(batch)
889
+ # rlDrawRenderBatch : Draw render batch data (Update->Draw->Reset)
890
+ # @param batch [rlRenderBatch *]
891
+ # @return [void]
892
+ [:rlDrawRenderBatch, :rlDrawRenderBatch, [:pointer], :void],
893
+
894
+ # @!method rlSetRenderBatchActive(batch)
895
+ # rlSetRenderBatchActive : Set the active render batch for rlgl (NULL for default internal)
896
+ # @param batch [rlRenderBatch *]
897
+ # @return [void]
898
+ [:rlSetRenderBatchActive, :rlSetRenderBatchActive, [:pointer], :void],
899
+
900
+ # @!method rlDrawRenderBatchActive()
901
+ # rlDrawRenderBatchActive : Update and draw internal render batch
902
+ # @return [void]
903
+ [:rlDrawRenderBatchActive, :rlDrawRenderBatchActive, [], :void],
904
+
905
+ # @!method rlCheckRenderBatchLimit(vCount)
906
+ # rlCheckRenderBatchLimit : Check internal buffer overflow for a given number of vertex
907
+ # @param vCount [int]
908
+ # @return [bool]
909
+ [:rlCheckRenderBatchLimit, :rlCheckRenderBatchLimit, [:int], :bool],
910
+
911
+ # @!method rlSetTexture(id)
912
+ # rlSetTexture : Set current texture for render batch and check buffers limits
913
+ # @param id [unsigned int]
914
+ # @return [void]
915
+ [:rlSetTexture, :rlSetTexture, [:uint], :void],
916
+
917
+ # @!method rlLoadVertexArray()
918
+ # rlLoadVertexArray : Load vertex array (vao) if supported
919
+ # @return [unsigned int]
920
+ [:rlLoadVertexArray, :rlLoadVertexArray, [], :uint],
921
+
922
+ # @!method rlLoadVertexBuffer(buffer, size, dynamic)
923
+ # rlLoadVertexBuffer : Load a vertex buffer object
924
+ # @param buffer [const void *]
925
+ # @param size [int]
926
+ # @param dynamic [bool]
927
+ # @return [unsigned int]
928
+ [:rlLoadVertexBuffer, :rlLoadVertexBuffer, [:pointer, :int, :bool], :uint],
929
+
930
+ # @!method rlLoadVertexBufferElement(buffer, size, dynamic)
931
+ # rlLoadVertexBufferElement : Load vertex buffer elements object
932
+ # @param buffer [const void *]
933
+ # @param size [int]
934
+ # @param dynamic [bool]
935
+ # @return [unsigned int]
936
+ [:rlLoadVertexBufferElement, :rlLoadVertexBufferElement, [:pointer, :int, :bool], :uint],
937
+
938
+ # @!method rlUpdateVertexBuffer(bufferId, data, dataSize, offset)
939
+ # rlUpdateVertexBuffer : Update vertex buffer object data on GPU buffer
940
+ # @param bufferId [unsigned int]
941
+ # @param data [const void *]
942
+ # @param dataSize [int]
943
+ # @param offset [int]
944
+ # @return [void]
945
+ [:rlUpdateVertexBuffer, :rlUpdateVertexBuffer, [:uint, :pointer, :int, :int], :void],
946
+
947
+ # @!method rlUpdateVertexBufferElements(id, data, dataSize, offset)
948
+ # rlUpdateVertexBufferElements : Update vertex buffer elements data on GPU buffer
949
+ # @param id [unsigned int]
950
+ # @param data [const void *]
951
+ # @param dataSize [int]
952
+ # @param offset [int]
953
+ # @return [void]
954
+ [:rlUpdateVertexBufferElements, :rlUpdateVertexBufferElements, [:uint, :pointer, :int, :int], :void],
955
+
956
+ # @!method rlUnloadVertexArray(vaoId)
957
+ # rlUnloadVertexArray : Unload vertex array (vao)
958
+ # @param vaoId [unsigned int]
959
+ # @return [void]
960
+ [:rlUnloadVertexArray, :rlUnloadVertexArray, [:uint], :void],
961
+
962
+ # @!method rlUnloadVertexBuffer(vboId)
963
+ # rlUnloadVertexBuffer : Unload vertex buffer object
964
+ # @param vboId [unsigned int]
965
+ # @return [void]
966
+ [:rlUnloadVertexBuffer, :rlUnloadVertexBuffer, [:uint], :void],
967
+
968
+ # @!method rlSetVertexAttribute(index, compSize, type, normalized, stride, offset)
969
+ # rlSetVertexAttribute : Set vertex attribute data configuration
970
+ # @param index [unsigned int]
971
+ # @param compSize [int]
972
+ # @param type [int]
973
+ # @param normalized [bool]
974
+ # @param stride [int]
975
+ # @param offset [int]
976
+ # @return [void]
977
+ [:rlSetVertexAttribute, :rlSetVertexAttribute, [:uint, :int, :int, :bool, :int, :int], :void],
978
+
979
+ # @!method rlSetVertexAttributeDivisor(index, divisor)
980
+ # rlSetVertexAttributeDivisor : Set vertex attribute data divisor
981
+ # @param index [unsigned int]
982
+ # @param divisor [int]
983
+ # @return [void]
984
+ [:rlSetVertexAttributeDivisor, :rlSetVertexAttributeDivisor, [:uint, :int], :void],
985
+
986
+ # @!method rlSetVertexAttributeDefault(locIndex, value, attribType, count)
987
+ # rlSetVertexAttributeDefault : Set vertex attribute default value, when attribute to provided
988
+ # @param locIndex [int]
989
+ # @param value [const void *]
990
+ # @param attribType [int]
991
+ # @param count [int]
992
+ # @return [void]
993
+ [:rlSetVertexAttributeDefault, :rlSetVertexAttributeDefault, [:int, :pointer, :int, :int], :void],
994
+
995
+ # @!method rlDrawVertexArray(offset, count)
996
+ # rlDrawVertexArray : Draw vertex array (currently active vao)
997
+ # @param offset [int]
998
+ # @param count [int]
999
+ # @return [void]
1000
+ [:rlDrawVertexArray, :rlDrawVertexArray, [:int, :int], :void],
1001
+
1002
+ # @!method rlDrawVertexArrayElements(offset, count, buffer)
1003
+ # rlDrawVertexArrayElements : Draw vertex array elements
1004
+ # @param offset [int]
1005
+ # @param count [int]
1006
+ # @param buffer [const void *]
1007
+ # @return [void]
1008
+ [:rlDrawVertexArrayElements, :rlDrawVertexArrayElements, [:int, :int, :pointer], :void],
1009
+
1010
+ # @!method rlDrawVertexArrayInstanced(offset, count, instances)
1011
+ # rlDrawVertexArrayInstanced : Draw vertex array (currently active vao) with instancing
1012
+ # @param offset [int]
1013
+ # @param count [int]
1014
+ # @param instances [int]
1015
+ # @return [void]
1016
+ [:rlDrawVertexArrayInstanced, :rlDrawVertexArrayInstanced, [:int, :int, :int], :void],
1017
+
1018
+ # @!method rlDrawVertexArrayElementsInstanced(offset, count, buffer, instances)
1019
+ # rlDrawVertexArrayElementsInstanced : Draw vertex array elements with instancing
1020
+ # @param offset [int]
1021
+ # @param count [int]
1022
+ # @param buffer [const void *]
1023
+ # @param instances [int]
1024
+ # @return [void]
1025
+ [:rlDrawVertexArrayElementsInstanced, :rlDrawVertexArrayElementsInstanced, [:int, :int, :pointer, :int], :void],
1026
+
1027
+ # @!method rlLoadTexture(data, width, height, format, mipmapCount)
1028
+ # rlLoadTexture : Load texture data
1029
+ # @param data [const void *]
1030
+ # @param width [int]
1031
+ # @param height [int]
1032
+ # @param format [int]
1033
+ # @param mipmapCount [int]
1034
+ # @return [unsigned int]
1035
+ [:rlLoadTexture, :rlLoadTexture, [:pointer, :int, :int, :int, :int], :uint],
1036
+
1037
+ # @!method rlLoadTextureDepth(width, height, useRenderBuffer)
1038
+ # rlLoadTextureDepth : Load depth texture/renderbuffer (to be attached to fbo)
1039
+ # @param width [int]
1040
+ # @param height [int]
1041
+ # @param useRenderBuffer [bool]
1042
+ # @return [unsigned int]
1043
+ [:rlLoadTextureDepth, :rlLoadTextureDepth, [:int, :int, :bool], :uint],
1044
+
1045
+ # @!method rlLoadTextureCubemap(data, size, format, mipmapCount)
1046
+ # rlLoadTextureCubemap : Load texture cubemap data
1047
+ # @param data [const void *]
1048
+ # @param size [int]
1049
+ # @param format [int]
1050
+ # @param mipmapCount [int]
1051
+ # @return [unsigned int]
1052
+ [:rlLoadTextureCubemap, :rlLoadTextureCubemap, [:pointer, :int, :int, :int], :uint],
1053
+
1054
+ # @!method rlUpdateTexture(id, offsetX, offsetY, width, height, format, data)
1055
+ # rlUpdateTexture : Update texture with new data on GPU
1056
+ # @param id [unsigned int]
1057
+ # @param offsetX [int]
1058
+ # @param offsetY [int]
1059
+ # @param width [int]
1060
+ # @param height [int]
1061
+ # @param format [int]
1062
+ # @param data [const void *]
1063
+ # @return [void]
1064
+ [:rlUpdateTexture, :rlUpdateTexture, [:uint, :int, :int, :int, :int, :int, :pointer], :void],
1065
+
1066
+ # @!method rlGetGlTextureFormats(format, glInternalFormat, glFormat, glType)
1067
+ # rlGetGlTextureFormats : Get OpenGL internal formats
1068
+ # @param format [int]
1069
+ # @param glInternalFormat [unsigned int *]
1070
+ # @param glFormat [unsigned int *]
1071
+ # @param glType [unsigned int *]
1072
+ # @return [void]
1073
+ [:rlGetGlTextureFormats, :rlGetGlTextureFormats, [:int, :pointer, :pointer, :pointer], :void],
1074
+
1075
+ # @!method rlGetPixelFormatName(format)
1076
+ # rlGetPixelFormatName : Get name string for pixel format
1077
+ # @param format [unsigned int]
1078
+ # @return [const char *]
1079
+ [:rlGetPixelFormatName, :rlGetPixelFormatName, [:uint], :pointer],
1080
+
1081
+ # @!method rlUnloadTexture(id)
1082
+ # rlUnloadTexture : Unload texture from GPU memory
1083
+ # @param id [unsigned int]
1084
+ # @return [void]
1085
+ [:rlUnloadTexture, :rlUnloadTexture, [:uint], :void],
1086
+
1087
+ # @!method rlGenTextureMipmaps(id, width, height, format, mipmaps)
1088
+ # rlGenTextureMipmaps : Generate mipmap data for selected texture
1089
+ # @param id [unsigned int]
1090
+ # @param width [int]
1091
+ # @param height [int]
1092
+ # @param format [int]
1093
+ # @param mipmaps [int *]
1094
+ # @return [void]
1095
+ [:rlGenTextureMipmaps, :rlGenTextureMipmaps, [:uint, :int, :int, :int, :pointer], :void],
1096
+
1097
+ # @!method rlReadTexturePixels(id, width, height, format)
1098
+ # rlReadTexturePixels : Read texture pixel data
1099
+ # @param id [unsigned int]
1100
+ # @param width [int]
1101
+ # @param height [int]
1102
+ # @param format [int]
1103
+ # @return [void *]
1104
+ [:rlReadTexturePixels, :rlReadTexturePixels, [:uint, :int, :int, :int], :pointer],
1105
+
1106
+ # @!method rlReadScreenPixels(width, height)
1107
+ # rlReadScreenPixels : Read screen pixel data (color buffer)
1108
+ # @param width [int]
1109
+ # @param height [int]
1110
+ # @return [unsigned char *]
1111
+ [:rlReadScreenPixels, :rlReadScreenPixels, [:int, :int], :pointer],
1112
+
1113
+ # @!method rlLoadFramebuffer()
1114
+ # rlLoadFramebuffer : Load an empty framebuffer
1115
+ # @return [unsigned int]
1116
+ [:rlLoadFramebuffer, :rlLoadFramebuffer, [], :uint],
1117
+
1118
+ # @!method rlFramebufferAttach(fboId, texId, attachType, texType, mipLevel)
1119
+ # rlFramebufferAttach : Attach texture/renderbuffer to a framebuffer
1120
+ # @param fboId [unsigned int]
1121
+ # @param texId [unsigned int]
1122
+ # @param attachType [int]
1123
+ # @param texType [int]
1124
+ # @param mipLevel [int]
1125
+ # @return [void]
1126
+ [:rlFramebufferAttach, :rlFramebufferAttach, [:uint, :uint, :int, :int, :int], :void],
1127
+
1128
+ # @!method rlFramebufferComplete(id)
1129
+ # rlFramebufferComplete : Verify framebuffer is complete
1130
+ # @param id [unsigned int]
1131
+ # @return [bool]
1132
+ [:rlFramebufferComplete, :rlFramebufferComplete, [:uint], :bool],
1133
+
1134
+ # @!method rlUnloadFramebuffer(id)
1135
+ # rlUnloadFramebuffer : Delete framebuffer from GPU
1136
+ # @param id [unsigned int]
1137
+ # @return [void]
1138
+ [:rlUnloadFramebuffer, :rlUnloadFramebuffer, [:uint], :void],
1139
+
1140
+ # @!method rlLoadShaderCode(vsCode, fsCode)
1141
+ # rlLoadShaderCode : Load shader from code strings
1142
+ # @param vsCode [const char *]
1143
+ # @param fsCode [const char *]
1144
+ # @return [unsigned int]
1145
+ [:rlLoadShaderCode, :rlLoadShaderCode, [:pointer, :pointer], :uint],
1146
+
1147
+ # @!method rlCompileShader(shaderCode, type)
1148
+ # rlCompileShader : Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER)
1149
+ # @param shaderCode [const char *]
1150
+ # @param type [int]
1151
+ # @return [unsigned int]
1152
+ [:rlCompileShader, :rlCompileShader, [:pointer, :int], :uint],
1153
+
1154
+ # @!method rlLoadShaderProgram(vShaderId, fShaderId)
1155
+ # rlLoadShaderProgram : Load custom shader program
1156
+ # @param vShaderId [unsigned int]
1157
+ # @param fShaderId [unsigned int]
1158
+ # @return [unsigned int]
1159
+ [:rlLoadShaderProgram, :rlLoadShaderProgram, [:uint, :uint], :uint],
1160
+
1161
+ # @!method rlUnloadShaderProgram(id)
1162
+ # rlUnloadShaderProgram : Unload shader program
1163
+ # @param id [unsigned int]
1164
+ # @return [void]
1165
+ [:rlUnloadShaderProgram, :rlUnloadShaderProgram, [:uint], :void],
1166
+
1167
+ # @!method rlGetLocationUniform(shaderId, uniformName)
1168
+ # rlGetLocationUniform : Get shader location uniform
1169
+ # @param shaderId [unsigned int]
1170
+ # @param uniformName [const char *]
1171
+ # @return [int]
1172
+ [:rlGetLocationUniform, :rlGetLocationUniform, [:uint, :pointer], :int],
1173
+
1174
+ # @!method rlGetLocationAttrib(shaderId, attribName)
1175
+ # rlGetLocationAttrib : Get shader location attribute
1176
+ # @param shaderId [unsigned int]
1177
+ # @param attribName [const char *]
1178
+ # @return [int]
1179
+ [:rlGetLocationAttrib, :rlGetLocationAttrib, [:uint, :pointer], :int],
1180
+
1181
+ # @!method rlSetUniform(locIndex, value, uniformType, count)
1182
+ # rlSetUniform : Set shader value uniform
1183
+ # @param locIndex [int]
1184
+ # @param value [const void *]
1185
+ # @param uniformType [int]
1186
+ # @param count [int]
1187
+ # @return [void]
1188
+ [:rlSetUniform, :rlSetUniform, [:int, :pointer, :int, :int], :void],
1189
+
1190
+ # @!method rlSetUniformMatrix(locIndex, mat)
1191
+ # rlSetUniformMatrix : Set shader value matrix
1192
+ # @param locIndex [int]
1193
+ # @param mat [Matrix]
1194
+ # @return [void]
1195
+ [:rlSetUniformMatrix, :rlSetUniformMatrix, [:int, Matrix.by_value], :void],
1196
+
1197
+ # @!method rlSetUniformMatrices(locIndex, mat, count)
1198
+ # rlSetUniformMatrices : Set shader value matrices
1199
+ # @param locIndex [int]
1200
+ # @param mat [const Matrix *]
1201
+ # @param count [int]
1202
+ # @return [void]
1203
+ [:rlSetUniformMatrices, :rlSetUniformMatrices, [:int, :pointer, :int], :void],
1204
+
1205
+ # @!method rlSetUniformSampler(locIndex, textureId)
1206
+ # rlSetUniformSampler : Set shader value sampler
1207
+ # @param locIndex [int]
1208
+ # @param textureId [unsigned int]
1209
+ # @return [void]
1210
+ [:rlSetUniformSampler, :rlSetUniformSampler, [:int, :uint], :void],
1211
+
1212
+ # @!method rlSetShader(id, locs)
1213
+ # rlSetShader : Set shader currently active (id and locations)
1214
+ # @param id [unsigned int]
1215
+ # @param locs [int *]
1216
+ # @return [void]
1217
+ [:rlSetShader, :rlSetShader, [:uint, :pointer], :void],
1218
+
1219
+ # @!method rlLoadComputeShaderProgram(shaderId)
1220
+ # rlLoadComputeShaderProgram : Load compute shader program
1221
+ # @param shaderId [unsigned int]
1222
+ # @return [unsigned int]
1223
+ [:rlLoadComputeShaderProgram, :rlLoadComputeShaderProgram, [:uint], :uint],
1224
+
1225
+ # @!method rlComputeShaderDispatch(groupX, groupY, groupZ)
1226
+ # rlComputeShaderDispatch : Dispatch compute shader (equivalent to *draw* for graphics pipeline)
1227
+ # @param groupX [unsigned int]
1228
+ # @param groupY [unsigned int]
1229
+ # @param groupZ [unsigned int]
1230
+ # @return [void]
1231
+ [:rlComputeShaderDispatch, :rlComputeShaderDispatch, [:uint, :uint, :uint], :void],
1232
+
1233
+ # @!method rlLoadShaderBuffer(size, data, usageHint)
1234
+ # rlLoadShaderBuffer : Load shader storage buffer object (SSBO)
1235
+ # @param size [unsigned int]
1236
+ # @param data [const void *]
1237
+ # @param usageHint [int]
1238
+ # @return [unsigned int]
1239
+ [:rlLoadShaderBuffer, :rlLoadShaderBuffer, [:uint, :pointer, :int], :uint],
1240
+
1241
+ # @!method rlUnloadShaderBuffer(ssboId)
1242
+ # rlUnloadShaderBuffer : Unload shader storage buffer object (SSBO)
1243
+ # @param ssboId [unsigned int]
1244
+ # @return [void]
1245
+ [:rlUnloadShaderBuffer, :rlUnloadShaderBuffer, [:uint], :void],
1246
+
1247
+ # @!method rlUpdateShaderBuffer(id, data, dataSize, offset)
1248
+ # rlUpdateShaderBuffer : Update SSBO buffer data
1249
+ # @param id [unsigned int]
1250
+ # @param data [const void *]
1251
+ # @param dataSize [unsigned int]
1252
+ # @param offset [unsigned int]
1253
+ # @return [void]
1254
+ [:rlUpdateShaderBuffer, :rlUpdateShaderBuffer, [:uint, :pointer, :uint, :uint], :void],
1255
+
1256
+ # @!method rlBindShaderBuffer(id, index)
1257
+ # rlBindShaderBuffer : Bind SSBO buffer
1258
+ # @param id [unsigned int]
1259
+ # @param index [unsigned int]
1260
+ # @return [void]
1261
+ [:rlBindShaderBuffer, :rlBindShaderBuffer, [:uint, :uint], :void],
1262
+
1263
+ # @!method rlReadShaderBuffer(id, dest, count, offset)
1264
+ # rlReadShaderBuffer : Read SSBO buffer data (GPU->CPU)
1265
+ # @param id [unsigned int]
1266
+ # @param dest [void *]
1267
+ # @param count [unsigned int]
1268
+ # @param offset [unsigned int]
1269
+ # @return [void]
1270
+ [:rlReadShaderBuffer, :rlReadShaderBuffer, [:uint, :pointer, :uint, :uint], :void],
1271
+
1272
+ # @!method rlCopyShaderBuffer(destId, srcId, destOffset, srcOffset, count)
1273
+ # rlCopyShaderBuffer : Copy SSBO data between buffers
1274
+ # @param destId [unsigned int]
1275
+ # @param srcId [unsigned int]
1276
+ # @param destOffset [unsigned int]
1277
+ # @param srcOffset [unsigned int]
1278
+ # @param count [unsigned int]
1279
+ # @return [void]
1280
+ [:rlCopyShaderBuffer, :rlCopyShaderBuffer, [:uint, :uint, :uint, :uint, :uint], :void],
1281
+
1282
+ # @!method rlGetShaderBufferSize(id)
1283
+ # rlGetShaderBufferSize : Get SSBO buffer size
1284
+ # @param id [unsigned int]
1285
+ # @return [unsigned int]
1286
+ [:rlGetShaderBufferSize, :rlGetShaderBufferSize, [:uint], :uint],
1287
+
1288
+ # @!method rlBindImageTexture(id, index, format, readonly)
1289
+ # rlBindImageTexture : Bind image texture
1290
+ # @param id [unsigned int]
1291
+ # @param index [unsigned int]
1292
+ # @param format [int]
1293
+ # @param readonly [bool]
1294
+ # @return [void]
1295
+ [:rlBindImageTexture, :rlBindImageTexture, [:uint, :uint, :int, :bool], :void],
1296
+
1297
+ # @!method rlGetMatrixModelview()
1298
+ # rlGetMatrixModelview : Get internal modelview matrix
1299
+ # @return [Matrix]
1300
+ [:rlGetMatrixModelview, :rlGetMatrixModelview, [], Matrix.by_value],
1301
+
1302
+ # @!method rlGetMatrixProjection()
1303
+ # rlGetMatrixProjection : Get internal projection matrix
1304
+ # @return [Matrix]
1305
+ [:rlGetMatrixProjection, :rlGetMatrixProjection, [], Matrix.by_value],
1306
+
1307
+ # @!method rlGetMatrixTransform()
1308
+ # rlGetMatrixTransform : Get internal accumulated transform matrix
1309
+ # @return [Matrix]
1310
+ [:rlGetMatrixTransform, :rlGetMatrixTransform, [], Matrix.by_value],
1311
+
1312
+ # @!method rlGetMatrixProjectionStereo(eye)
1313
+ # rlGetMatrixProjectionStereo : Get internal projection matrix for stereo render (selected eye)
1314
+ # @param eye [int]
1315
+ # @return [Matrix]
1316
+ [:rlGetMatrixProjectionStereo, :rlGetMatrixProjectionStereo, [:int], Matrix.by_value],
1317
+
1318
+ # @!method rlGetMatrixViewOffsetStereo(eye)
1319
+ # rlGetMatrixViewOffsetStereo : Get internal view offset matrix for stereo render (selected eye)
1320
+ # @param eye [int]
1321
+ # @return [Matrix]
1322
+ [:rlGetMatrixViewOffsetStereo, :rlGetMatrixViewOffsetStereo, [:int], Matrix.by_value],
1323
+
1324
+ # @!method rlSetMatrixProjection(proj)
1325
+ # rlSetMatrixProjection : Set a custom projection matrix (replaces internal projection matrix)
1326
+ # @param proj [Matrix]
1327
+ # @return [void]
1328
+ [:rlSetMatrixProjection, :rlSetMatrixProjection, [Matrix.by_value], :void],
1329
+
1330
+ # @!method rlSetMatrixModelview(view)
1331
+ # rlSetMatrixModelview : Set a custom modelview matrix (replaces internal modelview matrix)
1332
+ # @param view [Matrix]
1333
+ # @return [void]
1334
+ [:rlSetMatrixModelview, :rlSetMatrixModelview, [Matrix.by_value], :void],
1335
+
1336
+ # @!method rlSetMatrixProjectionStereo(right, left)
1337
+ # rlSetMatrixProjectionStereo : Set eyes projection matrices for stereo rendering
1338
+ # @param right [Matrix]
1339
+ # @param left [Matrix]
1340
+ # @return [void]
1341
+ [:rlSetMatrixProjectionStereo, :rlSetMatrixProjectionStereo, [Matrix.by_value, Matrix.by_value], :void],
1342
+
1343
+ # @!method rlSetMatrixViewOffsetStereo(right, left)
1344
+ # rlSetMatrixViewOffsetStereo : Set eyes view offsets matrices for stereo rendering
1345
+ # @param right [Matrix]
1346
+ # @param left [Matrix]
1347
+ # @return [void]
1348
+ [:rlSetMatrixViewOffsetStereo, :rlSetMatrixViewOffsetStereo, [Matrix.by_value, Matrix.by_value], :void],
1349
+
1350
+ # @!method rlLoadDrawCube()
1351
+ # rlLoadDrawCube : Load and draw a cube
1352
+ # @return [void]
1353
+ [:rlLoadDrawCube, :rlLoadDrawCube, [], :void],
1354
+
1355
+ # @!method rlLoadDrawQuad()
1356
+ # rlLoadDrawQuad : Load and draw a quad
1357
+ # @return [void]
1358
+ [:rlLoadDrawQuad, :rlLoadDrawQuad, [], :void],
1359
+ ]
1360
+ entries.each do |entry|
1361
+ api_name = if method_naming == :snake_case
1362
+ snake_case_name = entry[0].to_s.gsub(/([A-Z]+)([A-Z0-9][a-z])/, '\1_\2').gsub(/([a-z\d])([A-Z0-9])/, '\1_\2').downcase
1363
+ snake_case_name.gsub!('vector_3', 'vector3_') if snake_case_name.include?('vector_3')
1364
+ snake_case_name.gsub!('vector_2', 'vector2_') if snake_case_name.include?('vector_2')
1365
+ snake_case_name.chop! if snake_case_name.end_with?('_')
1366
+ snake_case_name.to_sym
1367
+ else
1368
+ entry[0]
1369
+ end
1370
+ attach_function api_name, entry[1], entry[2], entry[3]
1371
+ rescue FFI::NotFoundError => e
1372
+ warn "[Warning] Failed to import #{entry[0]} (#{e})."
1373
+ end
1374
+ end
1375
+ end