1 ! Copyright (C) 2023 CapitalEx.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: accessors alien alien.c-types arrays help.markup
4 help.syntax kernel make math math.parser quotations sequences
6 FROM: alien.c-types => float ;
10 : $enum-members ( element -- )
11 "Enum members" $heading
12 first lookup-c-type members>> [ first ] map $subsections ;
14 : $raylib-color ( element -- )
15 "Word description" $heading
16 { { "value" Color } } $values
17 "Represents the color (" print-element print-element ")" print-element
19 "For a visual guide, see the following:\n" print-element
20 { "https://raw.githubusercontent.com/raysan5/raylib/master/examples/shapes/shapes_colors_palette.png" }
23 GENERIC: ($raylib-key) ( array -- )
24 PREDICATE: triple < array length>> 3 = ;
27 "Represents the key " print-element
28 first2 [ % " (" % # ")" % ] "" make $snippet
31 M: triple ($raylib-key)
32 unclip-last swap ($raylib-key) " " [ print-element ] bi@ ;
35 : $raylib-key ( element -- )
36 "Enum value description" $heading
38 { $see-also KeyboardKey } print-element ;
43 HELP: RAYLIB_VERSION_MAJOR
48 The current major version of raylib.
51 HELP: RAYLIB_VERSION_MINOR
56 The current minor version of raylib.
59 HELP: RAYLIB_VERSION_PATCH
64 The current patch version of raylib.
72 A string representing the current version of raylib.
79 An enum representing the various configuration flags in Raylib.
81 { $enum-members ConfigFlags } } ;
85 Setting this flag will attempt to enable v-sync on the GPU.
86 { $see-also ConfigFlags } } ;
88 HELP: FLAG_FULLSCREEN_MODE
90 Setting this flag will run the program in fullscreen
91 { $see-also ConfigFlags } } ;
93 HELP: FLAG_WINDOW_RESIZABLE
95 Setting this flag allows for resizing the window.
96 { $see-also ConfigFlags } } ;
98 HELP: FLAG_WINDOW_UNDECORATED
100 Setting this flag remove window decorations (frame and buttons).
101 { $see-also ConfigFlags } } ;
103 HELP: FLAG_WINDOW_HIDDEN
105 Setting this flag will hide the window.
106 { $see-also ConfigFlags } } ;
108 HELP: FLAG_WINDOW_MINIMIZED
110 Setting this flag will minize the window.
111 { $see-also ConfigFlags } } ;
113 HELP: FLAG_WINDOW_MAXIMIZED
115 Setting this flag will maximize the window to the monitor size.
116 { $see-also ConfigFlags } } ;
118 HELP: FLAG_WINDOW_UNFOCUSED
120 Setting this flag will set the window to be unfocused.
121 { $see-also ConfigFlags } } ;
123 HELP: FLAG_WINDOW_TOPMOST
125 Setting this flag sets the window to always be on top.
126 { $see-also ConfigFlags } } ;
128 HELP: FLAG_WINDOW_ALWAYS_RUN
130 Setting this flag allows the window to run while minimized.
131 { $see-also ConfigFlags } } ;
133 HELP: FLAG_WINDOW_TRANSPARENT
135 Setting this flag allows for transparent framebuffer.
136 { $see-also ConfigFlags } } ;
138 HELP: FLAG_WINDOW_HIGHDPI
140 Setting this flag will enable HighDPI support.
141 { $see-also ConfigFlags } } ;
143 HELP: FLAG_MSAA_4X_HINT
145 Setting this flag will attempt to enable MSAA 4x.
146 { $see-also ConfigFlags } } ;
148 HELP: FLAG_INTERLACED_HINT
150 Setting this flag will attempt to enable the interlaced video
152 { $see-also ConfigFlags } } ;
155 ! Trace log level enum
158 Represents the various logging levels in Raylib.
159 Logs are displayed using the system's standard output.
161 { $enum-members TraceLogLevel } } ;
167 { $see-also TraceLogLevel } } ;
171 Deplays trace logging. \ LOG_TRACE meant for internal usage.
173 { $see-also TraceLogLevel } } ;
177 Displays debugging logs. { $snippet LOG_INFO } is used for internal
178 debugging and should be disabled on release builds.
180 { $see-also TraceLogLevel } } ;
184 Displays warning logs. Warnings are recoverable failures.
186 { $see-also TraceLogLevel } } ;
190 Displays error logs. Errors are unrecoverable failures.
192 { $see-also TraceLogLevel } } ;
196 Displays fatal logs. Fatal errors are used while aborting
198 { $see-also TraceLogLevel } } ;
202 Disables raylib logging.
204 { $see-also TraceLogLevel } } ;
210 An enum representing the various key codes Raylib can produce.
211 These codes are based on the physical layout of a US QWERTY
212 keyboard layout. Use \ get-key-pressed to allow for defining
215 { $enum-members KeyboardKey } } ;
217 HELP: KEY_NULL { $raylib-key 0 "NULL" " Used for no key pressed." } ;
218 HELP: KEY_APOSTROPHE { $raylib-key 39 "'" } ;
219 HELP: KEY_COMMA { $raylib-key 44 "," } ;
220 HELP: KEY_MINUS { $raylib-key 45 "-" } ;
221 HELP: KEY_PERIOD { $raylib-key 46 "." } ;
222 HELP: KEY_SLASH { $raylib-key 47 "/" } ;
223 HELP: KEY_ZERO { $raylib-key 48 "0" } ;
224 HELP: KEY_ONE { $raylib-key 49 "1" } ;
225 HELP: KEY_TWO { $raylib-key 50 "2" } ;
226 HELP: KEY_THREE { $raylib-key 51 "3" } ;
227 HELP: KEY_FOUR { $raylib-key 52 "4" } ;
228 HELP: KEY_FIVE { $raylib-key 53 "5" } ;
229 HELP: KEY_SIX { $raylib-key 54 "6" } ;
230 HELP: KEY_SEVEN { $raylib-key 55 "7" } ;
231 HELP: KEY_EIGHT { $raylib-key 56 "8" } ;
232 HELP: KEY_NINE { $raylib-key 57 "9" } ;
233 HELP: KEY_SEMICOLON { $raylib-key 59 ";" } ;
234 HELP: KEY_EQUAL { $raylib-key 61 "=" } ;
235 HELP: KEY_A { $raylib-key 65 "lowercase and uppercase A" } ;
236 HELP: KEY_B { $raylib-key 66 "lowercase and uppercase B" } ;
237 HELP: KEY_C { $raylib-key 67 "lowercase and uppercase C" } ;
238 HELP: KEY_D { $raylib-key 68 "lowercase and uppercase D" } ;
239 HELP: KEY_E { $raylib-key 69 "lowercase and uppercase E" } ;
240 HELP: KEY_F { $raylib-key 70 "lowercase and uppercase F" } ;
241 HELP: KEY_G { $raylib-key 71 "lowercase and uppercase G" } ;
242 HELP: KEY_H { $raylib-key 72 "lowercase and uppercase H" } ;
243 HELP: KEY_I { $raylib-key 73 "lowercase and uppercase I" } ;
244 HELP: KEY_J { $raylib-key 74 "lowercase and uppercase J" } ;
245 HELP: KEY_K { $raylib-key 75 "lowercase and uppercase K" } ;
246 HELP: KEY_L { $raylib-key 76 "lowercase and uppercase L" } ;
247 HELP: KEY_M { $raylib-key 77 "lowercase and uppercase M" } ;
248 HELP: KEY_N { $raylib-key 78 "lowercase and uppercase N" } ;
249 HELP: KEY_O { $raylib-key 79 "lowercase and uppercase O" } ;
250 HELP: KEY_P { $raylib-key 80 "lowercase and uppercase P" } ;
251 HELP: KEY_Q { $raylib-key 81 "lowercase and uppercase Q" } ;
252 HELP: KEY_R { $raylib-key 82 "lowercase and uppercase R" } ;
253 HELP: KEY_S { $raylib-key 83 "lowercase and uppercase S" } ;
254 HELP: KEY_T { $raylib-key 84 "lowercase and uppercase T" } ;
255 HELP: KEY_U { $raylib-key 85 "lowercase and uppercase U" } ;
256 HELP: KEY_V { $raylib-key 86 "lowercase and uppercase V" } ;
257 HELP: KEY_W { $raylib-key 87 "lowercase and uppercase W" } ;
258 HELP: KEY_X { $raylib-key 88 "lowercase and uppercase X" } ;
259 HELP: KEY_Y { $raylib-key 89 "lowercase and uppercase Y" } ;
260 HELP: KEY_Z { $raylib-key 90 "lowercase and uppercase Z" } ;
261 HELP: KEY_LEFT_BRACKET { $raylib-key 91 "[" } ;
262 HELP: KEY_BACKSLASH { $raylib-key 92 "\\" } ;
263 HELP: KEY_RIGHT_BRACKET { $raylib-key 93 "]" } ;
264 HELP: KEY_GRAVE { $raylib-key 96 "`" } ;
265 HELP: KEY_SPACE { $raylib-key 32 "Space" } ;
266 HELP: KEY_ESCAPE { $raylib-key 256 "Esc" } ;
267 HELP: KEY_ENTER { $raylib-key 257 "Enter" } ;
268 HELP: KEY_TAB { $raylib-key 258 "Tab" } ;
269 HELP: KEY_BACKSPACE { $raylib-key 259 "Backspace" } ;
270 HELP: KEY_INSERT { $raylib-key 260 "Ins" } ;
271 HELP: KEY_DELETE { $raylib-key 261 "Del" } ;
272 HELP: KEY_RIGHT { $raylib-key 262 "Cursor right" } ;
273 HELP: KEY_LEFT { $raylib-key 263 "Cursor left" } ;
274 HELP: KEY_DOWN { $raylib-key 264 "Cursor down" } ;
275 HELP: KEY_UP { $raylib-key 265 "Cursor up" } ;
276 HELP: KEY_PAGE_UP { $raylib-key 266 "Page up" } ;
277 HELP: KEY_PAGE_DOWN { $raylib-key 267 "Page down" } ;
278 HELP: KEY_HOME { $raylib-key 268 "Home" } ;
279 HELP: KEY_END { $raylib-key 269 "End" } ;
280 HELP: KEY_CAPS_LOCK { $raylib-key 280 "Caps lock" } ;
281 HELP: KEY_SCROLL_LOCK { $raylib-key 281 "Scroll down" } ;
282 HELP: KEY_NUM_LOCK { $raylib-key 282 "Num lock" } ;
283 HELP: KEY_PRINT_SCREEN { $raylib-key 283 "Print screen" } ;
284 HELP: KEY_PAUSE { $raylib-key 284 "Pause" } ;
285 HELP: KEY_F1 { $raylib-key 290 "F1" } ;
286 HELP: KEY_F2 { $raylib-key 291 "F2" } ;
287 HELP: KEY_F3 { $raylib-key 292 "F3" } ;
288 HELP: KEY_F4 { $raylib-key 293 "F4" } ;
289 HELP: KEY_F5 { $raylib-key 294 "F5" } ;
290 HELP: KEY_F6 { $raylib-key 295 "F6" } ;
291 HELP: KEY_F7 { $raylib-key 296 "F7" } ;
292 HELP: KEY_F8 { $raylib-key 297 "F8" } ;
293 HELP: KEY_F9 { $raylib-key 298 "F9" } ;
294 HELP: KEY_F10 { $raylib-key 299 "F10" } ;
295 HELP: KEY_F11 { $raylib-key 300 "F11" } ;
296 HELP: KEY_F12 { $raylib-key 301 "F12" } ;
297 HELP: KEY_LEFT_SHIFT { $raylib-key 340 "Shift left" } ;
298 HELP: KEY_LEFT_CONTROL { $raylib-key 341 "Control left" } ;
299 HELP: KEY_LEFT_ALT { $raylib-key 342 "Alt left" } ;
300 HELP: KEY_LEFT_SUPER { $raylib-key 343 "Super left" } ;
301 HELP: KEY_RIGHT_SHIFT { $raylib-key 344 "Shift right" } ;
302 HELP: KEY_RIGHT_CONTROL { $raylib-key 345 "Control right" } ;
303 HELP: KEY_RIGHT_ALT { $raylib-key 346 "Alt right" } ;
304 HELP: KEY_RIGHT_SUPER { $raylib-key 347 "Super right" } ;
305 HELP: KEY_KB_MENU { $raylib-key 348 "KB menu" } ;
306 HELP: KEY_KP_0 { $raylib-key 320 "Keypad 0" } ;
307 HELP: KEY_KP_1 { $raylib-key 321 "Keypad 1" } ;
308 HELP: KEY_KP_2 { $raylib-key 322 "Keypad 2" } ;
309 HELP: KEY_KP_3 { $raylib-key 323 "Keypad 3" } ;
310 HELP: KEY_KP_4 { $raylib-key 324 "Keypad 4" } ;
311 HELP: KEY_KP_5 { $raylib-key 325 "Keypad 5" } ;
312 HELP: KEY_KP_6 { $raylib-key 326 "Keypad 6" } ;
313 HELP: KEY_KP_7 { $raylib-key 327 "Keypad 7" } ;
314 HELP: KEY_KP_8 { $raylib-key 328 "Keypad 8" } ;
315 HELP: KEY_KP_9 { $raylib-key 329 "Keypad 9" } ;
316 HELP: KEY_KP_DECIMAL { $raylib-key 330 "Keypad ." } ;
317 HELP: KEY_KP_DIVIDE { $raylib-key 331 "Keypad /" } ;
318 HELP: KEY_KP_MULTIPLY { $raylib-key 332 "Keypad *" } ;
319 HELP: KEY_KP_SUBTRACT { $raylib-key 333 "Keypad -" } ;
320 HELP: KEY_KP_ADD { $raylib-key 334 "Keypad +" } ;
321 HELP: KEY_KP_ENTER { $raylib-key 335 "Keypad Enter" } ;
322 HELP: KEY_KP_EQUAL { $raylib-key 336 "Keypad =" } ;
323 HELP: KEY_BACK { $raylib-key 4 "Android back button" } ;
324 HELP: KEY_MENU { $raylib-key 82 "Android menu button" } ;
325 HELP: KEY_VOLUME_UP { $raylib-key 24 "Android volume up button" } ;
326 HELP: KEY_VOLUME_DOWN { $raylib-key 25 "Android volume down button" } ;
332 An enum representing the various key mouse buttons Ralyb has support for.
334 { $enum-members MouseButton } } ;
336 HELP: MOUSE_BUTTON_LEFT
338 Represents the left mouse button.
340 { $see-also MouseButton } } ;
342 HELP: MOUSE_BUTTON_RIGHT
344 Represents the right mouse button.
346 { $see-also MouseButton } } ;
348 HELP: MOUSE_BUTTON_MIDDLE
350 Represents the middle mouse button. On most mice, this is clicking
353 { $see-also MouseButton } } ;
355 HELP: MOUSE_BUTTON_SIDE
357 Represents a side button on mice that have additional buttons.
359 { $see-also MouseButton } } ;
361 HELP: MOUSE_BUTTON_EXTRA
363 Represents an extra button on mice that have additional buttons.
365 { $see-also MouseButton } } ;
367 HELP: MOUSE_BUTTON_FORWARD
369 Represents the " \"forward\" " button on mice that have additional buttons.
371 { $see-also MouseButton } } ;
373 HELP: MOUSE_BUTTON_BACK
375 Represents the " \"back\" " button on mice that have additional buttons.
377 { $see-also MouseButton } } ;
383 An enum representing the various states the cursor can be in.
384 This is used to change the cursor icon " / " shape.
387 { $enum-members MouseCursor } } ;
389 HELP: MOUSE_CURSOR_DEFAULT
391 Default pointer shape.
393 { $see-also MouseCursor } } ;
395 HELP: MOUSE_CURSOR_ARROW
399 { $see-also MouseCursor } } ;
401 HELP: MOUSE_CURSOR_IBEAM
403 Text writing cursor shape.
405 { $see-also MouseCursor } } ;
407 HELP: MOUSE_CURSOR_CROSSHAIR
411 { $see-also MouseCursor } } ;
413 HELP: MOUSE_CURSOR_POINTING_HAND
415 Pointing hand cursor.
417 { $see-also MouseCursor } } ;
419 HELP: MOUSE_CURSOR_RESIZE_EW
421 Horizontal resize/move arrow shape.
423 { $see-also MouseCursor } } ;
425 HELP: MOUSE_CURSOR_RESIZE_NS
427 Vertical resize/move arrow shape.
429 { $see-also MouseCursor } } ;
431 HELP: MOUSE_CURSOR_RESIZE_NWSE
433 Top-left to bottom-right diagonal resize/move arrow shape.
435 { $see-also MouseCursor } } ;
437 HELP: MOUSE_CURSOR_RESIZE_NESW
439 The top-right to bottom-left diagonal resize/move arrow shape.
441 { $see-also MouseCursor } } ;
443 HELP: MOUSE_CURSOR_RESIZE_ALL
445 The omni-directional resize/move cursor shape.
447 { $see-also MouseCursor } } ;
449 HELP: MOUSE_CURSOR_NOT_ALLOWED
451 The operation-not-allowed shape.
453 { $see-also MouseCursor } } ;
456 ! Gamepad button enum
459 This enum represents the various buttons a gamepad might have.
461 It's important to keep in mind different controllers may have
462 different button orderings. Each enum member notes the
463 differences in their respective documentation sections.
465 { $see-also GamepadAxis }
467 { $enum-members GamepadButton } } ;
469 HELP: GAMEPAD_BUTTON_UNKNOWN
471 Unknown button, just for error checking
473 { $see-also GamepadButton } } ;
475 HELP: GAMEPAD_BUTTON_LEFT_FACE_UP
477 Gamepad left DPAD up button
479 { $see-also GamepadButton } } ;
481 HELP: GAMEPAD_BUTTON_LEFT_FACE_RIGHT
483 Gamepad left DPAD right button
485 { $see-also GamepadButton } } ;
487 HELP: GAMEPAD_BUTTON_LEFT_FACE_DOWN
489 Gamepad left DPAD down button
491 { $see-also GamepadButton } } ;
493 HELP: GAMEPAD_BUTTON_LEFT_FACE_LEFT
495 Gamepad left DPAD left button
497 { $see-also GamepadButton } } ;
499 HELP: GAMEPAD_BUTTON_RIGHT_FACE_UP
501 Gamepad right button up (i.e. PS3: Triangle, Xbox: Y)
503 { $see-also GamepadButton } } ;
505 HELP: GAMEPAD_BUTTON_RIGHT_FACE_RIGHT
507 Gamepad right button right (i.e. PS3: Square, Xbox: X)
509 { $see-also GamepadButton } } ;
511 HELP: GAMEPAD_BUTTON_RIGHT_FACE_DOWN
513 Gamepad right button down (i.e. PS3: Cross, Xbox: A)
515 { $see-also GamepadButton } } ;
517 HELP: GAMEPAD_BUTTON_RIGHT_FACE_LEFT
519 Gamepad right button left (i.e. PS3: Circle, Xbox: B)
521 { $see-also GamepadButton } } ;
523 HELP: GAMEPAD_BUTTON_LEFT_TRIGGER_1
525 Gamepad top/back trigger left (first), it could be a trailing button
527 { $see-also GamepadButton } } ;
529 HELP: GAMEPAD_BUTTON_LEFT_TRIGGER_2
531 Gamepad top/back trigger left (second), it could be a trailing button
533 { $see-also GamepadButton } } ;
535 HELP: GAMEPAD_BUTTON_RIGHT_TRIGGER_1
537 Gamepad top/back trigger right (one), it could be a trailing button
539 { $see-also GamepadButton } } ;
541 HELP: GAMEPAD_BUTTON_RIGHT_TRIGGER_2
543 Gamepad top/back trigger right (second), it could be a trailing button
545 { $see-also GamepadButton } } ;
547 HELP: GAMEPAD_BUTTON_MIDDLE_LEFT
549 Gamepad center buttons, left one (i.e. PS3: Select)
551 { $see-also GamepadButton } } ;
553 HELP: GAMEPAD_BUTTON_MIDDLE
555 Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX)
557 { $see-also GamepadButton } } ;
559 HELP: GAMEPAD_BUTTON_MIDDLE_RIGHT
561 Gamepad center buttons, right one (i.e. PS3: Start)
563 { $see-also GamepadButton } } ;
565 HELP: GAMEPAD_BUTTON_LEFT_THUMB
567 Gamepad joystick pressed button left
569 { $see-also GamepadButton } } ;
571 HELP: GAMEPAD_BUTTON_RIGHT_THUMB
573 Gamepad joystick pressed button right
575 { $see-also GamepadButton } } ;
581 Contains a set of flags for each axis a gamepad may have. Raylib
582 supports controllers with two triggers and two joysticks.
584 { $enum-members GamepadAxis } } ;
586 HELP: GAMEPAD_AXIS_LEFT_X
588 Represents the left gamepad stick and its tilt on the X axis (left/right).
589 { $see-also GamepadAxis } } ;
591 HELP: GAMEPAD_AXIS_LEFT_Y
593 Represents the left gamepad stick and its tilt on the Y axis (up/down).
594 { $see-also GamepadAxis } } ;
596 HELP: GAMEPAD_AXIS_RIGHT_X
598 Represents the right gamepad stick and its tilt on the X axis (left/right).
599 { $see-also GamepadAxis } } ;
601 HELP: GAMEPAD_AXIS_RIGHT_Y
603 Represents the right gamepad stick and its tilt on the Y axis (up/down).
604 { $see-also GamepadAxis } } ;
606 HELP: GAMEPAD_AXIS_LEFT_TRIGGER
608 Represents the left gamepad trigger. Trigger has the value
610 { $see-also GamepadAxis } } ;
612 HELP: GAMEPAD_AXIS_RIGHT_TRIGGER
614 Represents the left gamepad trigger. Trigger has the value
616 { $see-also GamepadAxis } } ;
619 ! Material map index enum
620 HELP: MaterialMapIndex
622 Provides convient names for each index into a texture's various
625 { $enum-members MaterialMapIndex } } ;
626 HELP: MATERIAL_MAP_ALBEDO
628 Represents the index for a texture's albedo material (same as: \ MATERIAL_MAP_DIFFUSE ).
630 { $see-also MaterialMapIndex } } ;
632 HELP: MATERIAL_MAP_METALNESS
634 Represents the index for a texture's metalness material (same as: \ MATERIAL_MAP_SPECULAR ).
636 { $see-also MaterialMapIndex } } ;
638 HELP: MATERIAL_MAP_NORMAL
640 Represents the index for a texture's normal material.
642 { $see-also MaterialMapIndex } } ;
644 HELP: MATERIAL_MAP_ROUGHNESS
646 Represents the index for a texture's roughness material.
648 { $see-also MaterialMapIndex } } ;
650 HELP: MATERIAL_MAP_OCCLUSION
652 Represents the index for a texture's ambient occlusion material.
654 { $see-also MaterialMapIndex } } ;
656 HELP: MATERIAL_MAP_EMISSION
658 Represents the index for a texture's emission material.
660 { $see-also MaterialMapIndex } } ;
662 HELP: MATERIAL_MAP_HEIGHT
664 Represents the index for a texture's heightmap material.
666 { $see-also MaterialMapIndex } } ;
668 HELP: MATERIAL_MAP_CUBEMAP
670 Represents the index for a texture's Cubemap material (NOTE: Uses GL_TEXTURE_CUBE_MAP).
672 { $see-also MaterialMapIndex } } ;
674 HELP: MATERIAL_MAP_IRRADIANCE
676 Represents the index for a texture's irradiance material (NOTE: Uses GL_TEXTURE_CUBE_MAP).
678 { $see-also MaterialMapIndex } } ;
680 HELP: MATERIAL_MAP_PREFILTER
682 Represents the index for a texture's prefilter material (NOTE: Uses GL_TEXTURE_CUBE_MAP).
684 { $see-also MaterialMapIndex } } ;
686 HELP: MATERIAL_MAP_BRDF
688 Represents the index for a texture's brdf material.
690 { $see-also MaterialMapIndex } } ;
692 ! Shader Location Index
693 ! TODO: make a better description of these. They are kinda bad...
694 HELP: ShaderLocationIndex
696 Shader location index enum.
698 { $enum-members ShaderLocationIndex } } ;
700 HELP: SHADER_LOC_VERTEX_POSITION
702 Shader location: vertex attribute: position
704 { $see-also ShaderLocationIndex } } ;
706 HELP: SHADER_LOC_VERTEX_TEXCOORD01
708 Shader location: vertex attribute: texcoord01
710 { $see-also ShaderLocationIndex } } ;
712 HELP: SHADER_LOC_VERTEX_TEXCOORD02
714 Shader location: vertex attribute: texcoord02
716 { $see-also ShaderLocationIndex } } ;
718 HELP: SHADER_LOC_VERTEX_NORMAL
720 Shader location: vertex attribute: normal
722 { $see-also ShaderLocationIndex } } ;
724 HELP: SHADER_LOC_VERTEX_TANGENT
726 Shader location: vertex attribute: tangent
728 { $see-also ShaderLocationIndex } } ;
730 HELP: SHADER_LOC_VERTEX_COLOR
732 Shader location: vertex attribute: color
734 { $see-also ShaderLocationIndex } } ;
736 HELP: SHADER_LOC_MATRIX_MVP
738 Shader location: matrix uniform: model-view-projection
740 { $see-also ShaderLocationIndex } } ;
742 HELP: SHADER_LOC_MATRIX_VIEW
744 Shader location: matrix uniform: view (camera transform)
746 { $see-also ShaderLocationIndex } } ;
748 HELP: SHADER_LOC_MATRIX_PROJECTION
750 Shader location: matrix uniform: projection
752 { $see-also ShaderLocationIndex } } ;
754 HELP: SHADER_LOC_MATRIX_MODEL
756 Shader location: matrix uniform: model (transform)
758 { $see-also ShaderLocationIndex } } ;
760 HELP: SHADER_LOC_MATRIX_NORMAL
762 Shader location: matrix uniform: normal
764 { $see-also ShaderLocationIndex } } ;
766 HELP: SHADER_LOC_VECTOR_VIEW
768 Shader location: vector uniform: view
770 { $see-also ShaderLocationIndex } } ;
772 HELP: SHADER_LOC_COLOR_DIFFUSE
774 Shader location: vector uniform: diffuse color
776 { $see-also ShaderLocationIndex } } ;
778 HELP: SHADER_LOC_COLOR_SPECULAR
780 Shader location: vector uniform: specular color
782 { $see-also ShaderLocationIndex } } ;
784 HELP: SHADER_LOC_COLOR_AMBIENT
786 Shader location: vector uniform: ambient color
788 { $see-also ShaderLocationIndex } } ;
790 HELP: SHADER_LOC_MAP_ALBEDO
792 Shader location: sampler2d texture: albedo (same as: SHADER_LOC_MAP_DIFFUSE)
794 { $see-also ShaderLocationIndex } } ;
796 HELP: SHADER_LOC_MAP_METALNESS
798 Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR)
800 { $see-also ShaderLocationIndex } } ;
802 HELP: SHADER_LOC_MAP_NORMAL
804 Shader location: sampler2d texture: normal
806 { $see-also ShaderLocationIndex } } ;
808 HELP: SHADER_LOC_MAP_ROUGHNESS
810 Shader location: sampler2d texture: roughness
812 { $see-also ShaderLocationIndex } } ;
814 HELP: SHADER_LOC_MAP_OCCLUSION
816 Shader location: sampler2d texture: occlusion
818 { $see-also ShaderLocationIndex } } ;
820 HELP: SHADER_LOC_MAP_EMISSION
822 Shader location: sampler2d texture: emission
824 { $see-also ShaderLocationIndex } } ;
826 HELP: SHADER_LOC_MAP_HEIGHT
828 Shader location: sampler2d texture: height
830 { $see-also ShaderLocationIndex } } ;
832 HELP: SHADER_LOC_MAP_CUBEMAP
834 Shader location: samplerCube texture: cubemap
836 { $see-also ShaderLocationIndex } } ;
838 HELP: SHADER_LOC_MAP_IRRADIANCE
840 Shader location: samplerCube texture: irradiance
842 { $see-also ShaderLocationIndex } } ;
844 HELP: SHADER_LOC_MAP_PREFILTER
846 Shader location: samplerCube texture: prefilter
848 { $see-also ShaderLocationIndex } } ;
850 HELP: SHADER_LOC_MAP_BRDF
852 Shader location: sampler2d texture: brdf
854 { $see-also ShaderLocationIndex } } ;
858 ! Shader uniform data type
859 ! TODO: Better descriptions for these...
860 HELP: ShaderUniformDataType
862 Represents the various types a uniform shader can be.
864 { $enum-members MaterialMapIndex } } ;
866 HELP: SHADER_UNIFORM_FLOAT
868 Shader uniform type: float
869 { $see-also ShaderUniformDataType } } ;
871 HELP: SHADER_UNIFORM_VEC2
873 Shader uniform type: vec2 (2 float)
874 { $see-also ShaderUniformDataType } } ;
876 HELP: SHADER_UNIFORM_VEC3
878 Shader uniform type: vec3 (3 float)
879 { $see-also ShaderUniformDataType } } ;
881 HELP: SHADER_UNIFORM_VEC4
883 Shader uniform type: vec4 (4 float)
884 { $see-also ShaderUniformDataType } } ;
886 HELP: SHADER_UNIFORM_INT
888 Shader uniform type: int
889 { $see-also ShaderUniformDataType } } ;
891 HELP: SHADER_UNIFORM_IVEC2
893 Shader uniform type: ivec2 (2 int)
894 { $see-also ShaderUniformDataType } } ;
896 HELP: SHADER_UNIFORM_IVEC3
898 Shader uniform type: ivec3 (3 int)
899 { $see-also ShaderUniformDataType } } ;
901 HELP: SHADER_UNIFORM_IVEC4
903 Shader uniform type: ivec4 (4 int)
904 { $see-also ShaderUniformDataType } } ;
906 HELP: SHADER_UNIFORM_SAMPLER2D
908 Shader uniform type: sampler2d
909 { $see-also ShaderUniformDataType } } ;
912 ! Shader attribute data type enum
913 HELP: ShaderAttributeDataType
915 Shader attribute data types
917 { $enum-members ShaderAttributeDataType } } ;
919 HELP: SHADER_ATTRIB_FLOAT
921 Shader attribute type: float
923 { $see-also ShaderAttributeDataType } } ;
925 HELP: SHADER_ATTRIB_VEC2
927 Shader attribute type: vec2 (2 float)
929 { $see-also ShaderAttributeDataType } } ;
931 HELP: SHADER_ATTRIB_VEC3
933 Shader attribute type: vec3 (3 float)
935 { $see-also ShaderAttributeDataType } } ;
937 HELP: SHADER_ATTRIB_VEC4
939 Shader attribute type: vec4 (4 float)
941 { $see-also ShaderAttributeDataType } } ;
947 The various pixel formats that can be used by Raylib.
948 This enum's values start from { $snippet 1 } .
950 { $warning Support depends on OpenGL version and platform. }
951 { $enum-members PixelFormat } } ;
953 HELP: PIXELFORMAT_UNCOMPRESSED_GRAYSCALE
955 8 bit per pixel (no alpha).
957 { $see-also PixelFormat } } ;
959 HELP: PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA
961 8*2 bits per pixel (2 channels).
963 { $see-also PixelFormat } } ;
965 HELP: PIXELFORMAT_UNCOMPRESSED_R5G6B5
969 { $see-also PixelFormat } } ;
971 HELP: PIXELFORMAT_UNCOMPRESSED_R8G8B8
975 { $see-also PixelFormat } } ;
977 HELP: PIXELFORMAT_UNCOMPRESSED_R5G5B5A1
979 16 bits per pixel (1 bit alpha).
981 { $see-also PixelFormat } } ;
983 HELP: PIXELFORMAT_UNCOMPRESSED_R4G4B4A4
985 16 bits per pixel (4 bit alpha).
987 { $see-also PixelFormat } } ;
989 HELP: PIXELFORMAT_UNCOMPRESSED_R8G8B8A8
993 { $see-also PixelFormat } } ;
995 HELP: PIXELFORMAT_UNCOMPRESSED_R32
997 32 bits per pixel (1 channel - float).
999 { $see-also PixelFormat } } ;
1001 HELP: PIXELFORMAT_UNCOMPRESSED_R32G32B32
1002 { $class-description
1003 32*3 bits per pixel (3 channels - float).
1005 { $see-also PixelFormat } } ;
1007 HELP: PIXELFORMAT_UNCOMPRESSED_R32G32B32A32
1008 { $class-description
1009 32*4 bits per pixel (4 channels - float).
1011 { $see-also PixelFormat } } ;
1013 HELP: PIXELFORMAT_COMPRESSED_DXT1_RGB
1014 { $class-description
1015 4 bits per pixel (no alpha).
1017 { $see-also PixelFormat } } ;
1019 HELP: PIXELFORMAT_COMPRESSED_DXT1_RGBA
1020 { $class-description
1021 4 bits per pixel (1 bit alpha).
1023 { $see-also PixelFormat } } ;
1025 HELP: PIXELFORMAT_COMPRESSED_DXT3_RGBA
1026 { $class-description
1029 { $see-also PixelFormat } } ;
1031 HELP: PIXELFORMAT_COMPRESSED_DXT5_RGBA
1032 { $class-description
1035 { $see-also PixelFormat } } ;
1037 HELP: PIXELFORMAT_COMPRESSED_ETC1_RGB
1038 { $class-description
1041 { $see-also PixelFormat } } ;
1043 HELP: PIXELFORMAT_COMPRESSED_ETC2_RGB
1044 { $class-description
1047 { $see-also PixelFormat } } ;
1049 HELP: PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA
1050 { $class-description
1053 { $see-also PixelFormat } } ;
1055 HELP: PIXELFORMAT_COMPRESSED_PVRT_RGB
1056 { $class-description
1059 { $see-also PixelFormat } } ;
1061 HELP: PIXELFORMAT_COMPRESSED_PVRT_RGBA
1062 { $class-description
1065 { $see-also PixelFormat } } ;
1067 HELP: PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA
1068 { $class-description
1071 { $see-also PixelFormat } } ;
1073 HELP: PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA
1074 { $class-description
1077 { $see-also PixelFormat } } ;
1080 ! Texture filter mode enum
1081 HELP: TextureFilterMode
1083 Controls the filter mode of the texture. In Raylib, filtering will
1084 consider mipmaps if available in the current texture. Additionally,
1085 filter is accordingly set for minification and magnification.
1087 { $enum-members TextureFilterMode } } ;
1089 HELP: TEXTURE_FILTER_POINT
1090 { $class-description
1091 No filter just pixel aproximation.
1093 { $see-also TextureFilterMode } } ;
1095 HELP: TEXTURE_FILTER_BILINEAR
1096 { $class-description
1099 { $see-also TextureFilterMode } } ;
1101 HELP: TEXTURE_FILTER_TRILINEAR
1102 { $class-description
1103 Trilinear filtering (linear with mipmaps).
1105 { $see-also TextureFilterMode } } ;
1107 HELP: TEXTURE_FILTER_ANISOTROPIC_4X
1108 { $class-description
1109 Anisotropic filtering 4x.
1111 { $see-also TextureFilterMode } } ;
1113 HELP: TEXTURE_FILTER_ANISOTROPIC_8X
1114 { $class-description
1115 Anisotropic filtering 8x.
1117 { $see-also TextureFilterMode } } ;
1119 HELP: TEXTURE_FILTER_ANISOTROPIC_16X
1120 { $class-description
1121 Anisotropic filtering 16x.
1123 { $see-also TextureFilterMode } } ;
1126 ! Texture wrap mode enume
1127 HELP: TextureWrapMode
1129 Represents the way a texture will repeate when reading
1130 past the image bounds.
1132 { $enum-members TextureWrapMode } } ;
1134 HELP: TEXTURE_WRAP_REPEAT
1135 { $class-description
1136 Using this mode, a texture will repeate infinitely in all directions.
1138 { $see-also TextureWrapMode } } ;
1140 HELP: TEXTURE_WRAP_CLAMP
1141 { $class-description
1142 Using this mode, the edge pixels in a texture will
1143 be stretched out into infinity.
1145 { $see-also TextureWrapMode } } ;
1148 TEXTURE_WRAP_MIRROR_REPEAT
1149 { $class-description
1150 Using this mode, the texture will repeat infinitely in all directions.
1151 However, each tiling will be mirrored compared to the previous tiling.
1154 { $see-also TextureWrapMode } } ;
1156 HELP: TEXTURE_WRAP_MIRROR_CLAMP
1157 { $class-description
1158 This mode combines mirrored with clamped. The texture will infinitely
1159 tile the last pixel from the oppisite side.
1161 { $see-also TextureWrapMode } } ;
1164 ! Cubemap layout enum
1167 Represents the layout a cube map is using.
1169 { $enum-members CubemapLayout } } ;
1171 HELP: CUBEMAP_LAYOUT_AUTO_DETECT
1172 { $class-description
1173 Raylib will attempt to automatically detect the cubemap's layout type.
1175 { $see-also CubemapLayout } } ;
1177 HELP: CUBEMAP_LAYOUT_LINE_VERTICAL
1178 { $class-description
1179 A cubemap who's layout is defined by a horizontal line with faces.
1181 { $see-also CubemapLayout } } ;
1183 HELP: CUBEMAP_LAYOUT_LINE_HORIZONTAL
1184 { $class-description
1185 A cubemap who's layout is defined by a vertical line with faces.
1187 { $see-also CubemapLayout } } ;
1189 HELP: CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR
1190 { $class-description
1191 A cubemap who's layout is defined by a 3x4 cross with cubemap faces.
1193 { $see-also CubemapLayout } } ;
1195 HELP: CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE
1196 { $class-description
1197 A cubemap who's layout is defined by a 4x3 cross with cubemap faces.
1199 { $see-also CubemapLayout } } ;
1201 HELP: CUBEMAP_LAYOUT_PANORAMA
1202 { $class-description
1203 A cubemap who's layout is defined by a panoramic image (equirectangular map).
1205 { $see-also CubemapLayout } } ;
1211 A C-enum defining the various font generation methods in Raylib.
1213 { $enum-members FontType } } ;
1216 { $class-description
1217 Default font generation with anti-aliasing.
1219 { $see-also FontType } } ;
1222 { $class-description
1223 Bitmap font generation without anti-aliasing.
1225 { $see-also FontType } } ;
1228 { $class-description
1229 SDF font generation. Requires an external shader.
1231 { $see-also FontType } } ;
1237 A C-enum holding the OpenGL texture blend modes.
1240 { $enum-members BlendMode } } ;
1243 { $class-description
1244 Blend mode for blending texturing while considering the alpha channel.
1245 This is the default mode.
1246 { $see-also BlendMode } } ;
1248 HELP: BLEND_ADDITIVE
1249 { $class-description
1250 Blend mode for blending textures while adding colors
1251 { $see-also BlendMode } } ;
1253 HELP: BLEND_MULTIPLIED
1254 { $class-description
1255 Blend mode for blending textures while multiplying colors.
1256 { $see-also BlendMode } } ;
1258 HELP: BLEND_ADD_COLORS
1259 { $class-description
1260 Alternative blend mode to \ BLEND_ADDITIVE
1261 { $see-also BlendMode } } ;
1263 HELP: BLEND_SUBTRACT_COLORS
1264 { $class-description
1265 Blend mode for blending textures while subtracting colors.
1266 { $see-also BlendMode } } ;
1268 HELP: BLEND_ALPHA_PREMULTIPLY
1269 { $class-description
1270 Blend mode for blending premultipled textures while considering the alpha channel
1271 { $see-also BlendMode } } ;
1274 { $class-description
1275 Blend mode for using custom src/dst factors. This is intended for use with
1276 { $snippet rl-set-blend-factors } from { $vocab-link "rlgl" } .
1277 { $see-also BlendMode } } ;
1279 HELP: BLEND_CUSTOM_SEPARATE
1280 { $class-description
1281 Blend mode for using custom rgb/alpha seperate src/dst
1282 factors. This is intended for use with { $snippet rl-set-blend-factors-seperate }
1283 from { $vocab-link "rlgl" } .
1284 { $see-also BlendMode } } ;
1290 Represents the various touch gestures Raylib supports.
1291 This enum is a set of bitflags to enable desired
1292 gestures individually.
1294 { $enum-members Gestures } } ;
1297 { $class-description
1298 Used as the empty set of gestures.
1300 Has the value: { $snippet 0 }
1301 { $see-also Gestures } } ;
1304 { $class-description
1305 Represents a tap gesture.
1307 Has the value: { $snippet 1 }
1308 { $see-also Gestures } } ;
1310 HELP: GESTURE_DOUBLETAP
1311 { $class-description
1312 Represents a double tap gesture.
1314 Has the value: { $snippet 2 }
1315 { $see-also Gestures } } ;
1318 { $class-description
1319 Represents a hold gesture.
1321 Has the value: { $snippet 4 }
1322 { $see-also Gestures } } ;
1325 { $class-description
1326 Represents a drag gesture.
1328 Has the value: { $snippet 8 }
1329 { $see-also Gestures } } ;
1330 HELP: GESTURE_SWIPE_RIGHT
1331 { $class-description
1332 Represents a swipe to the right.
1334 Has the value: { $snippet 16 }
1335 { $see-also Gestures } } ;
1337 HELP: GESTURE_SWIPE_LEFT
1338 { $class-description
1339 Represents a swipe to the left
1341 Has the value: { $snippet 32 }
1342 { $see-also Gestures } } ;
1344 HELP: GESTURE_SWIPE_UP
1345 { $class-description
1346 Represents a swap upwards.
1348 Has the value: { $snippet 64 }
1349 { $see-also Gestures } } ;
1351 HELP: GESTURE_SWIPE_DOWN
1352 { $class-description
1353 Represents a swap downwards.
1355 Has the value: { $snippet 128 }
1356 { $see-also Gestures } } ;
1358 HELP: GESTURE_PINCH_IN
1359 { $class-description
1360 Represents a inwards pinch.
1362 Has the value: { $snippet 256 }
1363 { $see-also Gestures } } ;
1365 HELP: GESTURE_PINCH_OUT
1366 { $class-description
1367 Represents a outwards pinch.
1369 Has the value: { $snippet 512 }
1370 { $see-also Gestures } } ;
1376 The various modes a camera can behave in Raylib.
1378 { $enum-members CameraMode } } ;
1381 { $class-description
1382 A 3D camera with custom behavior.
1384 { $see-also CameraMode } } ;
1387 { $class-description
1388 A \ Camera3D with unrestricted movement.
1390 { $see-also CameraMode } } ;
1392 HELP: CAMERA_ORBITAL
1393 { $class-description
1394 A \ Camera3D that will orbit a fixed point in 3D space.
1396 { $see-also CameraMode } } ;
1398 HELP: CAMERA_FIRST_PERSON
1399 { $class-description
1400 A \ Camera3D that cannot roll and looked on the up-axis.
1402 { $see-also CameraMode } } ;
1404 HELP: CAMERA_THIRD_PERSON
1405 { $class-description
1406 Similiar to \ CAMERA_FIRST_PERSON , however the camera is focused
1409 { $see-also CameraMode } } ;
1412 ! Camera projection enum
1413 HELP: CameraProjection
1415 Represents the projects a camera can use.
1417 { $enum-members CameraProjection } } ;
1419 HELP: CAMERA_PERSPECTIVE
1420 { $class-description
1421 Sets a \ Camera3D to use a perspective projection.
1423 { $see-also CameraProjection } } ;
1425 HELP: CAMERA_ORTHOGRAPHIC
1426 { $class-description
1427 Sets a \ Camera3D to use an orthographic projection. Parallel lines
1428 will stay parallel in this projection.
1430 { $see-also CameraProjection } } ;
1433 ! N-patch layout enum
1436 Raylib features support for " \"n-patch\" " tiles. N-patches allow
1437 for texture to be automatically repeated and stretched. Raylib
1438 has support for the follow n-patch styles:
1440 { "3x3 (" { $link NPATCH_NINE_PATCH } ")" }
1441 { "1x3 (" { $link NPATCH_THREE_PATCH_VERTICAL } ")" }
1442 { "3x1 (" { $link NPATCH_THREE_PATCH_HORIZONTAL } ")" }
1445 See the following page for an example:
1447 { $url "https://www.raylib.com/examples/textures/loader.html?name=textures_npatch_drawing" }
1448 { $enum-members NPatchLayout } } ;
1450 HELP: NPATCH_NINE_PATCH
1451 { $class-description
1452 Represents a 3x3 n-patch tile. This tile type can expand both horizontally
1453 and vertically. It has the following sections:
1455 { "4 corners that are neither stretched nor scaled." }
1456 { "4 edge tiles (top, bottom, left, right) that will be repeated
1457 vertically and horizontally." }
1458 { "1 center tile that will be stretched to fill the space between
1459 the edge tiles and corner tiles." }
1462 { $see-also NPatchLayout } } ;
1464 HELP: NPATCH_THREE_PATCH_VERTICAL
1465 { $class-description
1466 Represents a 1x3 tiling that can be stretched vertically.
1468 { $see-also NPatchLayout } } ;
1470 HELP: NPATCH_THREE_PATCH_HORIZONTAL
1471 { $class-description
1472 Represents a 3x1 tiling that can be streched vertically.
1474 { $see-also NPatchLayout } } ;
1477 { $class-description
1478 Represents a 2D vector in Raylib. Implements the
1479 { $link "sequence-protocol" } .
1482 Values are all single-precision where
1483 as Factor is double precision (see \ alien.c-types:float ) } } ;
1486 { $class-description
1487 Represents a 3D vector in Raylib. Implements the
1488 { $link "sequence-protocol" } .
1491 Values are all single-precision where
1492 as Factor is double precision (see \ alien.c-types:float ) } } ;
1495 { $class-description
1496 Represents a 4D vector in Raylib. Implements the
1497 { $link "sequence-protocol" } .
1500 Values are all single-precision where
1501 as Factor is double precision (see \ alien.c-types:float ) } } ;
1505 A c-typedef for a \ Vector4 . } ;
1507 HELP: invalid-vector-length
1508 { $error-description
1509 Raised when calling functions such as \ like
1510 and \ new-sequence . Indicates that the
1511 converted sequence doesn't fit into the bounds
1512 of the given \ Vector2 , \ Vector3 , \ Vector4 . } ;
1520 Constructs a new \ Vector2 . } ;
1529 Constructs a new \ Vector3 . } ;
1539 Constructs a new \ Vector4 . } ;
1542 { $class-description
1543 Represents a 4x4 OpenGL style matrix. It's right handed
1547 Values are all single-precision where
1548 as Factor is double precision (see \ alien.c-types:float ) } } ;
1550 { $class-description
1551 Represents a RGBA color with 8-bit unsigned components.
1552 Raylib comes with 25 default colors.
1554 { $heading Builtin colors }
1583 { $class-description
1584 Represents a 2D rectangle defined by a x position, y position, width, and height.
1586 Values are all single-precision where
1587 as Factor is double precision (see \ alien.c-types:float ) } } ;
1590 { $class-description
1591 Represents a RGBA (32bit) image in Raylib.
1592 Data is always stored in main memory. }
1595 { "data" { $link void* } "Image raw data" }
1596 { "width" { $link int } "Image base width" }
1597 { "height" { $link int } "Image base height" }
1598 { "mipmaps" { $link int } "Mipmap levels, 1 by default" }
1599 { "format" { $link PixelFormat } "Data format (PixelFormat type)" }
1603 { $class-description
1604 Represents an texture stored on the GPU. }
1607 { "id" { $link uint } "OpenGL Texture ID" }
1608 { "width" { $link int } "Texture Base Width" }
1609 { "height" { $link int } "Texture Base Height" }
1610 { "mipmaps" { $link int } "Mipmap Levels, 1 by default" }
1611 { "format" { $link PixelFormat } "Data Format (PixelFormat type)" }
1614 HELP: RenderTexture2D
1615 { $class-description
1616 FBO for texture rendering. }
1619 { "id" { $link uint } "OpenGL Framebuffer Object (FBO) id" }
1620 { "texture" { $link Texture2D } "Color buffer attachment texture" }
1621 { "depth" { $link Texture2D } "Depth buffer attachment texture" }
1626 { $class-description
1627 Information about a n-patch tile. }
1630 { "source" { $link Rectangle } "Texture source rectangle" }
1631 { "left" { $link int } "Left border offset" }
1632 { "top" { $link int } "Top border offset" }
1633 { "right" { $link int } "Right border offset" }
1634 { "bottom" { $link int } "Bottom border offset" }
1635 { "layout" { $link int } "Layout of the n-patch: 3x3, 1x3 or 3x1" }
1639 { $class-description
1640 Contains information about the gyphs in a font. }
1643 { "value" { $link int } "Texture source rectangle" }
1644 { "offsetX" { $link int } "Texture source rectangle" }
1645 { "offsetY" { $link int } "Left border offset" }
1646 { "advanceX" { $link int } "Top border offset" }
1647 { "image" { $link Image } "Right border offset" }
1651 { $class-description
1652 Represents a collections of glyphs that can be drawn to the screen.
1653 The fields are defined as followed: }
1656 { { $snippet baseSize } { " the base size of the characters. This is how tall a glyph is." } }
1657 { { $snippet glyphCount } { " the number of glyph characters." } }
1658 { { $snippet glyphPadding } { " the padding around each glyph." } }
1659 { { $snippet texture } { " the texture atlas continaing the glyphs." } }
1660 { { $snippet recs } { " an array of rectangles used to find each glyph in " { $snippet texture } "." } }
1661 { { $snippet glyphs } { " metadata about each glyph." } }
1665 { $class-description
1666 Represents a camera in 3D space. The fields are defined as followed: }
1669 { { $snippet position } " is the camera position in 3D space." }
1670 { { $snippet target } " is the target the camera is looking at." }
1671 { { $snippet up } " is the direction that faces up relative to the camera." }
1672 { { $snippet fovy } " is the camera's field of view aperature in degrees. Used as the near-plane for orthogrphic projections." }
1673 { { $snippet projection } " is the camera's projection:" { $link CAMERA_PERSPECTIVE } " or " { $link CAMERA_ORTHOGRAPHIC } }
1677 { $class-description
1678 Represents a camera in 2D space. The fields are defined
1682 { { $snippet offset } " is the camera offset (dispacement from target)" }
1683 { { $snippet target } " is the camera target (rotation and zoom origin)." }
1684 { { $snippet rotation } " is the camera rotation in degrees." }
1685 { { $snippet zoom } " is the camera zoom/scalling, should be 1.0f by default." } } ;
1689 A c-typedef alias for \ Camera3D .
1693 { $class-description
1694 Holds the vertex data and VAO/VBO for a 3D mesh. }
1698 { "vertexCount" { $link int } "Number of vertices stored in arrays" }
1699 { "triangleCount" { $link int } "Number of triangles stored (indexed or not)" }
1700 { "_vertices" { { $link float } { $snippet "*" } } "Vertex position (XYZ - 3 components per vertex)" }
1701 { "_texcoords" { { $link float } { $snippet "*" } } "Vertex texture coordinates (UV - 2 components per vertex)" }
1702 { "_texcoords2" { { $link float } { $snippet "*" } } "Vertex second texture coordinates (useful for lightmaps)" }
1703 { "_normals" { { $link float } { $snippet "*" } } "Vertex normals (XYZ - 3 components per vertex)" }
1704 { "tangents" { { $link float } { $snippet "*" } } "Vertex tangents (XYZW - 4 components per vertex)" }
1705 { "colors" { { $link uchar } { $snippet "*" } } "Vertex colors (RGBA - 4 components per vertex)" }
1706 { "indices" { { $link ushort } { $snippet "*" } } "Vertex indices (in case vertex data comes indexed)" }
1708 { "animVertices" { { $link float } { $snippet "*" } } "Animated vertex positions (after bones transformations)" }
1709 { "animNormals" { { $link float } { $snippet "*" } } "Animated normals (after bones transformation)" }
1710 { "boneIds" { { $link uchar } { $snippet "*" } } "Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skining)" }
1711 { "boneWeights" { { $link float } { $snippet "*" } } "Vertex bone weight, up to 4 bones influence by vertex (skinning)" }
1713 { "vaoId" { $link uint } "OpenGL Vertex Array Object id" }
1714 { "vboId" { { $link uint } { $snippet "*" } } "OpenGL Vertex Buffer Objects id (7 types of vertex data)" } } ;
1718 { $class-description
1719 Represents a graphics shader in Raylib. The size of
1720 { $snippet locs } depends on { $snippet MAX_SHADER_LOCATIONS } .
1723 { $snippet MAX_SHADER_LOCATIONS } is set when raylib is compiled
1724 to a shared library. This cannot be changed from Factor. } }
1727 { "id" { $link uint } "Shader program id" }
1728 { "locs" { { $link int } { $snippet "*" } } "Shader locations array" } } ;
1735 { "texture" { $link Texture2D } "Material map Texture" }
1736 { "color" { $link Color } "Material map color" }
1737 { "value" { $link float } "Material map value" } } ;
1743 { "shader" { $link Shader } "Material shader" }
1744 { "_maps" { { $link MaterialMap } { $snippet "*" } } "Material maps. Uses MAX_MATERIAL_MAPS." }
1745 { "params" { { $link float } { $snippet "[4]" } } "Material generic parameters (if required)" } } ;
1748 { $class-description
1749 Represents a 3D vertex transformation. }
1752 { "translation" { $link Vector3 } }
1753 { "rotation" { $link Quaternion } }
1754 { "scale" { $link Vector3 } } } ;
1758 { $class-description
1759 A skeletal animation bone. }
1762 { { $snippet name } " is the name of the bone. Max 32 characters." }
1763 { { $snippet processor } " the parent index." } } ;
1766 { $class-description
1767 Meshes, materials and animation data }
1770 { "transform" { $link Matrix } "Local transform matrix." }
1771 { "meshCount" { $link int } "Number of meshes." }
1772 { "materialCount" { $link int } "Number of materials." }
1773 { "_meshes" { { $link void } { $snippet "*" } } "Meshes array." }
1774 { "_materials" { { $link void } { $snippet "*" } } "Materials array." }
1775 { "meshMaterial" { { $link int } { $snippet "*" } } "Mesh material number." }
1776 { "boneCount" { $link int } "Number of bones." }
1777 { "_bones" { { $link void } { $snippet "*" } } "Bones information (skeleton)." }
1778 { "bindPose" { { $link void } { $snippet "*" } } "Bones base transformation (pose)." } } ;
1781 HELP: ModelAnimation
1782 { $class-description
1783 Represents information about a animation for a 3D model. }
1786 { "boneCount" { $link int } "Number of bones." }
1787 { "frameCount" { $link int } "Numbero f animation frames." }
1788 { "_bones" { { $link BoneInfo } { $snippet "**" } } "Bones information (skeleton)." }
1789 { "framePoses" { { $link Transform } { $snippet "**" } } "Poses array by frame" } } ;
1793 { $class-description
1794 Represents a ray casted across 3D space. }
1797 { "position" { $link Vector3 } "Ray position (origin)" }
1798 { "direction" { $link Vector3 } "Ray direction" } } ;
1801 { $class-description
1802 Represents collision information from a Ray. }
1805 { "hit" { $link bool } "Did the ray hit something?" }
1806 { "distance" { $link float } "Distance to nearest hit" }
1807 { "point" { $link Vector3 } "Point of nearest hit" }
1808 { "normal" { $link Vector3 } "Surface normal of hit" } } ;
1811 { $class-description
1812 Represents a 3D bounding box defined by two points: }
1815 { { $snippet min } " The minimum vertex box-corner." }
1816 { { $snippet max } " The maxium vertex box-corner." }
1820 { $class-description
1824 { "frameCount" { $link uint } "Total number of frames (considering channels)" }
1825 { "sampleRate" { $link uint } "Frequency (samples per second)" }
1826 { "sampleSize" { $link uint } "Bit depth (bits per sample): 8,16,32" }
1827 { "channels" { $link uint } "Number of channels (1-mono, 2-stereo)" }
1828 { "data" { $link void* } "Buffer data pointer" } } ;
1831 { $class-description
1832 Represents a stream of audio data in Raylib. }
1835 { { $snippet buffer } " a pointer to the internal data used by the audio system." }
1836 { { $snippet processor } " a pointer to the interanl data processor, useful for audio effects." }
1837 { { $snippet sampleRate } " the frequence of the samples." }
1838 { { $snippet sampleSize } " the bit depth of the samples: spport values are 8, 16, and 32." }
1839 { { $snippet channels } " the number of channels: 1 for mono, 2 for stereo." }
1846 { "stream" { $link AudioStream } "Audio stream" }
1847 { "frameCount" { $link uint } "Total number of frames (considering channels)" } } ;
1850 { $class-description
1851 Audio stream, anything longer than ~10 seconds should be streamed. }
1854 { "stream" { $link AudioStream } "Audio stream" }
1855 { "frameCount" { $link uint } "Total number of frames (considering channels)" }
1856 { "looping" { $link bool } "Music looping enable" }
1857 { "ctxType" { $link int } "Type of music context (audio filetype)" }
1858 { "ctxData" { $link void* } "Audio context data, depends on type" } } ;
1861 { $class-description
1862 Hold the configuation for a VR device. }
1865 { "hResolution" { $link int } "HMD horizontal resolution in pixels" }
1866 { "vResolution" { $link int } "HMD verticle resolution in pixels" }
1867 { "hScreenSize" { $link float } "HMD horizontal size in meters" }
1868 { "vScreenSize" { $link float } "HMD verticle size in meters" }
1869 { "vScreenCenter" { $link float } "HMD screen center in meters" }
1870 { "eyeToScreenDistance" { $link float } "HMD distance between eye and display in meters" }
1871 { "lensSeparationDistance" { $link float } "HMD lens separation distance in meters" }
1872 { "interpupillaryDistance" { $link float } "HMD IPD in meters" }
1873 { "lensDistortionValues" { { $link float } { $snippet "[4]" } } "HMD lens distortion constant parameters" }
1874 { "chromaAbCorrection" { { $link float } { $snippet "[4]" } } "HMD chromatic abberation correction parameters" } } ;
1876 HELP: VrStereoConfig
1877 { $class-description
1878 VR stereo rendering configuration for simulator. }
1881 { "projection" { { $link Matrix } { $snippet [2] } "VR projection matrices (per eye)" } }
1882 { "viewOffset" { { $link Matrix } { $snippet [2] } "VR view offset matrices (per eye)" } }
1883 { "leftLensCenter" { { $link float } { $snippet [2] } "VR left lens center" } }
1884 { "rightLensCenter" { { $link float } { $snippet [2] } "VR right lens center" } }
1885 { "leftScreenCenter" { { $link float } { $snippet [2] } "VR left screen center" } }
1886 { "rightScreenCenter" { { $link float } { $snippet [2] } "VR right screen center" } }
1887 { "scale" { { $link float } { $snippet [2] } "VR distortion scale" } }
1888 { "scaleIn" { { $link float } { $snippet [2] } "VR distortion scale in" } }
1892 { $class-description
1893 A list of file paths returned from \ load-directory-files ,
1894 \ load-directory-files-ex . Must be freed with
1895 \ unload-directory-files . }
1899 { { $snippet capacity } " the max number of entries." }
1900 { { $snippet count } " the number of entries found." }
1901 { { $snippet paths } " array of string where each member is a file path." }
1905 load-directory-files
1906 load-directory-files-ex
1907 unload-directory-files
1911 HELP: LIGHTGRAY { $raylib-color "200, 200, 200, 255" } ;
1912 HELP: GRAY { $raylib-color "130, 130, 130, 255" } ;
1913 HELP: DARKGRAY { $raylib-color "80, 80, 80, 255" } ;
1914 HELP: YELLOW { $raylib-color "253, 249, 0, 255" } ;
1915 HELP: GOLD { $raylib-color "255, 203, 0, 255" } ;
1916 HELP: ORANGE { $raylib-color "255, 161, 0, 255" } ;
1917 HELP: PINK { $raylib-color "255, 109, 194, 255" } ;
1918 HELP: RED { $raylib-color "230, 41, 55, 255" } ;
1919 HELP: MAROON { $raylib-color "190, 33, 55, 255" } ;
1920 HELP: GREEN { $raylib-color "0, 228, 48, 255" } ;
1921 HELP: LIME { $raylib-color "0, 158, 47, 255" } ;
1922 HELP: DARKGREEN { $raylib-color "0, 117, 44, 255" } ;
1923 HELP: SKYBLUE { $raylib-color "102, 191, 255, 255" } ;
1924 HELP: BLUE { $raylib-color "0, 121, 241, 255" } ;
1925 HELP: DARKBLUE { $raylib-color "0, 82, 172, 255" } ;
1926 HELP: PURPLE { $raylib-color "200, 122, 255, 255" } ;
1927 HELP: VIOLET { $raylib-color "135, 60, 190, 255 " } ;
1928 HELP: DARKPURPLE { $raylib-color "112, 31, 126, 255 " } ;
1929 HELP: BEIGE { $raylib-color "211, 176, 131, 255" } ;
1930 HELP: BROWN { $raylib-color "127, 106, 79, 255 " } ;
1931 HELP: DARKBROWN { $raylib-color "76, 63, 47, 255" } ;
1933 HELP: WHITE { $raylib-color "255, 255, 255, 255" } ;
1934 HELP: BLACK { $raylib-color "0, 0, 0, 255" } ;
1935 HELP: BLANK { $raylib-color "0, 0, 0, 0" } ;
1936 HELP: MAGENTA { $raylib-color "255, 0, 255, 255" } ;
1937 HELP: RAYWHITE { $raylib-color "245, 245, 245, 255" } ;
1939 ! Window-related functions
1946 "Initialize window and OpenGL context" } ;
1948 HELP: window-should-close
1952 "Check if KEY_ESCAPE pressed or Close icon pressed" } ;
1956 "Close window and unload OpenGL context" } ;
1958 HELP: is-window-ready
1962 "Check if window has been initialized successfully" } ;
1964 HELP: is-window-fullscreen
1968 "Check if window is currently fullscreen" } ;
1970 HELP: is-window-hidden
1974 "Check if window is currently hidden (only PLATFORM_DESKTOP)" } ;
1976 HELP: is-window-minimized
1980 "Check if window is currently minimized (only PLATFORM_DESKTOP)" } ;
1982 HELP: is-window-maximized
1986 "Check if window is currently maximized (only PLATFORM_DESKTOP)" } ;
1988 HELP: is-window-focused
1992 "Check if window is currently focused (only PLATFORM_DESKTOP)" } ;
1994 HELP: is-window-resized
1998 "Check if window has been resized last frame" } ;
2000 HELP: is-window-state
2006 "Check if one specific window flag is enabled" } ;
2008 HELP: set-window-state
2012 "Set window configuration state using flags" } ;
2014 HELP: clear-window-state
2018 "Clear window configuration state flags" } ;
2020 HELP: toggle-fullscreen
2022 "Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)" } ;
2024 HELP: maximize-window
2026 "Set window state: maximized, if resizable (only PLATFORM_DESKTOP)" } ;
2028 HELP: minimize-window
2030 "Set window state: minimized, if resizable (only PLATFORM_DESKTOP)" } ;
2032 HELP: restore-window
2034 "Set window state: not minimized/maximized (only PLATFORM_DESKTOP)" } ;
2036 HELP: set-window-icon
2040 "Set icon for window (only PLATFORM_DESKTOP)" } ;
2042 HELP: set-window-icons
2044 images: { "a " { $link pointer } " to an array of " { $link Image } }
2047 HELP: set-window-title
2051 "Set title for window (only PLATFORM_DESKTOP)" } ;
2053 HELP: set-window-position
2058 "Set window position on screen (only PLATFORM_DESKTOP)" } ;
2060 HELP: set-window-monitor
2064 "Set monitor for the current window (fullscreen mode)" } ;
2066 HELP: set-window-min-size
2071 "Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)" } ;
2073 HELP: set-window-size
2078 "Set window dimensions" } ;
2080 HELP: set-window-opacity
2084 "Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)" } ;
2086 HELP: get-window-handle
2090 "Get native window handle" } ;
2092 HELP: get-screen-width
2096 "Get current screen width" } ;
2098 HELP: get-screen-height
2102 "Get current screen height" } ;
2104 HELP: get-render-width
2108 "Get current render width (it considers HiDPI)" } ;
2110 HELP: get-render-height
2114 "Get current render height (it considers HiDPI)" } ;
2116 HELP: get-monitor-count
2120 "Get number of connected monitors" } ;
2122 HELP: get-current-monitor
2126 "Get current connected monitor" } ;
2128 HELP: get-monitor-position
2133 "Get specified monitor position" } ;
2135 HELP: get-monitor-width
2140 "Get specified monitor width (max available by monitor)" } ;
2142 HELP: get-monitor-height
2147 "Get specified monitor height (max available by monitor)" } ;
2149 HELP: get-monitor-physical-width
2154 "Get specified monitor physical width in millimetres" } ;
2156 HELP: get-monitor-physical-height
2161 "Get specified monitor physical height in millimetres" } ;
2163 HELP: get-monitor-refresh-rate
2168 "Get specified monitor refresh rate" } ;
2170 HELP: get-window-position
2174 "Get window position XY on monitor" } ;
2176 HELP: get-window-scale-dpi
2180 "Get window scale DPI factor" } ;
2182 HELP: get-monitor-name
2185 c-string: c-string }
2187 "Get the human-readable, UTF-8 encoded name of the primary monitor" } ;
2189 HELP: set-clipboard-text
2193 "Set clipboard text content" } ;
2195 HELP: get-clipboard-text
2197 c-string: c-string }
2199 "Get clipboard text content" } ;
2201 HELP: enable-event-waiting
2203 "Enable waiting for events on EndDrawing(), no automatic event polling" } ;
2205 HELP: disable-event-waiting
2207 "Disable waiting for events on EndDrawing(), automatic events polling" } ;
2210 ! Custom frame control functions
2211 HELP: swap-screen-buffer
2213 "Swap back buffer with front buffer (screen drawing)"
2216 "Those functions are intended for advance users that want"
2217 " full control over the frame processing. By default"
2218 " EndDrawing() does this job: \n\t- draws everything"
2219 "\n\t- " { $link swap-screen-buffer }
2220 "\n\t- manage frame timming"
2221 "\n\t- " { $link poll-input-events } ".\n"
2222 "To avoid that behavior and control frame processes manually,"
2223 " enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL" } } ;
2225 HELP: poll-input-events
2227 "Register all input events"
2230 "Those functions are intended for advance users that want"
2231 " full control over the frame processing. By default"
2232 " EndDrawing() does this job: \n\t- draws everything"
2233 "\n\t- " { $link swap-screen-buffer }
2234 "\n\t- manage frame timming"
2235 "\n\t- " { $link poll-input-events } ".\n"
2236 "To avoid that behavior and control frame processes manually,"
2237 " enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL" } } ;
2243 "Wait for some milliseconds (halt program execution)"
2246 "Those functions are intended for advance users that want"
2247 " full control over the frame processing. By default"
2248 " EndDrawing() does this job: \n\t- draws everything"
2249 "\n\t- " { $link swap-screen-buffer }
2250 "\n\t- manage frame timming"
2251 "\n\t- " { $link poll-input-events } ".\n"
2252 "To avoid that behavior and control frame processes manually,"
2253 " enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL" } } ;
2256 ! Cursor-related functions
2265 HELP: is-cursor-hidden
2269 "Check if cursor is not visible" } ;
2273 "Enables cursor (unlock cursor)" } ;
2275 HELP: disable-cursor
2277 "Disables cursor (lock cursor)" } ;
2279 HELP: is-cursor-on-screen
2283 "Check if cursor is on the screen" } ;
2286 ! Drawing-related functions
2287 HELP: clear-background
2291 "Set background color (framebuffer clear color)" } ;
2295 "Setup canvas (framebuffer) to start drawing" } ;
2299 "End canvas drawing and swap buffers (double buffering)" } ;
2305 "Begin 2D mode with custom camera (2D)" } ;
2309 "Ends 2D mode with custom camera" } ;
2315 "Begin 3D mode with custom camera (3D)" } ;
2319 "Ends 3D mode and returns to default 2D orthographic mode" } ;
2321 HELP: begin-texture-mode
2323 target: RenderTexture2D }
2325 "Begin drawing to render texture" } ;
2327 HELP: end-texture-mode
2329 "Ends drawing to render texture" } ;
2331 HELP: begin-shader-mode
2335 "Begin custom shader drawing" } ;
2337 HELP: end-shader-mode
2339 "End custom shader drawing (use default shader)" } ;
2341 HELP: begin-blend-mode
2345 "Begin blending mode (alpha, additive, multiplied, subtract, custom)" } ;
2347 HELP: end-blend-mode
2349 "End blending mode (reset to default: alpha blending)" } ;
2351 HELP: begin-scissor-mode
2358 "Begin scissor mode (define screen area for following drawing)" } ;
2360 HELP: end-scissor-mode
2362 "End scissor mode" } ;
2364 HELP: begin-vr-stereo-mode
2366 config: VrStereoConfig }
2368 "Begin stereo rendering (requires VR simulator)" } ;
2370 HELP: end-vr-stereo-mode
2372 "End stereo rendering (requires VR simulator)" } ;
2375 ! VR stereo config functions for VR simulator
2376 HELP: load-vr-stereo-config
2378 device: VrDeviceInfo
2379 VrStereoConfig: VrStereoConfig }
2381 "Load VR stereo config for VR simulator device parameters" } ;
2383 HELP: unload-vr-stereo-config
2385 config: VrStereoConfig }
2387 "Unload VR stereo config" } ;
2390 ! Shader management functions
2393 vsFileName: c-string
2394 fsFileName: c-string
2397 "Load shader from files and bind default locations"
2400 "Shader functionality is not available on OpenGL 1.1" } } ;
2402 HELP: load-shader-from-memory
2408 "Load shader from code strings and bind default locations"
2410 "Shader functionality is not available on OpenGL 1.1" } } ;
2412 HELP: is-shader-ready
2417 "Check if a shader is ready"
2419 "Shader functionality is not available on OpenGL 1.1" } } ;
2421 HELP: get-shader-location
2424 uniformName: c-string
2427 "Get shader uniform location"
2429 "Shader functionality is not available on OpenGL 1.1" } } ;
2431 HELP: get-shader-location-attrib
2434 attribName: c-string
2437 "Get shader attribute location"
2439 "Shader functionality is not available on OpenGL 1.1" } } ;
2441 HELP: set-shader-value
2446 uniformType: ShaderUniformDataType }
2448 "Set shader uniform value"
2450 "Shader functionality is not available on OpenGL 1.1" } } ;
2452 HELP: set-shader-value-v
2457 uniformType: ShaderUniformDataType
2460 "Set shader uniform value vector"
2462 "Shader functionality is not available on OpenGL 1.1" } } ;
2464 HELP: set-shader-value-matrix
2470 "Set shader uniform value (matrix 4x4)"
2472 "Shader functionality is not available on OpenGL 1.1" } } ;
2474 HELP: set-shader-value-texture
2478 texture: Texture2D }
2480 "Set shader uniform value for texture (sampler2d)"
2482 "Shader functionality is not available on OpenGL 1.1" } } ;
2488 "Unload shader from GPU memory (VRAM)"
2490 "Shader functionality is not available on OpenGL 1.1" } } ;
2493 ! Screen-space-related functions
2496 mousePosition: Vector2
2500 "Get a ray trace from mouse position" } ;
2502 HELP: get-camera-matrix
2507 "Get camera transform matrix (view matrix)" } ;
2509 HELP: get-camera-matrix-2d
2514 "Get camera 2d transform matrix" } ;
2516 HELP: get-world-to-screen
2522 "Get the screen space position for a 3d world space position" } ;
2524 HELP: get-world-to-screen-2d
2530 "Get the screen space position for a 2d camera world space position" } ;
2532 HELP: get-world-to-screen-ex
2540 "Get size position for a 3d world space position" } ;
2542 HELP: get-screen-to-world-2d
2548 "Get the world space position for a 2d camera screen space position" } ;
2551 ! Timing-related functions
2552 HELP: set-target-fps
2556 "Set target FPS (maximum)" } ;
2562 "Get current FPS" } ;
2564 HELP: get-frame-time
2568 "Get time in seconds for last frame drawn (delta time)" } ;
2574 "Get elapsed time in seconds since InitWindow()" } ;
2578 HELP: get-random-value
2584 "Get a random value between min and max (both included)" } ;
2586 HELP: set-random-seed
2590 "Set the seed for the random number generator" } ;
2592 HELP: take-screenshot
2594 fileName: c-string }
2596 "Takes a screenshot of current screen (filename extension defines format)" } ;
2598 HELP: set-config-flags
2602 "Setup init configuration flags (view FLAGS)" } ;
2604 HELP: set-trace-log-level
2608 "Set the current threshold (minimum) log level" } ;
2615 "Internal memory allocator" } ;
2623 "Internal memory reallocator" } ;
2629 "Internal memory free" } ;
2636 "Open URL with default system browser (if available)" } ;
2639 ! Files management functions
2640 HELP: load-file-data
2643 bytesRead: { "a " { $link pointer } " to a " { $link uint } }
2644 c-string: c-string }
2646 "Load file data as byte array (read)" } ;
2648 HELP: unload-file-data
2652 "Unload file data allocated by LoadFileData()" } ;
2654 HELP: save-file-data
2661 "Save data to file from byte array (write), returns true on success" } ;
2663 HELP: export-data-as-code
2665 data: { "a " { $link pointer } " to a " { $link uchar } }
2670 "Export data to code (.h), returns true on success" } ;
2672 HELP: load-file-text
2675 c-string: c-string }
2677 "Load text data from file (read), returns a '\0' terminated string" } ;
2679 HELP: unload-file-text
2683 "Unload file text data allocated by LoadFileText()" } ;
2685 HELP: save-file-text
2691 "Save text data to file (write), string must be '\0' terminated, returns true on success" } ;
2698 "Check if file exists" } ;
2700 HELP: directory-exists
2705 "Check if a directory path exists" } ;
2707 HELP: is-file-extension
2713 "Check file extension (including point: .png, .wav)" } ;
2715 HELP: get-file-length
2720 "Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)" } ;
2722 HELP: get-file-extension
2725 c-string: c-string }
2727 "Get pointer to extension for a filename string (includes dot: '.png')" } ;
2732 c-string: c-string }
2734 "Get pointer to filename for a path string" } ;
2736 HELP: get-file-name-without-ext
2739 c-string: c-string }
2741 "Get filename string without extension (uses static string)" } ;
2743 HELP: get-directory-path
2746 c-string: c-string }
2748 "Get full path for a given fileName with path (uses static string)" } ;
2750 HELP: get-prev-directory-path
2753 c-string: c-string }
2755 "Get previous directory path for a given path (uses static string)" } ;
2757 HELP: get-working-directory
2759 c-string: c-string }
2761 "Get current working directory (uses static string)" } ;
2763 HELP: get-application-directory
2765 c-string: c-string }
2767 "Get the directory if the running application (uses static string)" } ;
2769 HELP: change-directory
2774 "Change working directory, return true on success" } ;
2781 "Check if a given path is a file or a directory" } ;
2783 HELP: load-directory-files
2786 FilePathList: FilePathList }
2788 "Get filenames in a directory path (memory should be freed)" } ;
2790 HELP: load-directory-files-ex
2795 FilePathList: FilePathList }
2797 "Get filenames in a directory path (memory should be freed)" } ;
2799 HELP: unload-directory-files
2801 files: FilePathList }
2803 "Clear directory files paths buffers (free memory)" } ;
2805 HELP: is-file-dropped
2809 "Check if a file has been dropped into window" } ;
2811 HELP: load-dropped-files
2813 FilePathList: FilePathList }
2815 "Get dropped files names (memory should be freed)" } ;
2817 HELP: unload-dropped-files
2819 files: FilePathList }
2821 "Clear dropped files paths buffer (free memory)" } ;
2823 HELP: get-file-mod-time
2828 "Get file modification time (last write time)" } ;
2831 ! Compression/Encoding functionality
2834 data: { "a " { $link pointer } " to a " { $link uchar } }
2836 compDataLength: { "a " { $link pointer } " to a " { $link int } }
2837 uchar*: { "a" { $link pointer } " to a " { $link uchar } } }
2839 "Compress data (DEFLATE algorithm)" } ;
2841 HELP: decompress-data
2843 compData: { "a " { $link pointer } " to a " { $link uchar } }
2845 dataLength: { "a " { $link pointer } " to a " { $link int } }
2846 uchar*: { "a" { $link pointer } " to a " { $link uchar } } }
2848 "Decompress data (DEFLATE algorithm)" } ;
2850 HELP: encode-data-base64
2852 data: { "a " { $link pointer } " to a " { $link uchar } }
2854 outputLength: { "a " { $link pointer } " to a " { $link int } }
2855 c-string: c-string }
2857 "Encode data to Base64 string" } ;
2859 HELP: decode-data-base64
2861 data: { "a " { $link pointer } " to a " { $link uchar } }
2862 outputLength: { "a " { $link pointer } " to a " { $link int } }
2863 uchar*: { "a" { $link pointer } " to a " { $link uchar } } }
2865 "Decode Base64 string data" } ;
2868 ! Input-related functions: keyboard
2869 HELP: is-key-pressed
2874 "Check if a key has been pressed once" } ;
2881 "Check if a key is being pressed" } ;
2883 HELP: is-key-released
2888 "Check if a key has been released once" } ;
2895 "Check if a key is NOT being pressed" } ;
2901 "Set a custom key to exit program (default is ESC)" } ;
2903 HELP: get-key-pressed
2905 KeyboardKey: KeyboardKey }
2907 "Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty" } ;
2909 HELP: get-char-pressed
2913 "Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty" } ;
2916 ! Input-related functions: gamepads
2917 HELP: is-gamepad-available
2922 "Check if a gamepad is available" } ;
2924 HELP: get-gamepad-name
2927 c-string: c-string }
2929 "Get gamepad internal name id" } ;
2931 HELP: is-gamepad-button-pressed
2934 button: GamepadButton
2937 "Check if a gamepad button has been pressed once" } ;
2939 HELP: is-gamepad-button-down
2942 button: GamepadButton
2945 "Check if a gamepad button is being pressed" } ;
2947 HELP: is-gamepad-button-released
2950 button: GamepadButton
2953 "Check if a gamepad button has been released once" } ;
2955 HELP: is-gamepad-button-up
2958 button: GamepadButton
2961 "Check if a gamepad button is NOT being pressed" } ;
2963 HELP: get-gamepad-button-pressed
2967 "Get the last gamepad button pressed" } ;
2969 HELP: get-gamepad-axis-count
2974 "Get gamepad axis count for a gamepad" } ;
2976 HELP: get-gamepad-axis-movement
2982 "Get axis movement value for a gamepad axis" } ;
2984 HELP: set-gamepad-mappings
2989 "Set internal gamepad mappings (SDL_GameControllerDB)" } ;
2992 ! Input-related functions: mouse
2993 HELP: is-mouse-button-pressed
2998 "Check if a mouse button has been pressed once" } ;
3000 HELP: is-mouse-button-down
3005 "Check if a mouse button is being pressed" } ;
3007 HELP: is-mouse-button-released
3012 "Check if a mouse button has been released once" } ;
3014 HELP: is-mouse-button-up
3019 "Check if a mouse button is NOT being pressed" } ;
3025 "Get mouse position X" } ;
3031 "Get mouse position Y" } ;
3033 HELP: get-mouse-position
3037 "Get mouse position XY" } ;
3039 HELP: get-mouse-delta
3043 "Get mouse delta between frames" } ;
3045 HELP: set-mouse-position
3050 "Set mouse position XY" } ;
3052 HELP: set-mouse-offset
3057 "Set mouse offset" } ;
3059 HELP: set-mouse-scale
3064 "Set mouse scaling" } ;
3066 HELP: get-mouse-wheel-move
3070 "Get mouse wheel movement Y" } ;
3072 HELP: get-mouse-wheel-move-v
3076 "Get mouse wheel movement for both X and Y" } ;
3078 HELP: set-mouse-cursor
3080 cursor: MouseCursor }
3082 "Set mouse cursor" } ;
3085 ! Input-related functions: touch
3090 "Get touch position X for touch point 0 (relative to screen size)" } ;
3096 "Get touch position Y for touch point 0 (relative to screen size)" } ;
3098 HELP: get-touch-position
3103 "Get touch position XY for a touch point index (relative to screen size)" } ;
3105 HELP: get-touch-point-id
3110 "Get touch point identifier for given index" } ;
3112 HELP: get-touch-point-count
3116 "Get number of touch points" } ;
3119 ! ------------------------------------------------------------------------------------
3120 ! Gestures and Touch Handling Functions (Module: rgestures)
3121 ! ------------------------------------------------------------------------------------
3122 HELP: set-gestures-enabled
3126 "Enable a set of gestures using flags" } ;
3128 HELP: is-gesture-detected
3133 "Check if a gesture have been detected" } ;
3135 HELP: get-gesture-detected
3139 "Get latest detected gesture" } ;
3141 HELP: get-gesture-hold-duration
3145 "Get gesture hold time in milliseconds" } ;
3147 HELP: get-gesture-drag-vector
3151 "Get gesture drag vector" } ;
3153 HELP: get-gesture-drag-angle
3157 "Get gesture drag angle" } ;
3159 HELP: get-gesture-pinch-vector
3163 "Get gesture pinch delta" } ;
3165 HELP: get-gesture-pinch-angle
3169 "Get gesture pinch angle" } ;
3172 ! ------------------------------------------------------------------------------------
3173 ! Camera System Functions (Module: rcamera)
3174 ! ------------------------------------------------------------------------------------
3178 camera: { "a " { $link pointer } " to a " { $link Camera } }
3181 "Update camera position for selected mode" } ;
3183 HELP: update-camera-pro
3185 camera: { "a " { $link pointer } " to a " { $link Camera } }
3190 "Update camera movement/rotation" } ;
3192 HELP: set-shapes-texture
3198 "Set texture and rectangle to be used on shapes drawing" } ;
3201 ! Basic shapes drawing functions
3215 "Draw a pixel (Vector version)" } ;
3233 "Draw a line (Vector version)" } ;
3242 "Draw a line defining thickness" } ;
3244 HELP: draw-line-bezier
3251 "Draw a line using cubic-bezier curves in-out" } ;
3253 HELP: draw-line-bezier-quad
3261 "Draw line using quadratic bezier curves with a control point" } ;
3263 HELP: draw-line-bezier-cubic
3267 startControlPos: Vector2
3268 endControlPos: Vector2
3272 "Draw line using cubic bezier curves with 2 control points" } ;
3274 HELP: draw-line-strip
3276 points: { "a " { $link pointer } " to a " { $link Vector2 } }
3280 "Draw lines sequence" } ;
3289 "Draw a color-filled circle" } ;
3291 HELP: draw-circle-sector
3300 "Draw a piece of a circle" } ;
3302 HELP: draw-circle-sector-lines
3311 "Draw circle sector outline" } ;
3313 HELP: draw-circle-gradient
3321 "Draw a gradient-filled circle" } ;
3329 "Draw a color-filled circle (Vector version)" } ;
3331 HELP: draw-circle-lines
3338 "Draw circle outline" } ;
3350 HELP: draw-ellipse-lines
3358 "Draw ellipse outline" } ;
3372 HELP: draw-ring-lines
3382 "Draw ring outline" } ;
3384 HELP: draw-rectangle
3392 "Draw a color-filled rectangle" } ;
3394 HELP: draw-rectangle-v
3400 "Draw a color-filled rectangle (Vector version)" } ;
3402 HELP: draw-rectangle-rec
3407 "Draw a color-filled rectangle" } ;
3409 HELP: draw-rectangle-pro
3416 "Draw a color-filled rectangle with pro parameters" } ;
3418 HELP: draw-rectangle-gradient-v
3427 "Draw a vertical-gradient-filled rectangle" } ;
3429 HELP: draw-rectangle-gradient-h
3438 "Draw a horizontal-gradient-filled rectangle" } ;
3440 HELP: draw-rectangle-gradient-ex
3448 "Draw a gradient-filled rectangle with custom vertex colors" } ;
3450 HELP: draw-rectangle-lines
3458 "Draw rectangle outline" } ;
3460 HELP: draw-rectangle-lines-ex
3466 "Draw rectangle outline with extended parameters" } ;
3468 HELP: draw-rectangle-rounded
3475 "Draw rectangle with rounded edges" } ;
3477 HELP: draw-rectangle-rounded-lines
3485 "Draw rectangle with rounded edges outline" } ;
3494 "Draw a color-filled triangle (vertex in counter-clockwise order!)" } ;
3496 HELP: draw-triangle-lines
3503 "Draw triangle outline (vertex in counter-clockwise order!)" } ;
3505 HELP: draw-triangle-fan
3507 points: { "a " { $link pointer } " to a " { $link Vector2 } }
3511 "Draw a triangle fan defined by points (first vertex is the center)" } ;
3513 HELP: draw-triangle-strip
3515 points: { "a " { $link pointer } " to a " { $link Vector2 } }
3519 "Draw a triangle strip defined by points" } ;
3529 "Draw a regular polygon (Vector version)" } ;
3531 HELP: draw-poly-lines
3539 "Draw a polygon outline of n sides" } ;
3541 HELP: draw-poly-lines-ex
3550 "Draw a polygon outline of n sides with extended parameters" } ;
3553 ! Basic shapes collision detection functions
3554 HELP: check-collision-recs
3560 "Check collision between two rectangles" } ;
3562 HELP: check-collision-circles
3570 "Check collision between two circles" } ;
3572 HELP: check-collision-circle-rec
3579 "Check collision between circle and rectangle" } ;
3581 HELP: check-collision-point-rec
3587 "Check if point is inside rectangle" } ;
3589 HELP: check-collision-point-circle
3596 "Check if point is inside circle" } ;
3598 HELP: check-collision-point-triangle
3606 "Check if point is inside a triangle" } ;
3608 HELP: check-collision-point-poly
3611 points: { "a " { $link pointer } " to a " { $link Vector2 } }
3615 "Check if point is within a polygon described by array of vertices" } ;
3617 HELP: check-collision-lines
3623 collisionPoint: { "a " { $link pointer } " to a " { $link Vector2 } }
3626 "Check the collision between two lines defined by two points each, returns collision point by reference" } ;
3628 HELP: check-collision-point-line
3636 "Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]" } ;
3638 HELP: get-collision-rec
3642 Rectangle Rectangle }
3644 "Get collision rectangle for two rectangles collision" } ;
3646 ! Image loading functions
3652 "Load image from file into CPU memory (RAM). " } ;
3654 HELP: load-image-raw
3663 "Load image from RAW file data." } ;
3665 HELP: load-image-anim
3668 frames: { "a " { $link pointer } " to a " { $link int } }
3671 "Load image sequence from file (frames appended to image.data)" } ;
3673 HELP: load-image-from-memory
3680 "Load image from memory buffer, fileType refers to extension: i.e. '.png'" } ;
3682 HELP: load-image-from-texture
3687 "Load image from GPU texture data" } ;
3689 HELP: load-image-from-screen
3693 "Load image from screen buffer and (screenshot)" } ;
3695 HELP: is-image-ready
3700 "Check if an image is ready" } ;
3706 "Unload image from CPU memory (RAM)" } ;
3714 "Export image data to file, returns true on success" } ;
3716 HELP: export-image-as-code
3722 "Export image as code file defining an array of bytes, returns true on success" } ;
3725 ! Image generation functions
3726 HELP: gen-image-color
3733 "Generate image: plain color" } ;
3735 HELP: gen-image-gradient-v
3743 "Generate image: vertical gradient" } ;
3745 HELP: gen-image-gradient-h
3753 "Generate image: horizontal gradient" } ;
3755 HELP: gen-image-gradient-radial
3764 "Generate image: radial gradient" } ;
3766 HELP: gen-image-checked
3776 "Generate image: checked" } ;
3778 HELP: gen-image-white-noise
3785 "Generate image: white noise" } ;
3787 HELP: gen-image-perlin-noise
3796 "Generate image: perlin noise" } ;
3798 HELP: gen-image-cellular
3805 "Generate image: cellular algorithm, bigger tileSize means bigger cells" } ;
3807 HELP: gen-image-text
3814 "Generate image: text" } ;
3817 ! Image manipulation functions
3823 "Create an image duplicate (useful for transformations)" } ;
3825 HELP: image-from-image
3831 "Create an image from another image piece" } ;
3840 "Create an image from text (default font)" } ;
3851 "Create an image from text (custom sprite font)" } ;
3855 image: { "a " { $link pointer } " to a " { $link Image } }
3858 "Convert image data to desired format" } ;
3862 image: { "a " { $link pointer } " to a " { $link Image } }
3865 "Convert image to POT (power-of-two)" } ;
3869 image: { "a " { $link pointer } " to a " { $link Image } }
3872 "Crop an image to a defined rectangle" } ;
3874 HELP: image-alpha-crop
3876 image: { "a " { $link pointer } " to a " { $link Image } }
3879 "Crop image depending on alpha value" } ;
3881 HELP: image-alpha-clear
3883 image: { "a " { $link pointer } " to a " { $link Image } }
3887 "Clear alpha channel to desired color" } ;
3889 HELP: image-alpha-mask
3891 image: { "a " { $link pointer } " to a " { $link Image } }
3894 "Apply alpha mask to image" } ;
3896 HELP: image-alpha-premultiply
3898 image: { "a " { $link pointer } " to a " { $link Image } } }
3900 "Premultiply alpha channel" } ;
3902 HELP: image-blur-gaussian
3904 image: { "a " { $link pointer } " to a " { $link Image } }
3907 "Blur image with gaussian" } ;
3911 image: { "a " { $link pointer } " to a " { $link Image } }
3915 "Resize image (Bicubic scaling algorithm)" } ;
3917 HELP: image-resize-nn
3919 image: { "a " { $link pointer } " to a " { $link Image } }
3923 "Resize image (Nearest-Neighbor scaling algorithm)" } ;
3925 HELP: image-resize-canvas
3927 image: { "a " { $link pointer } " to a " { $link Image } }
3934 "Resize canvas and fill with color" } ;
3938 image: { "a " { $link pointer } " to a " { $link Image } } }
3940 "Compute all mipmap levels for a provided image" } ;
3944 image: { "a " { $link pointer } " to a " { $link Image } }
3950 "Dither image data to 16bpp or lower (Floyd-Steinberg dithering)" } ;
3952 HELP: image-flip-vertical
3954 image: { "a " { $link pointer } " to a " { $link Image } } }
3956 "Flip image vertically" } ;
3958 HELP: image-flip-horizontal
3960 image: { "a " { $link pointer } " to a " { $link Image } } }
3962 "Flip image horizontally" } ;
3964 HELP: image-rotate-cw
3966 image: { "a " { $link pointer } " to a " { $link Image } } }
3968 "Rotate image clockwise 90deg" } ;
3970 HELP: image-rotate-ccw
3972 image: { "a " { $link pointer } " to a " { $link Image } } }
3974 "Rotate image counter-clockwise 90deg" } ;
3976 HELP: image-color-tint
3978 image: { "a " { $link pointer } " to a " { $link Image } }
3981 "Modify image color: tint" } ;
3983 HELP: image-color-invert
3985 image: { "a " { $link pointer } " to a " { $link Image } } }
3987 "Modify image color: invert" } ;
3989 HELP: image-color-grayscale
3991 image: { "a " { $link pointer } " to a " { $link Image } } }
3993 "Modify image color: grayscale" } ;
3995 HELP: image-color-contrast
3997 image: { "a " { $link pointer } " to a " { $link Image } }
4000 "Modify image color: contrast (-100 to 100)" } ;
4002 HELP: image-color-brightness
4004 image: { "a " { $link pointer } " to a " { $link Image } }
4007 "Modify image color: brightness (-255 to 255)" } ;
4009 HELP: image-color-replace
4011 image: { "a " { $link pointer } " to a " { $link Image } }
4015 "Modify image color: replace color" } ;
4017 HELP: load-image-colors
4020 Color*: { "a " { $link pointer } " to an array of " { $link Color } "s" } }
4022 "Load color data from image as a Color array (RGBA - 32bit)" } ;
4024 HELP: load-image-palette
4028 colorCount: { "a " { $link pointer } " to a " { $link int } }
4029 Color*: { "a " { $link pointer } " to an array of " { $link Color } "s" } }
4031 "Load colors palette from image as a Color array (RGBA - 32bit)" } ;
4033 HELP: unload-image-colors
4035 colors: { "a " { $link pointer } " to a " { $link Color } } }
4037 "Unload color data loaded with LoadImageColors()" } ;
4039 HELP: unload-image-palette
4041 colors: { "a " { $link pointer } " to a " { $link Color } } }
4043 "Unload colors palette loaded with LoadImagePalette()" } ;
4045 HELP: get-image-alpha-border
4049 Rectangle: Rectangle }
4051 "Get image alpha border rectangle" } ;
4053 HELP: get-image-color
4060 "Get image pixel color at (x, y) position" } ;
4063 ! Image drawing functions
4064 HELP: image-clear-background
4066 dst: { "a " { $link pointer } " to a " { $link Image } }
4069 "Clear image background with given color" } ;
4071 HELP: image-draw-pixel
4073 dst: { "a " { $link pointer } " to a " { $link Image } }
4078 "Draw pixel within an image" } ;
4080 HELP: image-draw-pixel-v
4082 dst: { "a " { $link pointer } " to a " { $link Image } }
4086 "Draw pixel within an image (Vector version)" } ;
4088 HELP: image-draw-line
4090 dst: { "a " { $link pointer } " to a " { $link Image } }
4097 "Draw line within an image" } ;
4099 HELP: image-draw-line-v
4101 dst: { "a " { $link pointer } " to a " { $link Image } }
4106 "Draw line within an image (Vector version)" } ;
4108 HELP: image-draw-circle
4110 dst: { "a " { $link pointer } " to a " { $link Image } }
4116 "Draw circle within an image" } ;
4118 HELP: image-draw-circle-v
4120 dst: { "a " { $link pointer } " to a " { $link Image } }
4125 "Draw circle within an image (Vector version)" } ;
4127 HELP: image-draw-circle-lines
4129 dst: { "a " { $link pointer } " to a " { $link Image } }
4135 "Draw circle within an image" } ;
4137 HELP: image-draw-circle-lines-v
4139 dst: { "a " { $link pointer } " to a " { $link Image } }
4144 "Draw circle within an image (Vector version)" } ;
4146 HELP: image-draw-rectangle
4148 dst: { "a " { $link pointer } " to a " { $link Image } }
4155 "Draw rectangle within an image" } ;
4157 HELP: image-draw-rectangle-v
4159 dst: { "a " { $link pointer } " to a " { $link Image } }
4164 "Draw rectangle within an image (Vector version)" } ;
4166 HELP: image-draw-rectangle-rec
4168 dst: { "a " { $link pointer } " to a " { $link Image } }
4172 "Draw rectangle within an image" } ;
4174 HELP: image-draw-rectangle-lines
4176 dst: { "a " { $link pointer } " to a " { $link Image } }
4181 "Draw rectangle lines within an image" } ;
4185 dst: { "a " { $link pointer } " to a " { $link Image } }
4191 "Draw a source image within a destination image (tint applied to source)" } ;
4193 HELP: image-draw-text
4195 dst: { "a " { $link pointer } " to a " { $link Image } }
4202 "Draw text (using default font) within an image (destination)" } ;
4204 HELP: image-draw-text-ex
4206 dst: { "a " { $link pointer } " to a " { $link Image } }
4214 "Draw text (custom sprite font) within an image (destination)" } ;
4217 ! Texture loading functions
4218 ! NOTE: These functions require GPU access
4222 Texture2D: Texture2D }
4224 "Load texture from file into GPU memory (VRAM)" } ;
4226 HELP: load-texture-from-image
4229 Texture2D: Texture2D }
4231 "Load texture from image data" } ;
4233 HELP: load-texture-cubemap
4236 layout: CubemapLayout
4237 TextureCubemap: TextureCubemap }
4239 "Load cubemap from image, multiple image cubemap layouts supported" } ;
4241 HELP: load-render-texture
4245 RenderTexture2D: RenderTexture2D }
4247 "Load texture for rendering (framebuffer)" } ;
4249 HELP: is-texture-ready
4254 "Check if a texture is ready" } ;
4256 HELP: unload-texture
4258 texture: Texture2D }
4260 "Unload texture from GPU memory (VRAM)" } ;
4262 HELP: is-render-texture-ready
4264 target: RenderTexture2D }
4266 "Check if a render texture is ready" } ;
4268 HELP: unload-render-texture
4270 target: RenderTexture2D }
4272 "Unload render texture from GPU memory (VRAM)" } ;
4274 HELP: update-texture
4279 "Update GPU texture with new data" } ;
4281 HELP: update-texture-rec
4287 "Update GPU texture rectangle with new data" } ;
4290 ! Texture configuration functions
4291 HELP: gen-texture-mipmaps
4293 texture: { "a " { $link pointer } " to a " { $link Texture2D } } }
4295 "Generate GPU mipmaps for a texture" } ;
4297 HELP: set-texture-filter
4300 filter: TextureFilterMode }
4302 "Set texture scaling filter mode" } ;
4304 HELP: set-texture-wrap
4307 wrap: TextureWrapMode }
4309 "Set texture wrapping mode" } ;
4312 ! Texture drawing functions
4320 "Draw a Texture2D" } ;
4322 HELP: draw-texture-v
4328 "Draw a Texture2D with position defined as Vector2" } ;
4330 HELP: draw-texture-ex
4338 "Draw a Texture2D with extended parameters" } ;
4340 HELP: draw-texture-rec
4347 "Draw a part of a texture defined by a rectangle" } ;
4349 HELP: draw-texture-pro
4358 "Draw a part of a texture defined by a rectangle with 'pro' parameters" } ;
4360 HELP: draw-texture-npatch
4363 nPatchInfo: NPatchInfo
4369 "Draws a texture (or part of it) that stretches or shrinks nicely" } ;
4372 ! Color/pixel related functions
4379 "Get color with alpha applied, alpha goes from 0.0f to 1.0f" } ;
4386 "Get hexadecimal value for a Color" } ;
4388 HELP: color-normalize
4393 "Get Color normalized as float [0..1]" } ;
4395 HELP: color-from-normalized
4400 "Get Color from normalized values [0..1]" } ;
4407 "Get HSV values for a Color, hue [0..360], saturation/value [0..1]" } ;
4409 HELP: color-from-hsv
4416 "Get a Color from HSV values, hue [0..360], saturation/value [0..1]" } ;
4424 "Get color with tint" } ;
4426 HELP: color-brightness
4432 "Get color with brightness" } ;
4434 HELP: color-contrast
4440 "Get color with contrast" } ;
4448 "Get color with alpha applied, alpha goes from 0.0f to 1.0f" } ;
4450 HELP: color-alpha-blend
4457 "Get src alpha-blended into dst color with tint" } ;
4464 "Get Color structure from hexadecimal value" } ;
4466 HELP: get-pixel-color
4472 "Get Color from a source pixel pointer of certain format" } ;
4474 HELP: set-pixel-color
4478 format: PixelFormat }
4480 "Set color formatted into destination pixel pointer" } ;
4482 HELP: get-pixel-data-size
4489 "Get pixel data size in bytes for certain format" } ;
4492 ! Font loading/unloading functions
4493 HELP: get-font-default
4497 "Get the default Font" } ;
4504 "Load font from file into GPU memory (VRAM)" } ;
4510 fontChars: { "a " { $link pointer } " to a " { $link int } }
4514 "Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set" } ;
4516 HELP: load-font-from-image
4523 "Load font from Image (XNA style)" } ;
4525 HELP: load-font-from-memory
4531 fontChars: { "a " { $link pointer } " to a " { $link int } }
4535 "Load font from memory buffer, fileType refers to extension: i.e. '.ttf'" } ;
4542 "Check if a font is ready" } ;
4544 HELP: load-font-data
4549 fontChars: { "a " { $link pointer } " to a " { $link int } }
4552 GlyphInfo*: { "a " { $link pointer } " to " { $link GlyphInfo } } }
4554 "Load font data for further use" } ;
4556 HELP: gen-image-font-atlas
4558 chars: { "a " { $link pointer } " to a " { $link GlyphInfo } }
4559 recs: { "a double " { $link pointer } " to a " { $link Rectangle } }
4566 "Generate image font atlas using chars info" } ;
4568 HELP: unload-font-data
4570 chars: { "a " { $link pointer } " to a " { $link GlyphInfo } }
4573 "Unload font chars info data (RAM)" } ;
4579 "Unload Font from GPU memory (VRAM)" } ;
4581 HELP: export-font-as-code
4587 "Export font as code file, returns true on success" } ;
4590 ! Text drawing functions
4596 "Draw current FPS" } ;
4606 "Draw text (using default font)" } ;
4617 "Draw text using font and additional parameters" } ;
4630 "Draw text using Font and pro parameters (rotation)" } ;
4632 HELP: draw-text-codepoint
4640 "Draw one character (codepoint)" } ;
4642 HELP: draw-text-codepoints
4645 codepoint: { "a " { $link pointer } " to a " { $link int } }
4652 "Draw multiple character (codepoint)" } ;
4655 ! Text font info functions
4662 "Measure string width for default font" } ;
4664 HELP: measure-text-ex
4672 "Measure string size for Font" } ;
4674 HELP: get-glyph-index
4680 "Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found" } ;
4682 HELP: get-glyph-info
4686 GlyphInfo: GlyphInfo }
4688 "Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found" } ;
4690 HELP: get-glyph-atlas-rec
4694 Rectangle: Rectangle }
4696 "Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found" } ;
4699 ! Text codepoints management functions (unicode characters)
4702 codepoints: { "a " { $link pointer } " to a " { $link int } }
4704 c-string: c-string }
4706 "Load UTF-8 text encoded from codepoints array" } ;
4712 "Unload UTF-8 text encoded from codepoints array" } ;
4714 HELP: load-codepoints
4717 count: { "a " { $link pointer } " to a " { $link int } }
4718 int*: { "a " { $link pointer } " to a " { $link int } } }
4720 "Load all codepoints from a UTF-8 text string, codepoints count returned by parameter" } ;
4722 HELP: unload-codepoints
4724 codepoints: { "a " { $link pointer } " to a " { $link int } } }
4726 "Unload codepoints data from memory" } ;
4728 HELP: get-codepoint-count
4733 "Get total number of codepoints in a UTF-8 encoded string" } ;
4738 bytesProcessed: { "a " { $link pointer } " to a " { $link int } }
4741 "Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure" } ;
4743 HELP: get-codepoint-next
4746 codepointSize: { "a " { $link pointer } " to a " { $link int } }
4749 "Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure" } ;
4751 HELP: get-codepoint-previous
4754 codepointSize: { "a " { $link pointer } " to a " { $link int } }
4757 "Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure" } ;
4759 HELP: codepoint-to-utf8
4762 byteSize: { "a " { $link pointer } " to a " { $link int } }
4763 c-string: c-string }
4765 "Encode one codepoint into UTF-8 byte array (array length returned as parameter)" } ;
4768 ! Text strings management functions (no UTF-8 strings, only byte chars)
4769 ! NOTE: Some strings allocate memory internally for returned strings, just be careful!
4776 "Copy one string to another, returns bytes copied" } ;
4784 "Check if two text string are equal" } ;
4791 "Get text length, checks for '\0' ending" } ;
4798 c-string: c-string }
4800 "Get a piece of a text string" } ;
4807 c-string: c-string }
4809 "Replace text string"
4811 "Memory must be freed!" } } ;
4818 c-string: c-string }
4820 "Insert text in a position"
4822 "Memory must be freed!" } } ;
4826 textList: { "a " { $link pointer } " to a " { $link c-string } }
4829 c-string: c-string }
4831 "Join text strings with delimiter" } ;
4837 count: { "a " { $link pointer } " to a " { $link int } }
4838 c-string*: { "a " { $link pointer } " to an array of " { $link c-string } } }
4840 "Split text into multiple strings" } ;
4846 position: { "a " { $link pointer } " to a " { $link int } } }
4848 "Append text at specific position and move cursor!" } ;
4850 HELP: text-find-index
4856 "Find first text occurrence within a string" } ;
4861 c-string: c-string }
4863 "Get upper case version of provided string" } ;
4868 c-string: c-string }
4870 "Get lower case version of provided string" } ;
4872 HELP: text-to-pascal
4875 c-string: c-string }
4877 "Get Pascal case notation version of provided string" } ;
4879 HELP: text-to-integer
4884 "Get integer value from text."
4886 "Negative values not supported" } } ;
4888 ! Basic geometric 3D shapes drawing functions
4895 "Draw a line in 3D world space" } ;
4902 "Draw a point in 3D space, actually a small line" } ;
4904 HELP: draw-circle-3d
4908 rotationAxis: Vector3
4909 rotationAngle: float
4912 "Draw a circle in 3D world space" } ;
4914 HELP: draw-triangle-3d
4921 "Draw a color-filled triangle (vertex in counter-clockwise order!)" } ;
4923 HELP: draw-triangle-strip-3d
4925 points: { "a " { $link pointer } " to a " { $link Vector3 } }
4929 "Draw a triangle strip defined by points" } ;
4947 "Draw cube (Vector version)" } ;
4949 HELP: draw-cube-wires
4957 "Draw cube wires" } ;
4959 HELP: draw-cube-wires-v
4965 "Draw cube wires (Vector version)" } ;
4975 HELP: draw-sphere-ex
4983 "Draw sphere with extended parameters" } ;
4985 HELP: draw-sphere-wires
4993 "Draw sphere wires" } ;
5004 "Draw a cylinder/cone" } ;
5006 HELP: draw-cylinder-ex
5015 "Draw a cylinder with base at startPos and top at endPos" } ;
5017 HELP: draw-cylinder-wires
5026 "Draw a cylinder/cone wires" } ;
5028 HELP: draw-cylinder-wires-ex
5037 "Draw a cylinder wires with base at startPos and top at endPos" } ;
5048 "Draw a capsule with the center of its sphere caps at startPos and endPos" } ;
5050 HELP: draw-capsule-wires
5059 "Draw capsule wireframe with the center of its sphere caps at startPos and endPos" } ;
5067 "Draw a plane XZ" } ;
5074 "Draw a ray line" } ;
5081 "Draw a grid (centered at (0, 0, 0))" } ;
5084 ! Model management functions
5090 "Load model from files (meshes and materials)" } ;
5092 HELP: load-model-from-mesh
5097 "Load model from generated mesh (default material)" } ;
5099 HELP: is-model-ready
5104 "Check if a model is ready" } ;
5110 "Unload model (including meshes) from memory (RAM and/or VRAM)" } ;
5112 HELP: get-model-bounding-box
5115 BoundingBox: BoundingBox }
5117 "Compute model bounding box limits (considers all meshes)" } ;
5120 ! Model drawing functions
5128 "Draw a model (with texture if set)" } ;
5134 rotationAxis: Vector3
5135 rotationAngle: float
5139 "Draw a model with extended parameters" } ;
5141 HELP: draw-model-wires
5148 "Draw a model wires (with texture if set)" } ;
5150 HELP: draw-model-wires-ex
5154 rotationAxis: Vector3
5155 rotationAngle: float
5159 "Draw a model wires (with texture if set) with extended parameters" } ;
5161 HELP: draw-bounding-box
5166 "Draw bounding box (wires)" } ;
5168 HELP: draw-billboard
5176 "Draw a billboard texture" } ;
5178 HELP: draw-billboard-rec
5187 "Draw a billboard texture defined by source" } ;
5189 HELP: draw-billboard-pro
5201 "Draw a billboard texture defined by source and rotation" } ;
5204 ! Mesh management functions
5207 mesh: { "a " { $link pointer } " to a " { $link Mesh } }
5210 "Upload mesh vertex data in GPU and provide VAO/VBO ids" } ;
5212 HELP: update-mesh-buffer
5220 "Update mesh vertex data in GPU for a specific buffer index" } ;
5226 "Unload mesh data from CPU and GPU" } ;
5234 "Draw a 3d mesh with material and transform" } ;
5236 HELP: draw-mesh-instanced
5240 transforms: { "a " { $link pointer } " to a " { $link Matrix } }
5243 "Draw multiple mesh instances with material and different transforms" } ;
5251 "Export mesh data to file, returns true on success" } ;
5253 HELP: get-mesh-bounding-box
5256 BoundingBox: BoundingBox }
5258 "Compute mesh bounding box limits" } ;
5260 HELP: gen-mesh-tangents
5262 mesh: { "a " { $link pointer } " to a " { $link Mesh } } }
5264 "Compute mesh tangents" } ;
5267 ! Mesh generation functions
5274 "Generate polygonal mesh" } ;
5276 HELP: gen-mesh-plane
5284 "Generate plane mesh (with subdivisions)" } ;
5293 "Generate cuboid mesh" } ;
5295 HELP: gen-mesh-sphere
5302 "Generate sphere mesh (standard sphere)" } ;
5304 HELP: gen-mesh-hemi-sphere
5311 "Generate half-sphere mesh (no bottom cap)" } ;
5313 HELP: gen-mesh-cylinder
5320 "Generate cylinder mesh" } ;
5329 "Generate cone/pyramid mesh" } ;
5331 HELP: gen-mesh-torus
5339 "Generate torus mesh" } ;
5349 "Generate trefoil knot mesh" } ;
5351 HELP: gen-mesh-heightmap
5357 "Generate heightmap mesh from image data" } ;
5359 HELP: gen-mesh-cubicmap
5365 "Generate cubes-based map mesh from image data" } ;
5368 ! Material loading/unloading functions
5369 HELP: load-materials
5372 materialCount: { "a " { $link pointer } " to a " { $link int } }
5373 Material*: { "a " { $link pointer } " to a " { $link Material } } }
5375 "Load materials from model file" } ;
5377 HELP: load-material-default
5379 Material: Material }
5381 "Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)" } ;
5383 HELP: is-material-ready
5388 "check if a material is ready" } ;
5390 HELP: unload-material
5392 material: Material }
5394 "Unload material from GPU memory (VRAM)" } ;
5396 HELP: set-material-texture
5398 material: { "a " { $link pointer } " to a " { $link Material } }
5400 texture: Texture2D }
5402 "Set texture for a material map type ( Material_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)" } ;
5404 HELP: set-model-mesh-material
5406 model: { "a " { $link pointer } " to a " { $link Model } }
5410 "Set material for a mesh" } ;
5413 ! Model animations loading/unloading functions
5414 HELP: load-model-animations
5417 animCount: { "a " { $link pointer } " to a " { $link uint } }
5418 ModelAnimation*: { "a " { $link pointer } " to a " { $link ModelAnimation } } }
5420 "Load model animations from file" } ;
5422 HELP: update-model-animation
5425 anim: ModelAnimation
5428 "Update model animation pose" } ;
5430 HELP: unload-model-animation
5432 anim: ModelAnimation }
5434 "Unload animation data" } ;
5436 HELP: unload-model-animations
5438 animations: { "a " { $link pointer } " to a " { $link ModelAnimation } }
5441 "Unload animation array data" } ;
5443 HELP: is-model-animation-valid
5446 anim: ModelAnimation
5449 "Check model animation skeleton match" } ;
5452 ! Collision detection functions
5453 HELP: check-collision-spheres
5461 "Check collision between two spheres" } ;
5463 HELP: check-collision-boxes
5469 "Check collision between two bounding boxes" } ;
5471 HELP: check-collision-box-sphere
5478 "Check collision between box and sphere" } ;
5480 HELP: get-ray-collision-sphere
5485 RayCollision: RayCollision }
5487 "Get collision info between ray and sphere" } ;
5489 HELP: get-ray-collision-box
5493 RayCollision: RayCollision }
5495 "Get collision info between ray and box" } ;
5497 HELP: get-ray-collision-mesh
5502 RayCollision: RayCollision }
5504 "Get collision info between ray and mesh" } ;
5506 HELP: get-ray-collision-triangle
5512 RayCollision: RayCollision }
5514 "Get collision info between ray and triangle" } ;
5516 HELP: get-ray-collision-quad
5523 RayCollision: RayCollision }
5525 "Get collision info between ray and quad" } ;
5527 HELP: get-ray-collision-model
5531 ray-collision: RayCollision } ;
5533 HELP: get-ray-collision-ground
5536 ground-height: float
5537 ray-collision: RayCollision } ;
5541 quot: { $quotation ( void* int -- ) } }
5543 Constructs a \ alien-callback that can be passed to
5544 raylib's audio processing functions. }
5546 set-audio-stream-callback
5547 attach-audio-stream-processor
5548 detach-audio-stream-processor
5549 attach-audio-mixed-processor
5550 detach-audio-mixed-processor } ;
5552 ! Audio device management functions
5553 HELP: init-audio-device
5555 "Initialize audio device and context " } ;
5557 HELP: close-audio-device
5559 "Close the audio device and context " } ;
5561 HELP: is-audio-device-ready
5565 "Check if audio device has been initialized successfully " } ;
5567 HELP: set-master-volume
5571 "Set master volume (listener)" } ;
5573 ! Wave/Sound loading/unloading functions
5579 Load wave data from file } ;
5581 HELP: load-wave-from-memory
5588 Load wave from memory buffer, fileType refers to extension: i.e. '.wav' } ;
5595 "Checks if wave data is ready " } ;
5602 "Load sound from file" } ;
5604 HELP: load-sound-from-wave
5609 "Load sound from wave data " } ;
5611 HELP: is-sound-ready
5616 "Checks if a sound is ready" } ;
5624 "Update sound buffer with new data" } ;
5630 "Unload wave data" } ;
5644 "Export wave data to file, returns true on success " } ;
5646 HELP: export-wave-as-code
5652 "Export wave sample data to code (.h), returns true on success " } ;
5655 ! Wave/Sound management functions
5666 Stop playing a sound } ;
5678 Resume a paused sound } ;
5680 HELP: is-sound-playing
5685 Check if a sound is currently playing } ;
5687 HELP: set-sound-volume
5692 Set volume for a sound (1.0 is max level) } ;
5694 HELP: set-sound-pitch
5699 Set pitch for a sound (1.0 is base level) } ;
5706 Set pan for a sound (0.5 is center) } ;
5713 "Copy a wave to a new wave " } ;
5717 wave: { "a " { $link pointer } " to a " { $link Wave } }
5721 Crop a wave to defined samples range } ;
5725 wave: { "a " { $link pointer } " to a " { $link Wave } }
5730 Convert wave data to desired format } ;
5732 HELP: load-wave-samples
5735 float*: { "a " { $link pointer } " to some " { $link float } "s" } }
5737 "Load samples data from wave as a floats array " } ;
5739 HELP: unload-wave-samples
5741 samples: { "a " { $link pointer } " to some " { $link float } "s" } }
5743 "Unload samples data loaded with " { $link load-wave-samples } } ;
5745 ! Music management functions
5746 HELP: load-music-stream
5751 Load music stream from file } ;
5753 HELP: load-music-stream-from-memory
5760 Load music stream from data } ;
5762 HELP: is-music-ready
5767 "Checks if a music stream is ready " } ;
5769 HELP: unload-music-stream
5773 "Unload music stream " } ;
5775 HELP: play-music-stream
5779 "Start music playing " } ;
5781 HELP: is-music-stream-playing
5786 "Check if music is playing " } ;
5788 HELP: update-music-stream
5792 "Updates buffers for music streaming " } ;
5794 HELP: stop-music-stream
5798 "Stop music playing " } ;
5800 HELP: pause-music-stream
5804 "Pause music playing " } ;
5806 HELP: resume-music-stream
5810 "Resume playing paused music " } ;
5812 HELP: seek-music-stream
5817 "Seek music to a position (in seconds)" } ;
5819 HELP: set-music-volume
5824 "Set volume for music (1.0 is max level)" } ;
5826 HELP: set-music-pitch
5831 "Set pitch for a music (1.0 is base level)" } ;
5838 "Set pan for a music (0.5 is center)" } ;
5840 HELP: get-music-time-length
5845 "Get music time length (in seconds) " } ;
5847 HELP: get-music-time-played
5852 "Get current music time played (in seconds) " } ;
5854 ! AudioStream management functions
5855 HELP: load-audio-stream
5860 AudioStream: AudioStream }
5862 "Load audio stream (to stream raw audio pcm data)" } ;
5864 HELP: is-audio-stream-ready
5869 "Checks if an audio stream is ready " } ;
5871 HELP: unload-audio-stream
5873 stream: AudioStream }
5875 "Unload audio stream and free memory " } ;
5877 HELP: update-audio-stream
5883 "Update audio stream buffers with data" } ;
5885 HELP: is-audio-stream-processed
5890 "Check if any audio stream buffers requires refill " } ;
5892 HELP: play-audio-stream
5894 stream: AudioStream }
5896 "Play audio stream " } ;
5898 HELP: pause-audio-stream
5900 stream: AudioStream }
5902 "Pause audio stream " } ;
5904 HELP: resume-audio-stream
5906 stream: AudioStream }
5908 "Resume audio stream " } ;
5910 HELP: is-audio-stream-playing
5915 "Check if audio stream is playing " } ;
5917 HELP: stop-audio-stream
5919 stream: AudioStream }
5921 "Stop audio stream " } ;
5923 HELP: set-audio-stream-volume
5928 "Set volume for audio stream (1.0 is max level)" } ;
5930 HELP: set-audio-stream-pitch
5935 "Set pitch for audio stream (1.0 is base level)" } ;
5937 HELP: set-audio-stream-pan
5942 "Set pan for audio stream (0.5 is center)" } ;
5944 HELP: set-audio-stream-buffer-size-default
5948 "Default size for new audio streams" } ;
5950 HELP: set-audio-stream-callback
5953 callback: AudioCallback }
5955 "Audio thread callback to request new data" } ;
5958 HELP: attach-audio-stream-processor
5961 processor: AudioCallback }
5963 "Attach audio stream processor to stream" } ;
5965 HELP: detach-audio-stream-processor
5968 processor: AudioCallback }
5970 "Detach audio stream processor from stream" } ;
5973 HELP: attach-audio-mixed-processor
5975 processor: AudioCallback }
5977 "Attach audio stream processor to the entire audio pipeline" } ;
5979 HELP: detach-audio-mixed-processor
5981 processor: AudioCallback }
5983 "Detach audio stream processor from the entire audio pipeline" } ;
5986 ARTICLE: "raylib" "Raylib"
5987 { $heading About Raylib }
5988 Raylib attempts to be a simple and easy-to-use library for writing
5989 graphical applications.
5991 { $subheading Main Website }
5992 { $url "https://www.raylib.com/index.html" }
5994 { $subheading Raylib Cheat Sheet }
5995 { $url "https://www.raylib.com/cheatsheet/cheatsheet.html" }
5997 { $heading About These Bindings }
5998 The { $vocab-link "raylib" } vocabulary provides bindings to
5999 Raylib 4.5. The vocab is fully documented using Factor's help
6000 system. So, you can reliably use the browser to find information about
6001 the various functions in raylib.
6004 Use caution when attempting to leverage concurrency features.
6005 Raylib and the UI tools can interact in nasty ways: { $link "raylib-and-threads" } .
6009 ARTICLE: "raylib-and-threads" "Raylib and Threads"
6010 Factor features a powerful UI tool kit. However, Raylibe is designed
6011 under a single threaded model. Running a Raylib program will lock up
6012 the UI until the program finishes. However, attempting to use
6013 concurrency and threading features can corrupt the UI if done wrong.