raylib-bindings 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/raylib_main.rb CHANGED
@@ -22,359 +22,359 @@ module Raylib
22
22
 
23
23
  # enum ConfigFlags
24
24
  # System/Window config flags
25
- FLAG_VSYNC_HINT = 64 # Set to try enabling V-Sync on GPU
26
- FLAG_FULLSCREEN_MODE = 2 # Set to run program in fullscreen
27
- FLAG_WINDOW_RESIZABLE = 4 # Set to allow resizable window
28
- FLAG_WINDOW_UNDECORATED = 8 # Set to disable window decoration (frame and buttons)
29
- FLAG_WINDOW_HIDDEN = 128 # Set to hide window
30
- FLAG_WINDOW_MINIMIZED = 512 # Set to minimize window (iconify)
31
- FLAG_WINDOW_MAXIMIZED = 1024 # Set to maximize window (expanded to monitor)
32
- FLAG_WINDOW_UNFOCUSED = 2048 # Set to window non focused
33
- FLAG_WINDOW_TOPMOST = 4096 # Set to window always on top
34
- FLAG_WINDOW_ALWAYS_RUN = 256 # Set to allow windows running while minimized
35
- FLAG_WINDOW_TRANSPARENT = 16 # Set to allow transparent framebuffer
36
- FLAG_WINDOW_HIGHDPI = 8192 # Set to support HighDPI
25
+ FLAG_VSYNC_HINT = 64 # Set to try enabling V-Sync on GPU
26
+ FLAG_FULLSCREEN_MODE = 2 # Set to run program in fullscreen
27
+ FLAG_WINDOW_RESIZABLE = 4 # Set to allow resizable window
28
+ FLAG_WINDOW_UNDECORATED = 8 # Set to disable window decoration (frame and buttons)
29
+ FLAG_WINDOW_HIDDEN = 128 # Set to hide window
30
+ FLAG_WINDOW_MINIMIZED = 512 # Set to minimize window (iconify)
31
+ FLAG_WINDOW_MAXIMIZED = 1024 # Set to maximize window (expanded to monitor)
32
+ FLAG_WINDOW_UNFOCUSED = 2048 # Set to window non focused
33
+ FLAG_WINDOW_TOPMOST = 4096 # Set to window always on top
34
+ FLAG_WINDOW_ALWAYS_RUN = 256 # Set to allow windows running while minimized
35
+ FLAG_WINDOW_TRANSPARENT = 16 # Set to allow transparent framebuffer
36
+ FLAG_WINDOW_HIGHDPI = 8192 # Set to support HighDPI
37
37
  FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384 # Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED
38
- FLAG_MSAA_4X_HINT = 32 # Set to try enabling MSAA 4X
39
- FLAG_INTERLACED_HINT = 65536 # Set to try enabling interlaced video format (for V3D)
38
+ FLAG_MSAA_4X_HINT = 32 # Set to try enabling MSAA 4X
39
+ FLAG_INTERLACED_HINT = 65536 # Set to try enabling interlaced video format (for V3D)
40
40
 
41
41
  # enum TraceLogLevel
42
42
  # Trace log level
43
- LOG_ALL = 0 # Display all logs
44
- LOG_TRACE = 1 # Trace logging, intended for internal use only
45
- LOG_DEBUG = 2 # Debug logging, used for internal debugging, it should be disabled on release builds
46
- LOG_INFO = 3 # Info logging, used for program execution info
43
+ LOG_ALL = 0 # Display all logs
44
+ LOG_TRACE = 1 # Trace logging, intended for internal use only
45
+ LOG_DEBUG = 2 # Debug logging, used for internal debugging, it should be disabled on release builds
46
+ LOG_INFO = 3 # Info logging, used for program execution info
47
47
  LOG_WARNING = 4 # Warning logging, used on recoverable failures
48
- LOG_ERROR = 5 # Error logging, used on unrecoverable failures
49
- LOG_FATAL = 6 # Fatal logging, used to abort program: exit(EXIT_FAILURE)
50
- LOG_NONE = 7 # Disable logging
48
+ LOG_ERROR = 5 # Error logging, used on unrecoverable failures
49
+ LOG_FATAL = 6 # Fatal logging, used to abort program: exit(EXIT_FAILURE)
50
+ LOG_NONE = 7 # Disable logging
51
51
 
52
52
  # enum KeyboardKey
53
53
  # Keyboard keys (US keyboard layout)
54
- KEY_NULL = 0 # Key: NULL, used for no key pressed
55
- KEY_APOSTROPHE = 39 # Key: '
56
- KEY_COMMA = 44 # Key: ,
57
- KEY_MINUS = 45 # Key: -
58
- KEY_PERIOD = 46 # Key: .
59
- KEY_SLASH = 47 # Key: /
60
- KEY_ZERO = 48 # Key: 0
61
- KEY_ONE = 49 # Key: 1
62
- KEY_TWO = 50 # Key: 2
63
- KEY_THREE = 51 # Key: 3
64
- KEY_FOUR = 52 # Key: 4
65
- KEY_FIVE = 53 # Key: 5
66
- KEY_SIX = 54 # Key: 6
67
- KEY_SEVEN = 55 # Key: 7
68
- KEY_EIGHT = 56 # Key: 8
69
- KEY_NINE = 57 # Key: 9
70
- KEY_SEMICOLON = 59 # Key: ;
71
- KEY_EQUAL = 61 # Key: =
72
- KEY_A = 65 # Key: A | a
73
- KEY_B = 66 # Key: B | b
74
- KEY_C = 67 # Key: C | c
75
- KEY_D = 68 # Key: D | d
76
- KEY_E = 69 # Key: E | e
77
- KEY_F = 70 # Key: F | f
78
- KEY_G = 71 # Key: G | g
79
- KEY_H = 72 # Key: H | h
80
- KEY_I = 73 # Key: I | i
81
- KEY_J = 74 # Key: J | j
82
- KEY_K = 75 # Key: K | k
83
- KEY_L = 76 # Key: L | l
84
- KEY_M = 77 # Key: M | m
85
- KEY_N = 78 # Key: N | n
86
- KEY_O = 79 # Key: O | o
87
- KEY_P = 80 # Key: P | p
88
- KEY_Q = 81 # Key: Q | q
89
- KEY_R = 82 # Key: R | r
90
- KEY_S = 83 # Key: S | s
91
- KEY_T = 84 # Key: T | t
92
- KEY_U = 85 # Key: U | u
93
- KEY_V = 86 # Key: V | v
94
- KEY_W = 87 # Key: W | w
95
- KEY_X = 88 # Key: X | x
96
- KEY_Y = 89 # Key: Y | y
97
- KEY_Z = 90 # Key: Z | z
98
- KEY_LEFT_BRACKET = 91 # Key: [
99
- KEY_BACKSLASH = 92 # Key: '\'
100
- KEY_RIGHT_BRACKET = 93 # Key: ]
101
- KEY_GRAVE = 96 # Key: `
102
- KEY_SPACE = 32 # Key: Space
103
- KEY_ESCAPE = 256 # Key: Esc
104
- KEY_ENTER = 257 # Key: Enter
105
- KEY_TAB = 258 # Key: Tab
106
- KEY_BACKSPACE = 259 # Key: Backspace
107
- KEY_INSERT = 260 # Key: Ins
108
- KEY_DELETE = 261 # Key: Del
109
- KEY_RIGHT = 262 # Key: Cursor right
110
- KEY_LEFT = 263 # Key: Cursor left
111
- KEY_DOWN = 264 # Key: Cursor down
112
- KEY_UP = 265 # Key: Cursor up
113
- KEY_PAGE_UP = 266 # Key: Page up
114
- KEY_PAGE_DOWN = 267 # Key: Page down
115
- KEY_HOME = 268 # Key: Home
116
- KEY_END = 269 # Key: End
117
- KEY_CAPS_LOCK = 280 # Key: Caps lock
118
- KEY_SCROLL_LOCK = 281 # Key: Scroll down
119
- KEY_NUM_LOCK = 282 # Key: Num lock
120
- KEY_PRINT_SCREEN = 283 # Key: Print screen
121
- KEY_PAUSE = 284 # Key: Pause
122
- KEY_F1 = 290 # Key: F1
123
- KEY_F2 = 291 # Key: F2
124
- KEY_F3 = 292 # Key: F3
125
- KEY_F4 = 293 # Key: F4
126
- KEY_F5 = 294 # Key: F5
127
- KEY_F6 = 295 # Key: F6
128
- KEY_F7 = 296 # Key: F7
129
- KEY_F8 = 297 # Key: F8
130
- KEY_F9 = 298 # Key: F9
131
- KEY_F10 = 299 # Key: F10
132
- KEY_F11 = 300 # Key: F11
133
- KEY_F12 = 301 # Key: F12
134
- KEY_LEFT_SHIFT = 340 # Key: Shift left
135
- KEY_LEFT_CONTROL = 341 # Key: Control left
136
- KEY_LEFT_ALT = 342 # Key: Alt left
137
- KEY_LEFT_SUPER = 343 # Key: Super left
138
- KEY_RIGHT_SHIFT = 344 # Key: Shift right
54
+ KEY_NULL = 0 # Key: NULL, used for no key pressed
55
+ KEY_APOSTROPHE = 39 # Key: '
56
+ KEY_COMMA = 44 # Key: ,
57
+ KEY_MINUS = 45 # Key: -
58
+ KEY_PERIOD = 46 # Key: .
59
+ KEY_SLASH = 47 # Key: /
60
+ KEY_ZERO = 48 # Key: 0
61
+ KEY_ONE = 49 # Key: 1
62
+ KEY_TWO = 50 # Key: 2
63
+ KEY_THREE = 51 # Key: 3
64
+ KEY_FOUR = 52 # Key: 4
65
+ KEY_FIVE = 53 # Key: 5
66
+ KEY_SIX = 54 # Key: 6
67
+ KEY_SEVEN = 55 # Key: 7
68
+ KEY_EIGHT = 56 # Key: 8
69
+ KEY_NINE = 57 # Key: 9
70
+ KEY_SEMICOLON = 59 # Key: ;
71
+ KEY_EQUAL = 61 # Key: =
72
+ KEY_A = 65 # Key: A | a
73
+ KEY_B = 66 # Key: B | b
74
+ KEY_C = 67 # Key: C | c
75
+ KEY_D = 68 # Key: D | d
76
+ KEY_E = 69 # Key: E | e
77
+ KEY_F = 70 # Key: F | f
78
+ KEY_G = 71 # Key: G | g
79
+ KEY_H = 72 # Key: H | h
80
+ KEY_I = 73 # Key: I | i
81
+ KEY_J = 74 # Key: J | j
82
+ KEY_K = 75 # Key: K | k
83
+ KEY_L = 76 # Key: L | l
84
+ KEY_M = 77 # Key: M | m
85
+ KEY_N = 78 # Key: N | n
86
+ KEY_O = 79 # Key: O | o
87
+ KEY_P = 80 # Key: P | p
88
+ KEY_Q = 81 # Key: Q | q
89
+ KEY_R = 82 # Key: R | r
90
+ KEY_S = 83 # Key: S | s
91
+ KEY_T = 84 # Key: T | t
92
+ KEY_U = 85 # Key: U | u
93
+ KEY_V = 86 # Key: V | v
94
+ KEY_W = 87 # Key: W | w
95
+ KEY_X = 88 # Key: X | x
96
+ KEY_Y = 89 # Key: Y | y
97
+ KEY_Z = 90 # Key: Z | z
98
+ KEY_LEFT_BRACKET = 91 # Key: [
99
+ KEY_BACKSLASH = 92 # Key: '\'
100
+ KEY_RIGHT_BRACKET = 93 # Key: ]
101
+ KEY_GRAVE = 96 # Key: `
102
+ KEY_SPACE = 32 # Key: Space
103
+ KEY_ESCAPE = 256 # Key: Esc
104
+ KEY_ENTER = 257 # Key: Enter
105
+ KEY_TAB = 258 # Key: Tab
106
+ KEY_BACKSPACE = 259 # Key: Backspace
107
+ KEY_INSERT = 260 # Key: Ins
108
+ KEY_DELETE = 261 # Key: Del
109
+ KEY_RIGHT = 262 # Key: Cursor right
110
+ KEY_LEFT = 263 # Key: Cursor left
111
+ KEY_DOWN = 264 # Key: Cursor down
112
+ KEY_UP = 265 # Key: Cursor up
113
+ KEY_PAGE_UP = 266 # Key: Page up
114
+ KEY_PAGE_DOWN = 267 # Key: Page down
115
+ KEY_HOME = 268 # Key: Home
116
+ KEY_END = 269 # Key: End
117
+ KEY_CAPS_LOCK = 280 # Key: Caps lock
118
+ KEY_SCROLL_LOCK = 281 # Key: Scroll down
119
+ KEY_NUM_LOCK = 282 # Key: Num lock
120
+ KEY_PRINT_SCREEN = 283 # Key: Print screen
121
+ KEY_PAUSE = 284 # Key: Pause
122
+ KEY_F1 = 290 # Key: F1
123
+ KEY_F2 = 291 # Key: F2
124
+ KEY_F3 = 292 # Key: F3
125
+ KEY_F4 = 293 # Key: F4
126
+ KEY_F5 = 294 # Key: F5
127
+ KEY_F6 = 295 # Key: F6
128
+ KEY_F7 = 296 # Key: F7
129
+ KEY_F8 = 297 # Key: F8
130
+ KEY_F9 = 298 # Key: F9
131
+ KEY_F10 = 299 # Key: F10
132
+ KEY_F11 = 300 # Key: F11
133
+ KEY_F12 = 301 # Key: F12
134
+ KEY_LEFT_SHIFT = 340 # Key: Shift left
135
+ KEY_LEFT_CONTROL = 341 # Key: Control left
136
+ KEY_LEFT_ALT = 342 # Key: Alt left
137
+ KEY_LEFT_SUPER = 343 # Key: Super left
138
+ KEY_RIGHT_SHIFT = 344 # Key: Shift right
139
139
  KEY_RIGHT_CONTROL = 345 # Key: Control right
140
- KEY_RIGHT_ALT = 346 # Key: Alt right
141
- KEY_RIGHT_SUPER = 347 # Key: Super right
142
- KEY_KB_MENU = 348 # Key: KB menu
143
- KEY_KP_0 = 320 # Key: Keypad 0
144
- KEY_KP_1 = 321 # Key: Keypad 1
145
- KEY_KP_2 = 322 # Key: Keypad 2
146
- KEY_KP_3 = 323 # Key: Keypad 3
147
- KEY_KP_4 = 324 # Key: Keypad 4
148
- KEY_KP_5 = 325 # Key: Keypad 5
149
- KEY_KP_6 = 326 # Key: Keypad 6
150
- KEY_KP_7 = 327 # Key: Keypad 7
151
- KEY_KP_8 = 328 # Key: Keypad 8
152
- KEY_KP_9 = 329 # Key: Keypad 9
153
- KEY_KP_DECIMAL = 330 # Key: Keypad .
154
- KEY_KP_DIVIDE = 331 # Key: Keypad /
155
- KEY_KP_MULTIPLY = 332 # Key: Keypad *
156
- KEY_KP_SUBTRACT = 333 # Key: Keypad -
157
- KEY_KP_ADD = 334 # Key: Keypad +
158
- KEY_KP_ENTER = 335 # Key: Keypad Enter
159
- KEY_KP_EQUAL = 336 # Key: Keypad =
160
- KEY_BACK = 4 # Key: Android back button
161
- KEY_MENU = 82 # Key: Android menu button
162
- KEY_VOLUME_UP = 24 # Key: Android volume up button
163
- KEY_VOLUME_DOWN = 25 # Key: Android volume down button
140
+ KEY_RIGHT_ALT = 346 # Key: Alt right
141
+ KEY_RIGHT_SUPER = 347 # Key: Super right
142
+ KEY_KB_MENU = 348 # Key: KB menu
143
+ KEY_KP_0 = 320 # Key: Keypad 0
144
+ KEY_KP_1 = 321 # Key: Keypad 1
145
+ KEY_KP_2 = 322 # Key: Keypad 2
146
+ KEY_KP_3 = 323 # Key: Keypad 3
147
+ KEY_KP_4 = 324 # Key: Keypad 4
148
+ KEY_KP_5 = 325 # Key: Keypad 5
149
+ KEY_KP_6 = 326 # Key: Keypad 6
150
+ KEY_KP_7 = 327 # Key: Keypad 7
151
+ KEY_KP_8 = 328 # Key: Keypad 8
152
+ KEY_KP_9 = 329 # Key: Keypad 9
153
+ KEY_KP_DECIMAL = 330 # Key: Keypad .
154
+ KEY_KP_DIVIDE = 331 # Key: Keypad /
155
+ KEY_KP_MULTIPLY = 332 # Key: Keypad *
156
+ KEY_KP_SUBTRACT = 333 # Key: Keypad -
157
+ KEY_KP_ADD = 334 # Key: Keypad +
158
+ KEY_KP_ENTER = 335 # Key: Keypad Enter
159
+ KEY_KP_EQUAL = 336 # Key: Keypad =
160
+ KEY_BACK = 4 # Key: Android back button
161
+ KEY_MENU = 82 # Key: Android menu button
162
+ KEY_VOLUME_UP = 24 # Key: Android volume up button
163
+ KEY_VOLUME_DOWN = 25 # Key: Android volume down button
164
164
 
165
165
  # enum MouseButton
166
166
  # Mouse buttons
167
- MOUSE_BUTTON_LEFT = 0 # Mouse button left
168
- MOUSE_BUTTON_RIGHT = 1 # Mouse button right
169
- MOUSE_BUTTON_MIDDLE = 2 # Mouse button middle (pressed wheel)
170
- MOUSE_BUTTON_SIDE = 3 # Mouse button side (advanced mouse device)
171
- MOUSE_BUTTON_EXTRA = 4 # Mouse button extra (advanced mouse device)
167
+ MOUSE_BUTTON_LEFT = 0 # Mouse button left
168
+ MOUSE_BUTTON_RIGHT = 1 # Mouse button right
169
+ MOUSE_BUTTON_MIDDLE = 2 # Mouse button middle (pressed wheel)
170
+ MOUSE_BUTTON_SIDE = 3 # Mouse button side (advanced mouse device)
171
+ MOUSE_BUTTON_EXTRA = 4 # Mouse button extra (advanced mouse device)
172
172
  MOUSE_BUTTON_FORWARD = 5 # Mouse button forward (advanced mouse device)
173
- MOUSE_BUTTON_BACK = 6 # Mouse button back (advanced mouse device)
173
+ MOUSE_BUTTON_BACK = 6 # Mouse button back (advanced mouse device)
174
174
 
175
175
  # enum MouseCursor
176
176
  # Mouse cursor
177
- MOUSE_CURSOR_DEFAULT = 0 # Default pointer shape
178
- MOUSE_CURSOR_ARROW = 1 # Arrow shape
179
- MOUSE_CURSOR_IBEAM = 2 # Text writing cursor shape
180
- MOUSE_CURSOR_CROSSHAIR = 3 # Cross shape
177
+ MOUSE_CURSOR_DEFAULT = 0 # Default pointer shape
178
+ MOUSE_CURSOR_ARROW = 1 # Arrow shape
179
+ MOUSE_CURSOR_IBEAM = 2 # Text writing cursor shape
180
+ MOUSE_CURSOR_CROSSHAIR = 3 # Cross shape
181
181
  MOUSE_CURSOR_POINTING_HAND = 4 # Pointing hand cursor
182
- MOUSE_CURSOR_RESIZE_EW = 5 # Horizontal resize/move arrow shape
183
- MOUSE_CURSOR_RESIZE_NS = 6 # Vertical resize/move arrow shape
184
- MOUSE_CURSOR_RESIZE_NWSE = 7 # Top-left to bottom-right diagonal resize/move arrow shape
185
- MOUSE_CURSOR_RESIZE_NESW = 8 # The top-right to bottom-left diagonal resize/move arrow shape
186
- MOUSE_CURSOR_RESIZE_ALL = 9 # The omni-directional resize/move cursor shape
187
- MOUSE_CURSOR_NOT_ALLOWED = 10 # The operation-not-allowed shape
182
+ MOUSE_CURSOR_RESIZE_EW = 5 # Horizontal resize/move arrow shape
183
+ MOUSE_CURSOR_RESIZE_NS = 6 # Vertical resize/move arrow shape
184
+ MOUSE_CURSOR_RESIZE_NWSE = 7 # Top-left to bottom-right diagonal resize/move arrow shape
185
+ MOUSE_CURSOR_RESIZE_NESW = 8 # The top-right to bottom-left diagonal resize/move arrow shape
186
+ MOUSE_CURSOR_RESIZE_ALL = 9 # The omnidirectional resize/move cursor shape
187
+ MOUSE_CURSOR_NOT_ALLOWED = 10 # The operation-not-allowed shape
188
188
 
189
189
  # enum GamepadButton
190
190
  # Gamepad buttons
191
- GAMEPAD_BUTTON_UNKNOWN = 0 # Unknown button, just for error checking
192
- GAMEPAD_BUTTON_LEFT_FACE_UP = 1 # Gamepad left DPAD up button
193
- GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2 # Gamepad left DPAD right button
194
- GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3 # Gamepad left DPAD down button
195
- GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4 # Gamepad left DPAD left button
196
- GAMEPAD_BUTTON_RIGHT_FACE_UP = 5 # Gamepad right button up (i.e. PS3: Triangle, Xbox: Y)
191
+ GAMEPAD_BUTTON_UNKNOWN = 0 # Unknown button, just for error checking
192
+ GAMEPAD_BUTTON_LEFT_FACE_UP = 1 # Gamepad left DPAD up button
193
+ GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2 # Gamepad left DPAD right button
194
+ GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3 # Gamepad left DPAD down button
195
+ GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4 # Gamepad left DPAD left button
196
+ GAMEPAD_BUTTON_RIGHT_FACE_UP = 5 # Gamepad right button up (i.e. PS3: Triangle, Xbox: Y)
197
197
  GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6 # Gamepad right button right (i.e. PS3: Square, Xbox: X)
198
- GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7 # Gamepad right button down (i.e. PS3: Cross, Xbox: A)
199
- GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8 # Gamepad right button left (i.e. PS3: Circle, Xbox: B)
200
- GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9 # Gamepad top/back trigger left (first), it could be a trailing button
201
- GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10 # Gamepad top/back trigger left (second), it could be a trailing button
198
+ GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7 # Gamepad right button down (i.e. PS3: Cross, Xbox: A)
199
+ GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8 # Gamepad right button left (i.e. PS3: Circle, Xbox: B)
200
+ GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9 # Gamepad top/back trigger left (first), it could be a trailing button
201
+ GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10 # Gamepad top/back trigger left (second), it could be a trailing button
202
202
  GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11 # Gamepad top/back trigger right (one), it could be a trailing button
203
203
  GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12 # Gamepad top/back trigger right (second), it could be a trailing button
204
- GAMEPAD_BUTTON_MIDDLE_LEFT = 13 # Gamepad center buttons, left one (i.e. PS3: Select)
205
- GAMEPAD_BUTTON_MIDDLE = 14 # Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX)
206
- GAMEPAD_BUTTON_MIDDLE_RIGHT = 15 # Gamepad center buttons, right one (i.e. PS3: Start)
207
- GAMEPAD_BUTTON_LEFT_THUMB = 16 # Gamepad joystick pressed button left
208
- GAMEPAD_BUTTON_RIGHT_THUMB = 17 # Gamepad joystick pressed button right
204
+ GAMEPAD_BUTTON_MIDDLE_LEFT = 13 # Gamepad center buttons, left one (i.e. PS3: Select)
205
+ GAMEPAD_BUTTON_MIDDLE = 14 # Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX)
206
+ GAMEPAD_BUTTON_MIDDLE_RIGHT = 15 # Gamepad center buttons, right one (i.e. PS3: Start)
207
+ GAMEPAD_BUTTON_LEFT_THUMB = 16 # Gamepad joystick pressed button left
208
+ GAMEPAD_BUTTON_RIGHT_THUMB = 17 # Gamepad joystick pressed button right
209
209
 
210
210
  # enum GamepadAxis
211
211
  # Gamepad axis
212
- GAMEPAD_AXIS_LEFT_X = 0 # Gamepad left stick X axis
213
- GAMEPAD_AXIS_LEFT_Y = 1 # Gamepad left stick Y axis
214
- GAMEPAD_AXIS_RIGHT_X = 2 # Gamepad right stick X axis
215
- GAMEPAD_AXIS_RIGHT_Y = 3 # Gamepad right stick Y axis
216
- GAMEPAD_AXIS_LEFT_TRIGGER = 4 # Gamepad back trigger left, pressure level: [1..-1]
212
+ GAMEPAD_AXIS_LEFT_X = 0 # Gamepad left stick X axis
213
+ GAMEPAD_AXIS_LEFT_Y = 1 # Gamepad left stick Y axis
214
+ GAMEPAD_AXIS_RIGHT_X = 2 # Gamepad right stick X axis
215
+ GAMEPAD_AXIS_RIGHT_Y = 3 # Gamepad right stick Y axis
216
+ GAMEPAD_AXIS_LEFT_TRIGGER = 4 # Gamepad back trigger left, pressure level: [1..-1]
217
217
  GAMEPAD_AXIS_RIGHT_TRIGGER = 5 # Gamepad back trigger right, pressure level: [1..-1]
218
218
 
219
219
  # enum MaterialMapIndex
220
220
  # Material map index
221
- MATERIAL_MAP_ALBEDO = 0 # Albedo material (same as: MATERIAL_MAP_DIFFUSE)
222
- MATERIAL_MAP_METALNESS = 1 # Metalness material (same as: MATERIAL_MAP_SPECULAR)
223
- MATERIAL_MAP_NORMAL = 2 # Normal material
224
- MATERIAL_MAP_ROUGHNESS = 3 # Roughness material
225
- MATERIAL_MAP_OCCLUSION = 4 # Ambient occlusion material
226
- MATERIAL_MAP_EMISSION = 5 # Emission material
227
- MATERIAL_MAP_HEIGHT = 6 # Heightmap material
228
- MATERIAL_MAP_CUBEMAP = 7 # Cubemap material (NOTE: Uses GL_TEXTURE_CUBE_MAP)
221
+ MATERIAL_MAP_ALBEDO = 0 # Albedo material (same as: MATERIAL_MAP_DIFFUSE)
222
+ MATERIAL_MAP_METALNESS = 1 # Metalness material (same as: MATERIAL_MAP_SPECULAR)
223
+ MATERIAL_MAP_NORMAL = 2 # Normal material
224
+ MATERIAL_MAP_ROUGHNESS = 3 # Roughness material
225
+ MATERIAL_MAP_OCCLUSION = 4 # Ambient occlusion material
226
+ MATERIAL_MAP_EMISSION = 5 # Emission material
227
+ MATERIAL_MAP_HEIGHT = 6 # Heightmap material
228
+ MATERIAL_MAP_CUBEMAP = 7 # Cubemap material (NOTE: Uses GL_TEXTURE_CUBE_MAP)
229
229
  MATERIAL_MAP_IRRADIANCE = 8 # Irradiance material (NOTE: Uses GL_TEXTURE_CUBE_MAP)
230
- MATERIAL_MAP_PREFILTER = 9 # Prefilter material (NOTE: Uses GL_TEXTURE_CUBE_MAP)
231
- MATERIAL_MAP_BRDF = 10 # Brdf material
230
+ MATERIAL_MAP_PREFILTER = 9 # Prefilter material (NOTE: Uses GL_TEXTURE_CUBE_MAP)
231
+ MATERIAL_MAP_BRDF = 10 # Brdf material
232
232
 
233
233
  # enum ShaderLocationIndex
234
234
  # Shader location index
235
- SHADER_LOC_VERTEX_POSITION = 0 # Shader location: vertex attribute: position
235
+ SHADER_LOC_VERTEX_POSITION = 0 # Shader location: vertex attribute: position
236
236
  SHADER_LOC_VERTEX_TEXCOORD01 = 1 # Shader location: vertex attribute: texcoord01
237
237
  SHADER_LOC_VERTEX_TEXCOORD02 = 2 # Shader location: vertex attribute: texcoord02
238
- SHADER_LOC_VERTEX_NORMAL = 3 # Shader location: vertex attribute: normal
239
- SHADER_LOC_VERTEX_TANGENT = 4 # Shader location: vertex attribute: tangent
240
- SHADER_LOC_VERTEX_COLOR = 5 # Shader location: vertex attribute: color
241
- SHADER_LOC_MATRIX_MVP = 6 # Shader location: matrix uniform: model-view-projection
242
- SHADER_LOC_MATRIX_VIEW = 7 # Shader location: matrix uniform: view (camera transform)
238
+ SHADER_LOC_VERTEX_NORMAL = 3 # Shader location: vertex attribute: normal
239
+ SHADER_LOC_VERTEX_TANGENT = 4 # Shader location: vertex attribute: tangent
240
+ SHADER_LOC_VERTEX_COLOR = 5 # Shader location: vertex attribute: color
241
+ SHADER_LOC_MATRIX_MVP = 6 # Shader location: matrix uniform: model-view-projection
242
+ SHADER_LOC_MATRIX_VIEW = 7 # Shader location: matrix uniform: view (camera transform)
243
243
  SHADER_LOC_MATRIX_PROJECTION = 8 # Shader location: matrix uniform: projection
244
- SHADER_LOC_MATRIX_MODEL = 9 # Shader location: matrix uniform: model (transform)
245
- SHADER_LOC_MATRIX_NORMAL = 10 # Shader location: matrix uniform: normal
246
- SHADER_LOC_VECTOR_VIEW = 11 # Shader location: vector uniform: view
247
- SHADER_LOC_COLOR_DIFFUSE = 12 # Shader location: vector uniform: diffuse color
248
- SHADER_LOC_COLOR_SPECULAR = 13 # Shader location: vector uniform: specular color
249
- SHADER_LOC_COLOR_AMBIENT = 14 # Shader location: vector uniform: ambient color
250
- SHADER_LOC_MAP_ALBEDO = 15 # Shader location: sampler2d texture: albedo (same as: SHADER_LOC_MAP_DIFFUSE)
251
- SHADER_LOC_MAP_METALNESS = 16 # Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR)
252
- SHADER_LOC_MAP_NORMAL = 17 # Shader location: sampler2d texture: normal
253
- SHADER_LOC_MAP_ROUGHNESS = 18 # Shader location: sampler2d texture: roughness
254
- SHADER_LOC_MAP_OCCLUSION = 19 # Shader location: sampler2d texture: occlusion
255
- SHADER_LOC_MAP_EMISSION = 20 # Shader location: sampler2d texture: emission
256
- SHADER_LOC_MAP_HEIGHT = 21 # Shader location: sampler2d texture: height
257
- SHADER_LOC_MAP_CUBEMAP = 22 # Shader location: samplerCube texture: cubemap
258
- SHADER_LOC_MAP_IRRADIANCE = 23 # Shader location: samplerCube texture: irradiance
259
- SHADER_LOC_MAP_PREFILTER = 24 # Shader location: samplerCube texture: prefilter
260
- SHADER_LOC_MAP_BRDF = 25 # Shader location: sampler2d texture: brdf
244
+ SHADER_LOC_MATRIX_MODEL = 9 # Shader location: matrix uniform: model (transform)
245
+ SHADER_LOC_MATRIX_NORMAL = 10 # Shader location: matrix uniform: normal
246
+ SHADER_LOC_VECTOR_VIEW = 11 # Shader location: vector uniform: view
247
+ SHADER_LOC_COLOR_DIFFUSE = 12 # Shader location: vector uniform: diffuse color
248
+ SHADER_LOC_COLOR_SPECULAR = 13 # Shader location: vector uniform: specular color
249
+ SHADER_LOC_COLOR_AMBIENT = 14 # Shader location: vector uniform: ambient color
250
+ SHADER_LOC_MAP_ALBEDO = 15 # Shader location: sampler2d texture: albedo (same as: SHADER_LOC_MAP_DIFFUSE)
251
+ SHADER_LOC_MAP_METALNESS = 16 # Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR)
252
+ SHADER_LOC_MAP_NORMAL = 17 # Shader location: sampler2d texture: normal
253
+ SHADER_LOC_MAP_ROUGHNESS = 18 # Shader location: sampler2d texture: roughness
254
+ SHADER_LOC_MAP_OCCLUSION = 19 # Shader location: sampler2d texture: occlusion
255
+ SHADER_LOC_MAP_EMISSION = 20 # Shader location: sampler2d texture: emission
256
+ SHADER_LOC_MAP_HEIGHT = 21 # Shader location: sampler2d texture: height
257
+ SHADER_LOC_MAP_CUBEMAP = 22 # Shader location: samplerCube texture: cubemap
258
+ SHADER_LOC_MAP_IRRADIANCE = 23 # Shader location: samplerCube texture: irradiance
259
+ SHADER_LOC_MAP_PREFILTER = 24 # Shader location: samplerCube texture: prefilter
260
+ SHADER_LOC_MAP_BRDF = 25 # Shader location: sampler2d texture: brdf
261
261
 
262
262
  # enum ShaderUniformDataType
263
263
  # Shader uniform data type
264
- SHADER_UNIFORM_FLOAT = 0 # Shader uniform type: float
265
- SHADER_UNIFORM_VEC2 = 1 # Shader uniform type: vec2 (2 float)
266
- SHADER_UNIFORM_VEC3 = 2 # Shader uniform type: vec3 (3 float)
267
- SHADER_UNIFORM_VEC4 = 3 # Shader uniform type: vec4 (4 float)
268
- SHADER_UNIFORM_INT = 4 # Shader uniform type: int
269
- SHADER_UNIFORM_IVEC2 = 5 # Shader uniform type: ivec2 (2 int)
270
- SHADER_UNIFORM_IVEC3 = 6 # Shader uniform type: ivec3 (3 int)
271
- SHADER_UNIFORM_IVEC4 = 7 # Shader uniform type: ivec4 (4 int)
264
+ SHADER_UNIFORM_FLOAT = 0 # Shader uniform type: float
265
+ SHADER_UNIFORM_VEC2 = 1 # Shader uniform type: vec2 (2 float)
266
+ SHADER_UNIFORM_VEC3 = 2 # Shader uniform type: vec3 (3 float)
267
+ SHADER_UNIFORM_VEC4 = 3 # Shader uniform type: vec4 (4 float)
268
+ SHADER_UNIFORM_INT = 4 # Shader uniform type: int
269
+ SHADER_UNIFORM_IVEC2 = 5 # Shader uniform type: ivec2 (2 int)
270
+ SHADER_UNIFORM_IVEC3 = 6 # Shader uniform type: ivec3 (3 int)
271
+ SHADER_UNIFORM_IVEC4 = 7 # Shader uniform type: ivec4 (4 int)
272
272
  SHADER_UNIFORM_SAMPLER2D = 8 # Shader uniform type: sampler2d
273
273
 
274
274
  # enum ShaderAttributeDataType
275
275
  # Shader attribute data types
276
276
  SHADER_ATTRIB_FLOAT = 0 # Shader attribute type: float
277
- SHADER_ATTRIB_VEC2 = 1 # Shader attribute type: vec2 (2 float)
278
- SHADER_ATTRIB_VEC3 = 2 # Shader attribute type: vec3 (3 float)
279
- SHADER_ATTRIB_VEC4 = 3 # Shader attribute type: vec4 (4 float)
277
+ SHADER_ATTRIB_VEC2 = 1 # Shader attribute type: vec2 (2 float)
278
+ SHADER_ATTRIB_VEC3 = 2 # Shader attribute type: vec3 (3 float)
279
+ SHADER_ATTRIB_VEC4 = 3 # Shader attribute type: vec4 (4 float)
280
280
 
281
281
  # enum PixelFormat
282
282
  # Pixel formats
283
- PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1 # 8 bit per pixel (no alpha)
284
- PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2 # 8*2 bpp (2 channels)
285
- PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3 # 16 bpp
286
- PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4 # 24 bpp
287
- PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5 # 16 bpp (1 bit alpha)
288
- PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6 # 16 bpp (4 bit alpha)
289
- PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7 # 32 bpp
290
- PIXELFORMAT_UNCOMPRESSED_R32 = 8 # 32 bpp (1 channel - float)
291
- PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9 # 32*3 bpp (3 channels - float)
283
+ PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1 # 8 bit per pixel (no alpha)
284
+ PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2 # 8*2 bpp (2 channels)
285
+ PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3 # 16 bpp
286
+ PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4 # 24 bpp
287
+ PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5 # 16 bpp (1 bit alpha)
288
+ PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6 # 16 bpp (4 bit alpha)
289
+ PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7 # 32 bpp
290
+ PIXELFORMAT_UNCOMPRESSED_R32 = 8 # 32 bpp (1 channel - float)
291
+ PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9 # 32*3 bpp (3 channels - float)
292
292
  PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10 # 32*4 bpp (4 channels - float)
293
- PIXELFORMAT_COMPRESSED_DXT1_RGB = 11 # 4 bpp (no alpha)
294
- PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12 # 4 bpp (1 bit alpha)
295
- PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13 # 8 bpp
296
- PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14 # 8 bpp
297
- PIXELFORMAT_COMPRESSED_ETC1_RGB = 15 # 4 bpp
298
- PIXELFORMAT_COMPRESSED_ETC2_RGB = 16 # 4 bpp
299
- PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17 # 8 bpp
300
- PIXELFORMAT_COMPRESSED_PVRT_RGB = 18 # 4 bpp
301
- PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19 # 4 bpp
302
- PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20 # 8 bpp
303
- PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21 # 2 bpp
293
+ PIXELFORMAT_COMPRESSED_DXT1_RGB = 11 # 4 bpp (no alpha)
294
+ PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12 # 4 bpp (1 bit alpha)
295
+ PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13 # 8 bpp
296
+ PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14 # 8 bpp
297
+ PIXELFORMAT_COMPRESSED_ETC1_RGB = 15 # 4 bpp
298
+ PIXELFORMAT_COMPRESSED_ETC2_RGB = 16 # 4 bpp
299
+ PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17 # 8 bpp
300
+ PIXELFORMAT_COMPRESSED_PVRT_RGB = 18 # 4 bpp
301
+ PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19 # 4 bpp
302
+ PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20 # 8 bpp
303
+ PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21 # 2 bpp
304
304
 
305
305
  # enum TextureFilter
306
306
  # Texture parameters: filter mode
307
- TEXTURE_FILTER_POINT = 0 # No filter, just pixel approximation
308
- TEXTURE_FILTER_BILINEAR = 1 # Linear filtering
309
- TEXTURE_FILTER_TRILINEAR = 2 # Trilinear filtering (linear with mipmaps)
310
- TEXTURE_FILTER_ANISOTROPIC_4X = 3 # Anisotropic filtering 4x
311
- TEXTURE_FILTER_ANISOTROPIC_8X = 4 # Anisotropic filtering 8x
307
+ TEXTURE_FILTER_POINT = 0 # No filter, just pixel approximation
308
+ TEXTURE_FILTER_BILINEAR = 1 # Linear filtering
309
+ TEXTURE_FILTER_TRILINEAR = 2 # Trilinear filtering (linear with mipmaps)
310
+ TEXTURE_FILTER_ANISOTROPIC_4X = 3 # Anisotropic filtering 4x
311
+ TEXTURE_FILTER_ANISOTROPIC_8X = 4 # Anisotropic filtering 8x
312
312
  TEXTURE_FILTER_ANISOTROPIC_16X = 5 # Anisotropic filtering 16x
313
313
 
314
314
  # enum TextureWrap
315
315
  # Texture parameters: wrap mode
316
- TEXTURE_WRAP_REPEAT = 0 # Repeats texture in tiled mode
317
- TEXTURE_WRAP_CLAMP = 1 # Clamps texture to edge pixel in tiled mode
316
+ TEXTURE_WRAP_REPEAT = 0 # Repeats texture in tiled mode
317
+ TEXTURE_WRAP_CLAMP = 1 # Clamps texture to edge pixel in tiled mode
318
318
  TEXTURE_WRAP_MIRROR_REPEAT = 2 # Mirrors and repeats the texture in tiled mode
319
- TEXTURE_WRAP_MIRROR_CLAMP = 3 # Mirrors and clamps to border the texture in tiled mode
319
+ TEXTURE_WRAP_MIRROR_CLAMP = 3 # Mirrors and clamps to border the texture in tiled mode
320
320
 
321
321
  # enum CubemapLayout
322
322
  # Cubemap layouts
323
- CUBEMAP_LAYOUT_AUTO_DETECT = 0 # Automatically detect layout type
324
- CUBEMAP_LAYOUT_LINE_VERTICAL = 1 # Layout is defined by a vertical line with faces
325
- CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2 # Layout is defined by an horizontal line with faces
323
+ CUBEMAP_LAYOUT_AUTO_DETECT = 0 # Automatically detect layout type
324
+ CUBEMAP_LAYOUT_LINE_VERTICAL = 1 # Layout is defined by a vertical line with faces
325
+ CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2 # Layout is defined by a horizontal line with faces
326
326
  CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3 # Layout is defined by a 3x4 cross with cubemap faces
327
327
  CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4 # Layout is defined by a 4x3 cross with cubemap faces
328
- CUBEMAP_LAYOUT_PANORAMA = 5 # Layout is defined by a panorama image (equirectangular map)
328
+ CUBEMAP_LAYOUT_PANORAMA = 5 # Layout is defined by a panorama image (equirrectangular map)
329
329
 
330
330
  # enum FontType
331
331
  # Font type, defines generation method
332
332
  FONT_DEFAULT = 0 # Default font generation, anti-aliased
333
- FONT_BITMAP = 1 # Bitmap font generation, no anti-aliasing
334
- FONT_SDF = 2 # SDF font generation, requires external shader
333
+ FONT_BITMAP = 1 # Bitmap font generation, no anti-aliasing
334
+ FONT_SDF = 2 # SDF font generation, requires external shader
335
335
 
336
336
  # enum BlendMode
337
337
  # Color blending modes (pre-defined)
338
- BLEND_ALPHA = 0 # Blend textures considering alpha (default)
339
- BLEND_ADDITIVE = 1 # Blend textures adding colors
340
- BLEND_MULTIPLIED = 2 # Blend textures multiplying colors
341
- BLEND_ADD_COLORS = 3 # Blend textures adding colors (alternative)
342
- BLEND_SUBTRACT_COLORS = 4 # Blend textures subtracting colors (alternative)
338
+ BLEND_ALPHA = 0 # Blend textures considering alpha (default)
339
+ BLEND_ADDITIVE = 1 # Blend textures adding colors
340
+ BLEND_MULTIPLIED = 2 # Blend textures multiplying colors
341
+ BLEND_ADD_COLORS = 3 # Blend textures adding colors (alternative)
342
+ BLEND_SUBTRACT_COLORS = 4 # Blend textures subtracting colors (alternative)
343
343
  BLEND_ALPHA_PREMULTIPLY = 5 # Blend premultiplied textures considering alpha
344
- BLEND_CUSTOM = 6 # Blend textures using custom src/dst factors (use rlSetBlendFactors())
345
- BLEND_CUSTOM_SEPARATE = 7 # Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate())
344
+ BLEND_CUSTOM = 6 # Blend textures using custom src/dst factors (use rlSetBlendFactors())
345
+ BLEND_CUSTOM_SEPARATE = 7 # Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate())
346
346
 
347
347
  # enum Gesture
348
348
  # Gesture
349
- GESTURE_NONE = 0 # No gesture
350
- GESTURE_TAP = 1 # Tap gesture
351
- GESTURE_DOUBLETAP = 2 # Double tap gesture
352
- GESTURE_HOLD = 4 # Hold gesture
353
- GESTURE_DRAG = 8 # Drag gesture
349
+ GESTURE_NONE = 0 # No gesture
350
+ GESTURE_TAP = 1 # Tap gesture
351
+ GESTURE_DOUBLETAP = 2 # Double tap gesture
352
+ GESTURE_HOLD = 4 # Hold gesture
353
+ GESTURE_DRAG = 8 # Drag gesture
354
354
  GESTURE_SWIPE_RIGHT = 16 # Swipe right gesture
355
- GESTURE_SWIPE_LEFT = 32 # Swipe left gesture
356
- GESTURE_SWIPE_UP = 64 # Swipe up gesture
355
+ GESTURE_SWIPE_LEFT = 32 # Swipe left gesture
356
+ GESTURE_SWIPE_UP = 64 # Swipe up gesture
357
357
  GESTURE_SWIPE_DOWN = 128 # Swipe down gesture
358
- GESTURE_PINCH_IN = 256 # Pinch in gesture
359
- GESTURE_PINCH_OUT = 512 # Pinch out gesture
358
+ GESTURE_PINCH_IN = 256 # Pinch in gesture
359
+ GESTURE_PINCH_OUT = 512 # Pinch out gesture
360
360
 
361
361
  # enum CameraMode
362
362
  # Camera system modes
363
- CAMERA_CUSTOM = 0 # Custom camera
364
- CAMERA_FREE = 1 # Free camera
365
- CAMERA_ORBITAL = 2 # Orbital camera
363
+ CAMERA_CUSTOM = 0 # Custom camera
364
+ CAMERA_FREE = 1 # Free camera
365
+ CAMERA_ORBITAL = 2 # Orbital camera
366
366
  CAMERA_FIRST_PERSON = 3 # First person camera
367
367
  CAMERA_THIRD_PERSON = 4 # Third person camera
368
368
 
369
369
  # enum CameraProjection
370
370
  # Camera projection
371
- CAMERA_PERSPECTIVE = 0 # Perspective projection
371
+ CAMERA_PERSPECTIVE = 0 # Perspective projection
372
372
  CAMERA_ORTHOGRAPHIC = 1 # Orthographic projection
373
373
 
374
374
  # enum NPatchLayout
375
375
  # N-patch layout
376
- NPATCH_NINE_PATCH = 0 # Npatch layout: 3x3 tiles
377
- NPATCH_THREE_PATCH_VERTICAL = 1 # Npatch layout: 1x3 tiles
376
+ NPATCH_NINE_PATCH = 0 # Npatch layout: 3x3 tiles
377
+ NPATCH_THREE_PATCH_VERTICAL = 1 # Npatch layout: 1x3 tiles
378
378
  NPATCH_THREE_PATCH_HORIZONTAL = 2 # Npatch layout: 3x1 tiles
379
379
 
380
380
 
@@ -416,6 +416,10 @@ module Raylib
416
416
  :x, :float, # Vector x component
417
417
  :y, :float, # Vector y component
418
418
  )
419
+ def x = self[:x]
420
+ def x=(v) self[:x] = v end
421
+ def y = self[:y]
422
+ def y=(v) self[:y] = v end
419
423
  end
420
424
 
421
425
  # Vector3, 3 components
@@ -425,6 +429,12 @@ module Raylib
425
429
  :y, :float, # Vector y component
426
430
  :z, :float, # Vector z component
427
431
  )
432
+ def x = self[:x]
433
+ def x=(v) self[:x] = v end
434
+ def y = self[:y]
435
+ def y=(v) self[:y] = v end
436
+ def z = self[:z]
437
+ def z=(v) self[:z] = v end
428
438
  end
429
439
 
430
440
  # Vector4, 4 components
@@ -435,30 +445,70 @@ module Raylib
435
445
  :z, :float, # Vector z component
436
446
  :w, :float, # Vector w component
437
447
  )
448
+ def x = self[:x]
449
+ def x=(v) self[:x] = v end
450
+ def y = self[:y]
451
+ def y=(v) self[:y] = v end
452
+ def z = self[:z]
453
+ def z=(v) self[:z] = v end
454
+ def w = self[:w]
455
+ def w=(v) self[:w] = v end
438
456
  end
439
457
 
440
458
  Quaternion = Vector4
441
459
 
442
- # Matrix, 4x4 components, column major, OpenGL style, right handed
460
+ # Matrix, 4x4 components, column major, OpenGL style, right-handed
443
461
  class Matrix < FFI::Struct
444
462
  layout(
445
- :m0, :float, # Matrix first row (4 components)
446
- :m4, :float, # Matrix first row (4 components)
447
- :m8, :float, # Matrix first row (4 components)
463
+ :m0, :float, # Matrix first row (4 components)
464
+ :m4, :float, # Matrix first row (4 components)
465
+ :m8, :float, # Matrix first row (4 components)
448
466
  :m12, :float, # Matrix first row (4 components)
449
- :m1, :float, # Matrix second row (4 components)
450
- :m5, :float, # Matrix second row (4 components)
451
- :m9, :float, # Matrix second row (4 components)
467
+ :m1, :float, # Matrix second row (4 components)
468
+ :m5, :float, # Matrix second row (4 components)
469
+ :m9, :float, # Matrix second row (4 components)
452
470
  :m13, :float, # Matrix second row (4 components)
453
- :m2, :float, # Matrix third row (4 components)
454
- :m6, :float, # Matrix third row (4 components)
471
+ :m2, :float, # Matrix third row (4 components)
472
+ :m6, :float, # Matrix third row (4 components)
455
473
  :m10, :float, # Matrix third row (4 components)
456
474
  :m14, :float, # Matrix third row (4 components)
457
- :m3, :float, # Matrix fourth row (4 components)
458
- :m7, :float, # Matrix fourth row (4 components)
475
+ :m3, :float, # Matrix fourth row (4 components)
476
+ :m7, :float, # Matrix fourth row (4 components)
459
477
  :m11, :float, # Matrix fourth row (4 components)
460
478
  :m15, :float, # Matrix fourth row (4 components)
461
479
  )
480
+ def m0 = self[:m0]
481
+ def m0=(v) self[:m0] = v end
482
+ def m4 = self[:m4]
483
+ def m4=(v) self[:m4] = v end
484
+ def m8 = self[:m8]
485
+ def m8=(v) self[:m8] = v end
486
+ def m12 = self[:m12]
487
+ def m12=(v) self[:m12] = v end
488
+ def m1 = self[:m1]
489
+ def m1=(v) self[:m1] = v end
490
+ def m5 = self[:m5]
491
+ def m5=(v) self[:m5] = v end
492
+ def m9 = self[:m9]
493
+ def m9=(v) self[:m9] = v end
494
+ def m13 = self[:m13]
495
+ def m13=(v) self[:m13] = v end
496
+ def m2 = self[:m2]
497
+ def m2=(v) self[:m2] = v end
498
+ def m6 = self[:m6]
499
+ def m6=(v) self[:m6] = v end
500
+ def m10 = self[:m10]
501
+ def m10=(v) self[:m10] = v end
502
+ def m14 = self[:m14]
503
+ def m14=(v) self[:m14] = v end
504
+ def m3 = self[:m3]
505
+ def m3=(v) self[:m3] = v end
506
+ def m7 = self[:m7]
507
+ def m7=(v) self[:m7] = v end
508
+ def m11 = self[:m11]
509
+ def m11=(v) self[:m11] = v end
510
+ def m15 = self[:m15]
511
+ def m15=(v) self[:m15] = v end
462
512
  end
463
513
 
464
514
  # Color, 4 components, R8G8B8A8 (32bit)
@@ -469,38 +519,74 @@ module Raylib
469
519
  :b, :uchar, # Color blue value
470
520
  :a, :uchar, # Color alpha value
471
521
  )
522
+ def r = self[:r]
523
+ def r=(v) self[:r] = v end
524
+ def g = self[:g]
525
+ def g=(v) self[:g] = v end
526
+ def b = self[:b]
527
+ def b=(v) self[:b] = v end
528
+ def a = self[:a]
529
+ def a=(v) self[:a] = v end
472
530
  end
473
531
 
474
532
  # Rectangle, 4 components
475
533
  class Rectangle < FFI::Struct
476
534
  layout(
477
- :x, :float, # Rectangle top-left corner position x
478
- :y, :float, # Rectangle top-left corner position y
479
- :width, :float, # Rectangle width
535
+ :x, :float, # Rectangle top-left corner position x
536
+ :y, :float, # Rectangle top-left corner position y
537
+ :width, :float, # Rectangle width
480
538
  :height, :float, # Rectangle height
481
539
  )
540
+ def x = self[:x]
541
+ def x=(v) self[:x] = v end
542
+ def y = self[:y]
543
+ def y=(v) self[:y] = v end
544
+ def width = self[:width]
545
+ def width=(v) self[:width] = v end
546
+ def height = self[:height]
547
+ def height=(v) self[:height] = v end
482
548
  end
483
549
 
484
550
  # Image, pixel data stored in CPU memory (RAM)
485
551
  class Image < FFI::Struct
486
552
  layout(
487
553
  :data, :pointer, # Image raw data
488
- :width, :int, # Image base width
489
- :height, :int, # Image base height
490
- :mipmaps, :int, # Mipmap levels, 1 by default
491
- :format, :int, # Data format (PixelFormat type)
554
+ :width, :int, # Image base width
555
+ :height, :int, # Image base height
556
+ :mipmaps, :int, # Mipmap levels, 1 by default
557
+ :format, :int, # Data format (PixelFormat type)
492
558
  )
559
+ def data = self[:data]
560
+ def data=(v) self[:data] = v end
561
+ def width = self[:width]
562
+ def width=(v) self[:width] = v end
563
+ def height = self[:height]
564
+ def height=(v) self[:height] = v end
565
+ def mipmaps = self[:mipmaps]
566
+ def mipmaps=(v) self[:mipmaps] = v end
567
+ def format = self[:format]
568
+ def format=(v) self[:format] = v end
493
569
  end
494
570
 
495
571
  # Texture, tex data stored in GPU memory (VRAM)
496
572
  class Texture < FFI::Struct
497
573
  layout(
498
- :id, :uint, # OpenGL texture id
499
- :width, :int, # Texture base width
500
- :height, :int, # Texture base height
574
+ :id, :uint, # OpenGL texture id
575
+ :width, :int, # Texture base width
576
+ :height, :int, # Texture base height
501
577
  :mipmaps, :int, # Mipmap levels, 1 by default
502
- :format, :int, # Data format (PixelFormat type)
578
+ :format, :int, # Data format (PixelFormat type)
503
579
  )
580
+ def id = self[:id]
581
+ def id=(v) self[:id] = v end
582
+ def width = self[:width]
583
+ def width=(v) self[:width] = v end
584
+ def height = self[:height]
585
+ def height=(v) self[:height] = v end
586
+ def mipmaps = self[:mipmaps]
587
+ def mipmaps=(v) self[:mipmaps] = v end
588
+ def format = self[:format]
589
+ def format=(v) self[:format] = v end
504
590
  end
505
591
 
506
592
  Texture2D = Texture
@@ -509,10 +595,16 @@ module Raylib
509
595
  # RenderTexture, fbo for texture rendering
510
596
  class RenderTexture < FFI::Struct
511
597
  layout(
512
- :id, :uint, # OpenGL framebuffer object id
598
+ :id, :uint, # OpenGL framebuffer object id
513
599
  :texture, Texture, # Color buffer attachment texture
514
- :depth, Texture, # Depth buffer attachment texture
600
+ :depth, Texture, # Depth buffer attachment texture
515
601
  )
602
+ def id = self[:id]
603
+ def id=(v) self[:id] = v end
604
+ def texture = self[:texture]
605
+ def texture=(v) self[:texture] = v end
606
+ def depth = self[:depth]
607
+ def depth=(v) self[:depth] = v end
516
608
  end
517
609
 
518
610
  RenderTexture2D = RenderTexture
@@ -521,46 +613,90 @@ module Raylib
521
613
  class NPatchInfo < FFI::Struct
522
614
  layout(
523
615
  :source, Rectangle, # Texture source rectangle
524
- :left, :int, # Left border offset
525
- :top, :int, # Top border offset
526
- :right, :int, # Right border offset
527
- :bottom, :int, # Bottom border offset
528
- :layout, :int, # Layout of the n-patch: 3x3, 1x3 or 3x1
616
+ :left, :int, # Left border offset
617
+ :top, :int, # Top border offset
618
+ :right, :int, # Right border offset
619
+ :bottom, :int, # Bottom border offset
620
+ :layout, :int, # Layout of the n-patch: 3x3, 1x3 or 3x1
529
621
  )
622
+ def source = self[:source]
623
+ def source=(v) self[:source] = v end
624
+ def left = self[:left]
625
+ def left=(v) self[:left] = v end
626
+ def top = self[:top]
627
+ def top=(v) self[:top] = v end
628
+ def right = self[:right]
629
+ def right=(v) self[:right] = v end
630
+ def bottom = self[:bottom]
631
+ def bottom=(v) self[:bottom] = v end
632
+ def layout = self[:layout]
633
+ def layout=(v) self[:layout] = v end
530
634
  end
531
635
 
532
636
  # GlyphInfo, font characters glyphs info
533
637
  class GlyphInfo < FFI::Struct
534
638
  layout(
535
- :value, :int, # Character value (Unicode)
536
- :offsetX, :int, # Character offset X when drawing
537
- :offsetY, :int, # Character offset Y when drawing
639
+ :value, :int, # Character value (Unicode)
640
+ :offsetX, :int, # Character offset X when drawing
641
+ :offsetY, :int, # Character offset Y when drawing
538
642
  :advanceX, :int, # Character advance position X
539
- :image, Image, # Character image data
643
+ :image, Image, # Character image data
540
644
  )
645
+ def value = self[:value]
646
+ def value=(v) self[:value] = v end
647
+ def offsetX = self[:offsetX]
648
+ def offsetX=(v) self[:offsetX] = v end
649
+ def offsetY = self[:offsetY]
650
+ def offsetY=(v) self[:offsetY] = v end
651
+ def advanceX = self[:advanceX]
652
+ def advanceX=(v) self[:advanceX] = v end
653
+ def image = self[:image]
654
+ def image=(v) self[:image] = v end
541
655
  end
542
656
 
543
657
  # Font, font texture and GlyphInfo array data
544
658
  class Font < FFI::Struct
545
659
  layout(
546
- :baseSize, :int, # Base size (default chars height)
547
- :glyphCount, :int, # Number of glyph characters
660
+ :baseSize, :int, # Base size (default chars height)
661
+ :glyphCount, :int, # Number of glyph characters
548
662
  :glyphPadding, :int, # Padding around the glyph characters
549
663
  :texture, Texture2D, # Texture atlas containing the glyphs
550
- :recs, :pointer, # Rectangles in texture for the glyphs
551
- :glyphs, :pointer, # Glyphs info data
664
+ :recs, :pointer, # Rectangles in texture for the glyphs
665
+ :glyphs, :pointer, # Glyphs info data
552
666
  )
667
+ def baseSize = self[:baseSize]
668
+ def baseSize=(v) self[:baseSize] = v end
669
+ def glyphCount = self[:glyphCount]
670
+ def glyphCount=(v) self[:glyphCount] = v end
671
+ def glyphPadding = self[:glyphPadding]
672
+ def glyphPadding=(v) self[:glyphPadding] = v end
673
+ def texture = self[:texture]
674
+ def texture=(v) self[:texture] = v end
675
+ def recs = self[:recs]
676
+ def recs=(v) self[:recs] = v end
677
+ def glyphs = self[:glyphs]
678
+ def glyphs=(v) self[:glyphs] = v end
553
679
  end
554
680
 
555
681
  # Camera, defines position/orientation in 3d space
556
682
  class Camera3D < FFI::Struct
557
683
  layout(
558
684
  :position, Vector3, # Camera position
559
- :target, Vector3, # Camera target it looks-at
560
- :up, Vector3, # Camera up vector (rotation over its axis)
561
- :fovy, :float, # Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic
562
- :projection, :int, # Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
685
+ :target, Vector3, # Camera target it looks-at
686
+ :up, Vector3, # Camera up vector (rotation over its axis)
687
+ :fovy, :float, # Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic
688
+ :projection, :int, # Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
563
689
  )
690
+ def position = self[:position]
691
+ def position=(v) self[:position] = v end
692
+ def target = self[:target]
693
+ def target=(v) self[:target] = v end
694
+ def up = self[:up]
695
+ def up=(v) self[:up] = v end
696
+ def fovy = self[:fovy]
697
+ def fovy=(v) self[:fovy] = v end
698
+ def projection = self[:projection]
699
+ def projection=(v) self[:projection] = v end
564
700
  end
565
701
 
566
702
  Camera = Camera3D
@@ -568,58 +704,112 @@ module Raylib
568
704
  # Camera2D, defines position/orientation in 2d space
569
705
  class Camera2D < FFI::Struct
570
706
  layout(
571
- :offset, Vector2, # Camera offset (displacement from target)
572
- :target, Vector2, # Camera target (rotation and zoom origin)
707
+ :offset, Vector2, # Camera offset (displacement from target)
708
+ :target, Vector2, # Camera target (rotation and zoom origin)
573
709
  :rotation, :float, # Camera rotation in degrees
574
- :zoom, :float, # Camera zoom (scaling), should be 1.0f by default
710
+ :zoom, :float, # Camera zoom (scaling), should be 1.0f by default
575
711
  )
712
+ def offset = self[:offset]
713
+ def offset=(v) self[:offset] = v end
714
+ def target = self[:target]
715
+ def target=(v) self[:target] = v end
716
+ def rotation = self[:rotation]
717
+ def rotation=(v) self[:rotation] = v end
718
+ def zoom = self[:zoom]
719
+ def zoom=(v) self[:zoom] = v end
576
720
  end
577
721
 
578
722
  # Mesh, vertex data and vao/vbo
579
723
  class Mesh < FFI::Struct
580
724
  layout(
581
- :vertexCount, :int, # Number of vertices stored in arrays
582
- :triangleCount, :int, # Number of triangles stored (indexed or not)
583
- :vertices, :pointer, # Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
584
- :texcoords, :pointer, # Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
585
- :texcoords2, :pointer, # Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5)
586
- :normals, :pointer, # Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)
587
- :tangents, :pointer, # Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)
588
- :colors, :pointer, # Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
589
- :indices, :pointer, # Vertex indices (in case vertex data comes indexed)
725
+ :vertexCount, :int, # Number of vertices stored in arrays
726
+ :triangleCount, :int, # Number of triangles stored (indexed or not)
727
+ :vertices, :pointer, # Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
728
+ :texcoords, :pointer, # Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
729
+ :texcoords2, :pointer, # Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5)
730
+ :normals, :pointer, # Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)
731
+ :tangents, :pointer, # Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)
732
+ :colors, :pointer, # Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
733
+ :indices, :pointer, # Vertex indices (in case vertex data comes indexed)
590
734
  :animVertices, :pointer, # Animated vertex positions (after bones transformations)
591
- :animNormals, :pointer, # Animated normals (after bones transformations)
592
- :boneIds, :pointer, # Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning)
593
- :boneWeights, :pointer, # Vertex bone weight, up to 4 bones influence by vertex (skinning)
594
- :vaoId, :uint, # OpenGL Vertex Array Object id
595
- :vboId, :pointer, # OpenGL Vertex Buffer Objects id (default vertex data)
735
+ :animNormals, :pointer, # Animated normals (after bones transformations)
736
+ :boneIds, :pointer, # Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning)
737
+ :boneWeights, :pointer, # Vertex bone weight, up to 4 bones influence by vertex (skinning)
738
+ :vaoId, :uint, # OpenGL Vertex Array Object id
739
+ :vboId, :pointer, # OpenGL Vertex Buffer Objects id (default vertex data)
596
740
  )
741
+ def vertexCount = self[:vertexCount]
742
+ def vertexCount=(v) self[:vertexCount] = v end
743
+ def triangleCount = self[:triangleCount]
744
+ def triangleCount=(v) self[:triangleCount] = v end
745
+ def vertices = self[:vertices]
746
+ def vertices=(v) self[:vertices] = v end
747
+ def texcoords = self[:texcoords]
748
+ def texcoords=(v) self[:texcoords] = v end
749
+ def texcoords2 = self[:texcoords2]
750
+ def texcoords2=(v) self[:texcoords2] = v end
751
+ def normals = self[:normals]
752
+ def normals=(v) self[:normals] = v end
753
+ def tangents = self[:tangents]
754
+ def tangents=(v) self[:tangents] = v end
755
+ def colors = self[:colors]
756
+ def colors=(v) self[:colors] = v end
757
+ def indices = self[:indices]
758
+ def indices=(v) self[:indices] = v end
759
+ def animVertices = self[:animVertices]
760
+ def animVertices=(v) self[:animVertices] = v end
761
+ def animNormals = self[:animNormals]
762
+ def animNormals=(v) self[:animNormals] = v end
763
+ def boneIds = self[:boneIds]
764
+ def boneIds=(v) self[:boneIds] = v end
765
+ def boneWeights = self[:boneWeights]
766
+ def boneWeights=(v) self[:boneWeights] = v end
767
+ def vaoId = self[:vaoId]
768
+ def vaoId=(v) self[:vaoId] = v end
769
+ def vboId = self[:vboId]
770
+ def vboId=(v) self[:vboId] = v end
597
771
  end
598
772
 
599
773
  # Shader
600
774
  class Shader < FFI::Struct
601
775
  layout(
602
- :id, :uint, # Shader program id
776
+ :id, :uint, # Shader program id
603
777
  :locs, :pointer, # Shader locations array (RL_MAX_SHADER_LOCATIONS)
604
778
  )
779
+ def id = self[:id]
780
+ def id=(v) self[:id] = v end
781
+ def locs = self[:locs]
782
+ def locs=(v) self[:locs] = v end
605
783
  end
606
784
 
607
785
  # MaterialMap
608
786
  class MaterialMap < FFI::Struct
609
787
  layout(
610
788
  :texture, Texture2D, # Material map texture
611
- :color, Color, # Material map color
612
- :value, :float, # Material map value
789
+ :color, Color, # Material map color
790
+ :value, :float, # Material map value
613
791
  )
792
+ def texture = self[:texture]
793
+ def texture=(v) self[:texture] = v end
794
+ def color = self[:color]
795
+ def color=(v) self[:color] = v end
796
+ def value = self[:value]
797
+ def value=(v) self[:value] = v end
614
798
  end
615
799
 
616
800
  # Material, includes shader and maps
617
801
  class Material < FFI::Struct
618
802
  layout(
619
- :shader, Shader, # Material shader
620
- :maps, :pointer, # Material maps array (MAX_MATERIAL_MAPS)
803
+ :shader, Shader, # Material shader
804
+ :maps, :pointer, # Material maps array (MAX_MATERIAL_MAPS)
621
805
  :params, [:float, 4], # Material generic parameters (if required)
622
806
  )
807
+ def shader = self[:shader]
808
+ def shader=(v) self[:shader] = v end
809
+ def maps = self[:maps]
810
+ def maps=(v) self[:maps] = v end
811
+ def params = self[:params]
812
+ def params=(v) self[:params] = v end
623
813
  end
624
814
 
625
815
  # Transform, vertex transformation data
@@ -627,59 +817,107 @@ module Raylib
627
817
  layout(
628
818
  :translation, Vector3, # Translation
629
819
  :rotation, Quaternion, # Rotation
630
- :scale, Vector3, # Scale
820
+ :scale, Vector3, # Scale
631
821
  )
822
+ def translation = self[:translation]
823
+ def translation=(v) self[:translation] = v end
824
+ def rotation = self[:rotation]
825
+ def rotation=(v) self[:rotation] = v end
826
+ def scale = self[:scale]
827
+ def scale=(v) self[:scale] = v end
632
828
  end
633
829
 
634
830
  # Bone, skeletal animation bone
635
831
  class BoneInfo < FFI::Struct
636
832
  layout(
637
833
  :name, [:char, 32], # Bone name
638
- :parent, :int, # Bone parent
834
+ :parent, :int, # Bone parent
639
835
  )
836
+ def name = self[:name]
837
+ def name=(v) self[:name] = v end
838
+ def parent = self[:parent]
839
+ def parent=(v) self[:parent] = v end
640
840
  end
641
841
 
642
842
  # Model, meshes, materials and animation data
643
843
  class Model < FFI::Struct
644
844
  layout(
645
- :transform, Matrix, # Local transform matrix
646
- :meshCount, :int, # Number of meshes
647
- :materialCount, :int, # Number of materials
648
- :meshes, :pointer, # Meshes array
649
- :materials, :pointer, # Materials array
845
+ :transform, Matrix, # Local transform matrix
846
+ :meshCount, :int, # Number of meshes
847
+ :materialCount, :int, # Number of materials
848
+ :meshes, :pointer, # Meshes array
849
+ :materials, :pointer, # Materials array
650
850
  :meshMaterial, :pointer, # Mesh material number
651
- :boneCount, :int, # Number of bones
652
- :bones, :pointer, # Bones information (skeleton)
653
- :bindPose, :pointer, # Bones base transformation (pose)
851
+ :boneCount, :int, # Number of bones
852
+ :bones, :pointer, # Bones information (skeleton)
853
+ :bindPose, :pointer, # Bones base transformation (pose)
654
854
  )
855
+ def transform = self[:transform]
856
+ def transform=(v) self[:transform] = v end
857
+ def meshCount = self[:meshCount]
858
+ def meshCount=(v) self[:meshCount] = v end
859
+ def materialCount = self[:materialCount]
860
+ def materialCount=(v) self[:materialCount] = v end
861
+ def meshes = self[:meshes]
862
+ def meshes=(v) self[:meshes] = v end
863
+ def materials = self[:materials]
864
+ def materials=(v) self[:materials] = v end
865
+ def meshMaterial = self[:meshMaterial]
866
+ def meshMaterial=(v) self[:meshMaterial] = v end
867
+ def boneCount = self[:boneCount]
868
+ def boneCount=(v) self[:boneCount] = v end
869
+ def bones = self[:bones]
870
+ def bones=(v) self[:bones] = v end
871
+ def bindPose = self[:bindPose]
872
+ def bindPose=(v) self[:bindPose] = v end
655
873
  end
656
874
 
657
875
  # ModelAnimation
658
876
  class ModelAnimation < FFI::Struct
659
877
  layout(
660
- :boneCount, :int, # Number of bones
661
- :frameCount, :int, # Number of animation frames
662
- :bones, :pointer, # Bones information (skeleton)
878
+ :boneCount, :int, # Number of bones
879
+ :frameCount, :int, # Number of animation frames
880
+ :bones, :pointer, # Bones information (skeleton)
663
881
  :framePoses, :pointer, # Poses array by frame
664
882
  )
883
+ def boneCount = self[:boneCount]
884
+ def boneCount=(v) self[:boneCount] = v end
885
+ def frameCount = self[:frameCount]
886
+ def frameCount=(v) self[:frameCount] = v end
887
+ def bones = self[:bones]
888
+ def bones=(v) self[:bones] = v end
889
+ def framePoses = self[:framePoses]
890
+ def framePoses=(v) self[:framePoses] = v end
665
891
  end
666
892
 
667
893
  # Ray, ray for raycasting
668
894
  class Ray < FFI::Struct
669
895
  layout(
670
- :position, Vector3, # Ray position (origin)
896
+ :position, Vector3, # Ray position (origin)
671
897
  :direction, Vector3, # Ray direction
672
898
  )
899
+ def position = self[:position]
900
+ def position=(v) self[:position] = v end
901
+ def direction = self[:direction]
902
+ def direction=(v) self[:direction] = v end
673
903
  end
674
904
 
675
905
  # RayCollision, ray hit information
676
906
  class RayCollision < FFI::Struct
677
907
  layout(
678
- :hit, :bool, # Did the ray hit something?
679
- :distance, :float, # Distance to nearest hit
680
- :point, Vector3, # Point of nearest hit
681
- :normal, Vector3, # Surface normal of hit
908
+ :hit, :bool, # Did the ray hit something?
909
+ :distance, :float, # Distance to the nearest hit
910
+ :point, Vector3, # Point of the nearest hit
911
+ :normal, Vector3, # Surface normal of hit
682
912
  )
913
+ def hit = self[:hit]
914
+ def hit=(v) self[:hit] = v end
915
+ def distance = self[:distance]
916
+ def distance=(v) self[:distance] = v end
917
+ def point = self[:point]
918
+ def point=(v) self[:point] = v end
919
+ def normal = self[:normal]
920
+ def normal=(v) self[:normal] = v end
683
921
  end
684
922
 
685
923
  # BoundingBox
@@ -688,6 +926,10 @@ module Raylib
688
926
  :min, Vector3, # Minimum vertex box-corner
689
927
  :max, Vector3, # Maximum vertex box-corner
690
928
  )
929
+ def min = self[:min]
930
+ def min=(v) self[:min] = v end
931
+ def max = self[:max]
932
+ def max=(v) self[:max] = v end
691
933
  end
692
934
 
693
935
  # Wave, audio wave data
@@ -696,78 +938,154 @@ module Raylib
696
938
  :frameCount, :uint, # Total number of frames (considering channels)
697
939
  :sampleRate, :uint, # Frequency (samples per second)
698
940
  :sampleSize, :uint, # Bit depth (bits per sample): 8, 16, 32 (24 not supported)
699
- :channels, :uint, # Number of channels (1-mono, 2-stereo, ...)
700
- :data, :pointer, # Buffer data pointer
941
+ :channels, :uint, # Number of channels (1-mono, 2-stereo, ...)
942
+ :data, :pointer, # Buffer data pointer
701
943
  )
944
+ def frameCount = self[:frameCount]
945
+ def frameCount=(v) self[:frameCount] = v end
946
+ def sampleRate = self[:sampleRate]
947
+ def sampleRate=(v) self[:sampleRate] = v end
948
+ def sampleSize = self[:sampleSize]
949
+ def sampleSize=(v) self[:sampleSize] = v end
950
+ def channels = self[:channels]
951
+ def channels=(v) self[:channels] = v end
952
+ def data = self[:data]
953
+ def data=(v) self[:data] = v end
702
954
  end
703
955
 
704
956
  # AudioStream, custom audio stream
705
957
  class AudioStream < FFI::Struct
706
958
  layout(
707
- :buffer, :pointer, # Pointer to internal data used by the audio system
959
+ :buffer, :pointer, # Pointer to internal data used by the audio system
708
960
  :processor, :pointer, # Pointer to internal data processor, useful for audio effects
709
- :sampleRate, :uint, # Frequency (samples per second)
710
- :sampleSize, :uint, # Bit depth (bits per sample): 8, 16, 32 (24 not supported)
711
- :channels, :uint, # Number of channels (1-mono, 2-stereo, ...)
961
+ :sampleRate, :uint, # Frequency (samples per second)
962
+ :sampleSize, :uint, # Bit depth (bits per sample): 8, 16, 32 (24 not supported)
963
+ :channels, :uint, # Number of channels (1-mono, 2-stereo, ...)
712
964
  )
965
+ def buffer = self[:buffer]
966
+ def buffer=(v) self[:buffer] = v end
967
+ def processor = self[:processor]
968
+ def processor=(v) self[:processor] = v end
969
+ def sampleRate = self[:sampleRate]
970
+ def sampleRate=(v) self[:sampleRate] = v end
971
+ def sampleSize = self[:sampleSize]
972
+ def sampleSize=(v) self[:sampleSize] = v end
973
+ def channels = self[:channels]
974
+ def channels=(v) self[:channels] = v end
713
975
  end
714
976
 
715
977
  # Sound
716
978
  class Sound < FFI::Struct
717
979
  layout(
718
980
  :stream, AudioStream, # Audio stream
719
- :frameCount, :uint, # Total number of frames (considering channels)
981
+ :frameCount, :uint, # Total number of frames (considering channels)
720
982
  )
983
+ def stream = self[:stream]
984
+ def stream=(v) self[:stream] = v end
985
+ def frameCount = self[:frameCount]
986
+ def frameCount=(v) self[:frameCount] = v end
721
987
  end
722
988
 
723
989
  # Music, audio stream, anything longer than ~10 seconds should be streamed
724
990
  class Music < FFI::Struct
725
991
  layout(
726
992
  :stream, AudioStream, # Audio stream
727
- :frameCount, :uint, # Total number of frames (considering channels)
728
- :looping, :bool, # Music looping enable
729
- :ctxType, :int, # Type of music context (audio filetype)
730
- :ctxData, :pointer, # Audio context data, depends on type
993
+ :frameCount, :uint, # Total number of frames (considering channels)
994
+ :looping, :bool, # Music looping enable
995
+ :ctxType, :int, # Type of music context (audio filetype)
996
+ :ctxData, :pointer, # Audio context data, depends on type
731
997
  )
998
+ def stream = self[:stream]
999
+ def stream=(v) self[:stream] = v end
1000
+ def frameCount = self[:frameCount]
1001
+ def frameCount=(v) self[:frameCount] = v end
1002
+ def looping = self[:looping]
1003
+ def looping=(v) self[:looping] = v end
1004
+ def ctxType = self[:ctxType]
1005
+ def ctxType=(v) self[:ctxType] = v end
1006
+ def ctxData = self[:ctxData]
1007
+ def ctxData=(v) self[:ctxData] = v end
732
1008
  end
733
1009
 
734
1010
  # VrDeviceInfo, Head-Mounted-Display device parameters
735
1011
  class VrDeviceInfo < FFI::Struct
736
1012
  layout(
737
- :hResolution, :int, # Horizontal resolution in pixels
738
- :vResolution, :int, # Vertical resolution in pixels
739
- :hScreenSize, :float, # Horizontal size in meters
740
- :vScreenSize, :float, # Vertical size in meters
741
- :vScreenCenter, :float, # Screen center in meters
742
- :eyeToScreenDistance, :float, # Distance between eye and display in meters
743
- :lensSeparationDistance, :float, # Lens separation distance in meters
744
- :interpupillaryDistance, :float, # IPD (distance between pupils) in meters
1013
+ :hResolution, :int, # Horizontal resolution in pixels
1014
+ :vResolution, :int, # Vertical resolution in pixels
1015
+ :hScreenSize, :float, # Horizontal size in meters
1016
+ :vScreenSize, :float, # Vertical size in meters
1017
+ :vScreenCenter, :float, # Screen center in meters
1018
+ :eyeToScreenDistance, :float, # Distance between eye and display in meters
1019
+ :lensSeparationDistance, :float, # Lens separation distance in meters
1020
+ :interpupillaryDistance, :float, # IPD (distance between pupils) in meters
745
1021
  :lensDistortionValues, [:float, 4], # Lens distortion constant parameters
746
- :chromaAbCorrection, [:float, 4], # Chromatic aberration correction parameters
1022
+ :chromaAbCorrection, [:float, 4], # Chromatic aberration correction parameters
747
1023
  )
1024
+ def hResolution = self[:hResolution]
1025
+ def hResolution=(v) self[:hResolution] = v end
1026
+ def vResolution = self[:vResolution]
1027
+ def vResolution=(v) self[:vResolution] = v end
1028
+ def hScreenSize = self[:hScreenSize]
1029
+ def hScreenSize=(v) self[:hScreenSize] = v end
1030
+ def vScreenSize = self[:vScreenSize]
1031
+ def vScreenSize=(v) self[:vScreenSize] = v end
1032
+ def vScreenCenter = self[:vScreenCenter]
1033
+ def vScreenCenter=(v) self[:vScreenCenter] = v end
1034
+ def eyeToScreenDistance = self[:eyeToScreenDistance]
1035
+ def eyeToScreenDistance=(v) self[:eyeToScreenDistance] = v end
1036
+ def lensSeparationDistance = self[:lensSeparationDistance]
1037
+ def lensSeparationDistance=(v) self[:lensSeparationDistance] = v end
1038
+ def interpupillaryDistance = self[:interpupillaryDistance]
1039
+ def interpupillaryDistance=(v) self[:interpupillaryDistance] = v end
1040
+ def lensDistortionValues = self[:lensDistortionValues]
1041
+ def lensDistortionValues=(v) self[:lensDistortionValues] = v end
1042
+ def chromaAbCorrection = self[:chromaAbCorrection]
1043
+ def chromaAbCorrection=(v) self[:chromaAbCorrection] = v end
748
1044
  end
749
1045
 
750
1046
  # VrStereoConfig, VR stereo rendering configuration for simulator
751
1047
  class VrStereoConfig < FFI::Struct
752
1048
  layout(
753
- :projection, [Matrix, 2], # VR projection matrices (per eye)
754
- :viewOffset, [Matrix, 2], # VR view offset matrices (per eye)
755
- :leftLensCenter, [:float, 2], # VR left lens center
756
- :rightLensCenter, [:float, 2], # VR right lens center
757
- :leftScreenCenter, [:float, 2], # VR left screen center
1049
+ :projection, [Matrix, 2], # VR projection matrices (per eye)
1050
+ :viewOffset, [Matrix, 2], # VR view offset matrices (per eye)
1051
+ :leftLensCenter, [:float, 2], # VR left lens center
1052
+ :rightLensCenter, [:float, 2], # VR right lens center
1053
+ :leftScreenCenter, [:float, 2], # VR left screen center
758
1054
  :rightScreenCenter, [:float, 2], # VR right screen center
759
- :scale, [:float, 2], # VR distortion scale
760
- :scaleIn, [:float, 2], # VR distortion scale in
1055
+ :scale, [:float, 2], # VR distortion scale
1056
+ :scaleIn, [:float, 2], # VR distortion scale in
761
1057
  )
1058
+ def projection = self[:projection]
1059
+ def projection=(v) self[:projection] = v end
1060
+ def viewOffset = self[:viewOffset]
1061
+ def viewOffset=(v) self[:viewOffset] = v end
1062
+ def leftLensCenter = self[:leftLensCenter]
1063
+ def leftLensCenter=(v) self[:leftLensCenter] = v end
1064
+ def rightLensCenter = self[:rightLensCenter]
1065
+ def rightLensCenter=(v) self[:rightLensCenter] = v end
1066
+ def leftScreenCenter = self[:leftScreenCenter]
1067
+ def leftScreenCenter=(v) self[:leftScreenCenter] = v end
1068
+ def rightScreenCenter = self[:rightScreenCenter]
1069
+ def rightScreenCenter=(v) self[:rightScreenCenter] = v end
1070
+ def scale = self[:scale]
1071
+ def scale=(v) self[:scale] = v end
1072
+ def scaleIn = self[:scaleIn]
1073
+ def scaleIn=(v) self[:scaleIn] = v end
762
1074
  end
763
1075
 
764
1076
  # File path list
765
1077
  class FilePathList < FFI::Struct
766
1078
  layout(
767
1079
  :capacity, :uint, # Filepaths max entries
768
- :count, :uint, # Filepaths entries count
1080
+ :count, :uint, # Filepaths entries count
769
1081
  :paths, :pointer, # Filepaths entries
770
1082
  )
1083
+ def capacity = self[:capacity]
1084
+ def capacity=(v) self[:capacity] = v end
1085
+ def count = self[:count]
1086
+ def count=(v) self[:count] = v end
1087
+ def paths = self[:paths]
1088
+ def paths=(v) self[:paths] = v end
771
1089
  end
772
1090
 
773
1091
 
@@ -850,11 +1168,17 @@ module Raylib
850
1168
  # @return [void]
851
1169
  [:RestoreWindow, :RestoreWindow, [], :void],
852
1170
 
853
- # SetWindowIcon : Set icon for window (only PLATFORM_DESKTOP)
1171
+ # SetWindowIcon : Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)
854
1172
  # @param image [Image]
855
1173
  # @return [void]
856
1174
  [:SetWindowIcon, :SetWindowIcon, [Image.by_value], :void],
857
1175
 
1176
+ # SetWindowIcons : Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)
1177
+ # @param images [Image *]
1178
+ # @param count [int]
1179
+ # @return [void]
1180
+ [:SetWindowIcons, :SetWindowIcons, [:pointer, :int], :void],
1181
+
858
1182
  # SetWindowTitle : Set title for window (only PLATFORM_DESKTOP)
859
1183
  # @param title [const char *]
860
1184
  # @return [void]
@@ -1682,41 +2006,11 @@ module Raylib
1682
2006
  # @return [float]
1683
2007
  [:GetGesturePinchAngle, :GetGesturePinchAngle, [], :float],
1684
2008
 
1685
- # SetCameraMode : Set camera mode (multiple camera modes available)
1686
- # @param camera [Camera]
1687
- # @param mode [int]
1688
- # @return [void]
1689
- [:SetCameraMode, :SetCameraMode, [Camera.by_value, :int], :void],
1690
-
1691
2009
  # UpdateCamera : Update camera position for selected mode
1692
2010
  # @param camera [Camera *]
2011
+ # @param mode [int]
1693
2012
  # @return [void]
1694
- [:UpdateCamera, :UpdateCamera, [:pointer], :void],
1695
-
1696
- # SetCameraPanControl : Set camera pan key to combine with mouse movement (free camera)
1697
- # @param keyPan [int]
1698
- # @return [void]
1699
- [:SetCameraPanControl, :SetCameraPanControl, [:int], :void],
1700
-
1701
- # SetCameraAltControl : Set camera alt key to combine with mouse movement (free camera)
1702
- # @param keyAlt [int]
1703
- # @return [void]
1704
- [:SetCameraAltControl, :SetCameraAltControl, [:int], :void],
1705
-
1706
- # SetCameraSmoothZoomControl : Set camera smooth zoom key to combine with mouse (free camera)
1707
- # @param keySmoothZoom [int]
1708
- # @return [void]
1709
- [:SetCameraSmoothZoomControl, :SetCameraSmoothZoomControl, [:int], :void],
1710
-
1711
- # SetCameraMoveControls : Set camera move controls (1st person and 3rd person cameras)
1712
- # @param keyFront [int]
1713
- # @param keyBack [int]
1714
- # @param keyRight [int]
1715
- # @param keyLeft [int]
1716
- # @param keyUp [int]
1717
- # @param keyDown [int]
1718
- # @return [void]
1719
- [:SetCameraMoveControls, :SetCameraMoveControls, [:int, :int, :int, :int, :int, :int], :void],
2013
+ [:UpdateCamera, :UpdateCamera, [:pointer, :int], :void],
1720
2014
 
1721
2015
  # SetShapesTexture : Set texture and rectangle to be used on shapes drawing
1722
2016
  # @param texture [Texture2D]
@@ -3291,11 +3585,6 @@ module Raylib
3291
3585
  # @return [void]
3292
3586
  [:UnloadModel, :UnloadModel, [Model.by_value], :void],
3293
3587
 
3294
- # UnloadModelKeepMeshes : Unload model (but not meshes) from memory (RAM and/or VRAM)
3295
- # @param model [Model]
3296
- # @return [void]
3297
- [:UnloadModelKeepMeshes, :UnloadModelKeepMeshes, [Model.by_value], :void],
3298
-
3299
3588
  # GetModelBoundingBox : Compute model bounding box limits (considers all meshes)
3300
3589
  # @param model [Model]
3301
3590
  # @return [BoundingBox]
@@ -3723,19 +4012,6 @@ module Raylib
3723
4012
  # @return [void]
3724
4013
  [:ResumeSound, :ResumeSound, [Sound.by_value], :void],
3725
4014
 
3726
- # PlaySoundMulti : Play a sound (using multichannel buffer pool)
3727
- # @param sound [Sound]
3728
- # @return [void]
3729
- [:PlaySoundMulti, :PlaySoundMulti, [Sound.by_value], :void],
3730
-
3731
- # StopSoundMulti : Stop any sound playing (using multichannel buffer pool)
3732
- # @return [void]
3733
- [:StopSoundMulti, :StopSoundMulti, [], :void],
3734
-
3735
- # GetSoundsPlaying : Get number of sounds playing in the multichannel
3736
- # @return [int]
3737
- [:GetSoundsPlaying, :GetSoundsPlaying, [], :int],
3738
-
3739
4015
  # IsSoundPlaying : Check if a sound is currently playing
3740
4016
  # @param sound [Sound]
3741
4017
  # @return [bool]
@@ -3969,6 +4245,16 @@ module Raylib
3969
4245
  # @param processor [AudioCallback]
3970
4246
  # @return [void]
3971
4247
  [:DetachAudioStreamProcessor, :DetachAudioStreamProcessor, [AudioStream.by_value, :AudioCallback], :void],
4248
+
4249
+ # AttachAudioMixedProcessor : Attach audio stream processor to the entire audio pipeline
4250
+ # @param processor [AudioCallback]
4251
+ # @return [void]
4252
+ [:AttachAudioMixedProcessor, :AttachAudioMixedProcessor, [:AudioCallback], :void],
4253
+
4254
+ # DetachAudioMixedProcessor : Detach audio stream processor from the entire audio pipeline
4255
+ # @param processor [AudioCallback]
4256
+ # @return [void]
4257
+ [:DetachAudioMixedProcessor, :DetachAudioMixedProcessor, [:AudioCallback], :void],
3972
4258
  ]
3973
4259
  entries.each do |entry|
3974
4260
  attach_function entry[0], entry[1], entry[2], entry[3]