1 ! Copyright (C) 2023 CapitalEx.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: accessors alien.c-types arrays help.markup help.syntax
4 kernel make math math.parser quotations sequences strings urls
7 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 }
86 Setting this flag will attempt to enable v-sync on the GPU.
87 { $see-also ConfigFlags }
90 HELP: FLAG_FULLSCREEN_MODE
92 Setting this flag will run the program in fullscreen
93 { $see-also ConfigFlags }
96 HELP: FLAG_WINDOW_RESIZABLE
98 Setting this flag allows for resizing the window.
99 { $see-also ConfigFlags }
102 HELP: FLAG_WINDOW_UNDECORATED
104 Setting this flag remove window decorations (frame and buttons).
105 { $see-also ConfigFlags }
108 HELP: FLAG_WINDOW_HIDDEN
110 Setting this flag will hide the window.
111 { $see-also ConfigFlags }
114 HELP: FLAG_WINDOW_MINIMIZED
116 Setting this flag will minize the window.
117 { $see-also ConfigFlags }
120 HELP: FLAG_WINDOW_MAXIMIZED
122 Setting this flag will maximize the window to the monitor size.
123 { $see-also ConfigFlags }
126 HELP: FLAG_WINDOW_UNFOCUSED
128 Setting this flag will set the window to be unfocused.
129 { $see-also ConfigFlags }
132 HELP: FLAG_WINDOW_TOPMOST
134 Setting this flag sets the window to always be on top.
135 { $see-also ConfigFlags }
138 HELP: FLAG_WINDOW_ALWAYS_RUN
140 Setting this flag allows the window to run while minimized.
141 { $see-also ConfigFlags }
144 HELP: FLAG_WINDOW_TRANSPARENT
146 Setting this flag allows for transparent framebuffer.
147 { $see-also ConfigFlags }
150 HELP: FLAG_WINDOW_HIGHDPI
152 Setting this flag will enable HighDPI support.
153 { $see-also ConfigFlags }
156 HELP: FLAG_MSAA_4X_HINT
158 Setting this flag will attempt to enable MSAA 4x.
159 { $see-also ConfigFlags }
162 HELP: FLAG_INTERLACED_HINT
164 Setting this flag will attempt to enable the interlaced video
166 { $see-also ConfigFlags }
170 ! Trace log level enum
173 Represents the various logging levels in Raylib.
174 Logs are displayed using the system's standard output.
176 { $enum-members TraceLogLevel }
183 { $see-also TraceLogLevel }
188 Deplays trace logging. \ LOG_TRACE meant for internal usage.
190 { $see-also TraceLogLevel }
195 Displays debugging logs. { $snippet LOG_INFO } is used for internal
196 debugging and should be disabled on release builds.
198 { $see-also TraceLogLevel }
203 Displays warning logs. Warnings are recoverable failures.
205 { $see-also TraceLogLevel }
210 Displays error logs. Errors are unrecoverable failures.
212 { $see-also TraceLogLevel }
217 Displays fatal logs. Fatal errors are used while aborting
219 { $see-also TraceLogLevel }
224 Disables raylib logging.
226 { $see-also TraceLogLevel }
233 An enum representing the various key codes Raylib can produce.
234 These codes are based on the physical layout of a US QWERTY
235 keyboard layout. Use \ get-key-pressed to allow for defining
238 { $enum-members KeyboardKey }
241 HELP: KEY_NULL { $raylib-key 0 "NULL" " Used for no key pressed." } ;
242 HELP: KEY_APOSTROPHE { $raylib-key 39 "'" } ;
243 HELP: KEY_COMMA { $raylib-key 44 "," } ;
244 HELP: KEY_MINUS { $raylib-key 45 "-" } ;
245 HELP: KEY_PERIOD { $raylib-key 46 "." } ;
246 HELP: KEY_SLASH { $raylib-key 47 "/" } ;
247 HELP: KEY_ZERO { $raylib-key 48 "0" } ;
248 HELP: KEY_ONE { $raylib-key 49 "1" } ;
249 HELP: KEY_TWO { $raylib-key 50 "2" } ;
250 HELP: KEY_THREE { $raylib-key 51 "3" } ;
251 HELP: KEY_FOUR { $raylib-key 52 "4" } ;
252 HELP: KEY_FIVE { $raylib-key 53 "5" } ;
253 HELP: KEY_SIX { $raylib-key 54 "6" } ;
254 HELP: KEY_SEVEN { $raylib-key 55 "7" } ;
255 HELP: KEY_EIGHT { $raylib-key 56 "8" } ;
256 HELP: KEY_NINE { $raylib-key 57 "9" } ;
257 HELP: KEY_SEMICOLON { $raylib-key 59 ";" } ;
258 HELP: KEY_EQUAL { $raylib-key 61 "=" } ;
259 HELP: KEY_A { $raylib-key 65 "lowercase and uppercase A" } ;
260 HELP: KEY_B { $raylib-key 66 "lowercase and uppercase B" } ;
261 HELP: KEY_C { $raylib-key 67 "lowercase and uppercase C" } ;
262 HELP: KEY_D { $raylib-key 68 "lowercase and uppercase D" } ;
263 HELP: KEY_E { $raylib-key 69 "lowercase and uppercase E" } ;
264 HELP: KEY_F { $raylib-key 70 "lowercase and uppercase F" } ;
265 HELP: KEY_G { $raylib-key 71 "lowercase and uppercase G" } ;
266 HELP: KEY_H { $raylib-key 72 "lowercase and uppercase H" } ;
267 HELP: KEY_I { $raylib-key 73 "lowercase and uppercase I" } ;
268 HELP: KEY_J { $raylib-key 74 "lowercase and uppercase J" } ;
269 HELP: KEY_K { $raylib-key 75 "lowercase and uppercase K" } ;
270 HELP: KEY_L { $raylib-key 76 "lowercase and uppercase L" } ;
271 HELP: KEY_M { $raylib-key 77 "lowercase and uppercase M" } ;
272 HELP: KEY_N { $raylib-key 78 "lowercase and uppercase N" } ;
273 HELP: KEY_O { $raylib-key 79 "lowercase and uppercase O" } ;
274 HELP: KEY_P { $raylib-key 80 "lowercase and uppercase P" } ;
275 HELP: KEY_Q { $raylib-key 81 "lowercase and uppercase Q" } ;
276 HELP: KEY_R { $raylib-key 82 "lowercase and uppercase R" } ;
277 HELP: KEY_S { $raylib-key 83 "lowercase and uppercase S" } ;
278 HELP: KEY_T { $raylib-key 84 "lowercase and uppercase T" } ;
279 HELP: KEY_U { $raylib-key 85 "lowercase and uppercase U" } ;
280 HELP: KEY_V { $raylib-key 86 "lowercase and uppercase V" } ;
281 HELP: KEY_W { $raylib-key 87 "lowercase and uppercase W" } ;
282 HELP: KEY_X { $raylib-key 88 "lowercase and uppercase X" } ;
283 HELP: KEY_Y { $raylib-key 89 "lowercase and uppercase Y" } ;
284 HELP: KEY_Z { $raylib-key 90 "lowercase and uppercase Z" } ;
285 HELP: KEY_LEFT_BRACKET { $raylib-key 91 "[" } ;
286 HELP: KEY_BACKSLASH { $raylib-key 92 "\\" } ;
287 HELP: KEY_RIGHT_BRACKET { $raylib-key 93 "]" } ;
288 HELP: KEY_GRAVE { $raylib-key 96 "`" } ;
289 HELP: KEY_SPACE { $raylib-key 32 "Space" } ;
290 HELP: KEY_ESCAPE { $raylib-key 256 "Esc" } ;
291 HELP: KEY_ENTER { $raylib-key 257 "Enter" } ;
292 HELP: KEY_TAB { $raylib-key 258 "Tab" } ;
293 HELP: KEY_BACKSPACE { $raylib-key 259 "Backspace" } ;
294 HELP: KEY_INSERT { $raylib-key 260 "Ins" } ;
295 HELP: KEY_DELETE { $raylib-key 261 "Del" } ;
296 HELP: KEY_RIGHT { $raylib-key 262 "Cursor right" } ;
297 HELP: KEY_LEFT { $raylib-key 263 "Cursor left" } ;
298 HELP: KEY_DOWN { $raylib-key 264 "Cursor down" } ;
299 HELP: KEY_UP { $raylib-key 265 "Cursor up" } ;
300 HELP: KEY_PAGE_UP { $raylib-key 266 "Page up" } ;
301 HELP: KEY_PAGE_DOWN { $raylib-key 267 "Page down" } ;
302 HELP: KEY_HOME { $raylib-key 268 "Home" } ;
303 HELP: KEY_END { $raylib-key 269 "End" } ;
304 HELP: KEY_CAPS_LOCK { $raylib-key 280 "Caps lock" } ;
305 HELP: KEY_SCROLL_LOCK { $raylib-key 281 "Scroll down" } ;
306 HELP: KEY_NUM_LOCK { $raylib-key 282 "Num lock" } ;
307 HELP: KEY_PRINT_SCREEN { $raylib-key 283 "Print screen" } ;
308 HELP: KEY_PAUSE { $raylib-key 284 "Pause" } ;
309 HELP: KEY_F1 { $raylib-key 290 "F1" } ;
310 HELP: KEY_F2 { $raylib-key 291 "F2" } ;
311 HELP: KEY_F3 { $raylib-key 292 "F3" } ;
312 HELP: KEY_F4 { $raylib-key 293 "F4" } ;
313 HELP: KEY_F5 { $raylib-key 294 "F5" } ;
314 HELP: KEY_F6 { $raylib-key 295 "F6" } ;
315 HELP: KEY_F7 { $raylib-key 296 "F7" } ;
316 HELP: KEY_F8 { $raylib-key 297 "F8" } ;
317 HELP: KEY_F9 { $raylib-key 298 "F9" } ;
318 HELP: KEY_F10 { $raylib-key 299 "F10" } ;
319 HELP: KEY_F11 { $raylib-key 300 "F11" } ;
320 HELP: KEY_F12 { $raylib-key 301 "F12" } ;
321 HELP: KEY_LEFT_SHIFT { $raylib-key 340 "Shift left" } ;
322 HELP: KEY_LEFT_CONTROL { $raylib-key 341 "Control left" } ;
323 HELP: KEY_LEFT_ALT { $raylib-key 342 "Alt left" } ;
324 HELP: KEY_LEFT_SUPER { $raylib-key 343 "Super left" } ;
325 HELP: KEY_RIGHT_SHIFT { $raylib-key 344 "Shift right" } ;
326 HELP: KEY_RIGHT_CONTROL { $raylib-key 345 "Control right" } ;
327 HELP: KEY_RIGHT_ALT { $raylib-key 346 "Alt right" } ;
328 HELP: KEY_RIGHT_SUPER { $raylib-key 347 "Super right" } ;
329 HELP: KEY_KB_MENU { $raylib-key 348 "KB menu" } ;
330 HELP: KEY_KP_0 { $raylib-key 320 "Keypad 0" } ;
331 HELP: KEY_KP_1 { $raylib-key 321 "Keypad 1" } ;
332 HELP: KEY_KP_2 { $raylib-key 322 "Keypad 2" } ;
333 HELP: KEY_KP_3 { $raylib-key 323 "Keypad 3" } ;
334 HELP: KEY_KP_4 { $raylib-key 324 "Keypad 4" } ;
335 HELP: KEY_KP_5 { $raylib-key 325 "Keypad 5" } ;
336 HELP: KEY_KP_6 { $raylib-key 326 "Keypad 6" } ;
337 HELP: KEY_KP_7 { $raylib-key 327 "Keypad 7" } ;
338 HELP: KEY_KP_8 { $raylib-key 328 "Keypad 8" } ;
339 HELP: KEY_KP_9 { $raylib-key 329 "Keypad 9" } ;
340 HELP: KEY_KP_DECIMAL { $raylib-key 330 "Keypad ." } ;
341 HELP: KEY_KP_DIVIDE { $raylib-key 331 "Keypad /" } ;
342 HELP: KEY_KP_MULTIPLY { $raylib-key 332 "Keypad *" } ;
343 HELP: KEY_KP_SUBTRACT { $raylib-key 333 "Keypad -" } ;
344 HELP: KEY_KP_ADD { $raylib-key 334 "Keypad +" } ;
345 HELP: KEY_KP_ENTER { $raylib-key 335 "Keypad Enter" } ;
346 HELP: KEY_KP_EQUAL { $raylib-key 336 "Keypad =" } ;
347 HELP: KEY_BACK { $raylib-key 4 "Android back button" } ;
348 HELP: KEY_MENU { $raylib-key 82 "Android menu button" } ;
349 HELP: KEY_VOLUME_UP { $raylib-key 24 "Android volume up button" } ;
350 HELP: KEY_VOLUME_DOWN { $raylib-key 25 "Android volume down button" } ;
356 An enum representing the various key mouse buttons Ralyb has support for.
358 { $enum-members MouseButton }
361 HELP: MOUSE_BUTTON_LEFT
363 Represents the left mouse button.
365 { $see-also MouseButton }
368 HELP: MOUSE_BUTTON_RIGHT
370 Represents the right mouse button.
372 { $see-also MouseButton }
375 HELP: MOUSE_BUTTON_MIDDLE
377 Represents the middle mouse button. On most mice, this is clicking
380 { $see-also MouseButton }
383 HELP: MOUSE_BUTTON_SIDE
385 Represents a side button on mice that have additional buttons.
387 { $see-also MouseButton }
390 HELP: MOUSE_BUTTON_EXTRA
392 Represents an extra button on mice that have additional buttons.
394 { $see-also MouseButton }
397 HELP: MOUSE_BUTTON_FORWARD
399 Represents the " \"forward\" " button on mice that have additional buttons.
401 { $see-also MouseButton }
404 HELP: MOUSE_BUTTON_BACK
406 Represents the " \"back\" " button on mice that have additional buttons.
408 { $see-also MouseButton }
415 An enum representing the various states the cursor can be in.
416 This is used to change the cursor icon " / " shape.
419 { $enum-members MouseCursor }
422 HELP: MOUSE_CURSOR_DEFAULT
424 Default pointer shape.
426 { $see-also MouseCursor }
429 HELP: MOUSE_CURSOR_ARROW
433 { $see-also MouseCursor }
436 HELP: MOUSE_CURSOR_IBEAM
438 Text writing cursor shape.
440 { $see-also MouseCursor }
443 HELP: MOUSE_CURSOR_CROSSHAIR
447 { $see-also MouseCursor }
450 HELP: MOUSE_CURSOR_POINTING_HAND
452 Pointing hand cursor.
454 { $see-also MouseCursor }
457 HELP: MOUSE_CURSOR_RESIZE_EW
459 Horizontal resize/move arrow shape.
461 { $see-also MouseCursor }
464 HELP: MOUSE_CURSOR_RESIZE_NS
466 Vertical resize/move arrow shape.
468 { $see-also MouseCursor }
471 HELP: MOUSE_CURSOR_RESIZE_NWSE
473 Top-left to bottom-right diagonal resize/move arrow shape.
475 { $see-also MouseCursor }
478 HELP: MOUSE_CURSOR_RESIZE_NESW
480 The top-right to bottom-left diagonal resize/move arrow shape.
482 { $see-also MouseCursor }
485 HELP: MOUSE_CURSOR_RESIZE_ALL
487 The omni-directional resize/move cursor shape.
489 { $see-also MouseCursor }
492 HELP: MOUSE_CURSOR_NOT_ALLOWED
494 The operation-not-allowed shape.
496 { $see-also MouseCursor }
500 ! Gamepad button enum
503 This enum represents the various buttons a gamepad might have.
505 It's important to keep in mind different controllers may have
506 different button orderings. Each enum member notes the
507 differences in their respective documentation sections.
509 { $see-also GamepadAxis }
511 { $enum-members GamepadButton }
514 HELP: GAMEPAD_BUTTON_UNKNOWN
516 Unknown button, just for error checking
518 { $see-also GamepadButton }
521 HELP: GAMEPAD_BUTTON_LEFT_FACE_UP
523 Gamepad left DPAD up button
525 { $see-also GamepadButton }
528 HELP: GAMEPAD_BUTTON_LEFT_FACE_RIGHT
530 Gamepad left DPAD right button
532 { $see-also GamepadButton }
535 HELP: GAMEPAD_BUTTON_LEFT_FACE_DOWN
537 Gamepad left DPAD down button
539 { $see-also GamepadButton }
542 HELP: GAMEPAD_BUTTON_LEFT_FACE_LEFT
544 Gamepad left DPAD left button
546 { $see-also GamepadButton }
549 HELP: GAMEPAD_BUTTON_RIGHT_FACE_UP
551 Gamepad right button up (i.e. PS3: Triangle, Xbox: Y)
553 { $see-also GamepadButton }
556 HELP: GAMEPAD_BUTTON_RIGHT_FACE_RIGHT
558 Gamepad right button right (i.e. PS3: Square, Xbox: X)
560 { $see-also GamepadButton }
563 HELP: GAMEPAD_BUTTON_RIGHT_FACE_DOWN
565 Gamepad right button down (i.e. PS3: Cross, Xbox: A)
567 { $see-also GamepadButton }
570 HELP: GAMEPAD_BUTTON_RIGHT_FACE_LEFT
572 Gamepad right button left (i.e. PS3: Circle, Xbox: B)
574 { $see-also GamepadButton }
577 HELP: GAMEPAD_BUTTON_LEFT_TRIGGER_1
579 Gamepad top/back trigger left (first), it could be a trailing button
581 { $see-also GamepadButton }
584 HELP: GAMEPAD_BUTTON_LEFT_TRIGGER_2
586 Gamepad top/back trigger left (second), it could be a trailing button
588 { $see-also GamepadButton }
591 HELP: GAMEPAD_BUTTON_RIGHT_TRIGGER_1
593 Gamepad top/back trigger right (one), it could be a trailing button
595 { $see-also GamepadButton }
598 HELP: GAMEPAD_BUTTON_RIGHT_TRIGGER_2
600 Gamepad top/back trigger right (second), it could be a trailing button
602 { $see-also GamepadButton }
605 HELP: GAMEPAD_BUTTON_MIDDLE_LEFT
607 Gamepad center buttons, left one (i.e. PS3: Select)
609 { $see-also GamepadButton }
612 HELP: GAMEPAD_BUTTON_MIDDLE
614 Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX)
616 { $see-also GamepadButton }
619 HELP: GAMEPAD_BUTTON_MIDDLE_RIGHT
621 Gamepad center buttons, right one (i.e. PS3: Start)
623 { $see-also GamepadButton }
626 HELP: GAMEPAD_BUTTON_LEFT_THUMB
628 Gamepad joystick pressed button left
630 { $see-also GamepadButton }
633 HELP: GAMEPAD_BUTTON_RIGHT_THUMB
635 Gamepad joystick pressed button right
637 { $see-also GamepadButton }
644 Contains a set of flags for each axis a gamepad may have. Raylib
645 supports controllers with two triggers and two joysticks.
647 { $enum-members GamepadAxis }
650 HELP: GAMEPAD_AXIS_LEFT_X
652 Represents the left gamepad stick and its tilt on the X axis (left/right).
653 { $see-also GamepadAxis }
656 HELP: GAMEPAD_AXIS_LEFT_Y
658 Represents the left gamepad stick and its tilt on the Y axis (up/down).
659 { $see-also GamepadAxis }
662 HELP: GAMEPAD_AXIS_RIGHT_X
664 Represents the right gamepad stick and its tilt on the X axis (left/right).
665 { $see-also GamepadAxis }
668 HELP: GAMEPAD_AXIS_RIGHT_Y
670 Represents the right gamepad stick and its tilt on the Y axis (up/down).
671 { $see-also GamepadAxis }
674 HELP: GAMEPAD_AXIS_LEFT_TRIGGER
676 Represents the left gamepad trigger. Trigger has the value
678 { $see-also GamepadAxis }
681 HELP: GAMEPAD_AXIS_RIGHT_TRIGGER
683 Represents the left gamepad trigger. Trigger has the value
685 { $see-also GamepadAxis }
689 ! Material map index enum
690 HELP: MaterialMapIndex
692 Provides convient names for each index into a texture's various
695 { $enum-members MaterialMapIndex }
697 HELP: MATERIAL_MAP_ALBEDO
699 Represents the index for a texture's albedo material (same as: \ MATERIAL_MAP_DIFFUSE ).
701 { $see-also MaterialMapIndex }
704 HELP: MATERIAL_MAP_METALNESS
706 Represents the index for a texture's metalness material (same as: \ MATERIAL_MAP_SPECULAR ).
708 { $see-also MaterialMapIndex }
711 HELP: MATERIAL_MAP_NORMAL
713 Represents the index for a texture's normal material.
715 { $see-also MaterialMapIndex }
718 HELP: MATERIAL_MAP_ROUGHNESS
720 Represents the index for a texture's roughness material.
722 { $see-also MaterialMapIndex }
725 HELP: MATERIAL_MAP_OCCLUSION
727 Represents the index for a texture's ambient occlusion material.
729 { $see-also MaterialMapIndex }
732 HELP: MATERIAL_MAP_EMISSION
734 Represents the index for a texture's emission material.
736 { $see-also MaterialMapIndex }
739 HELP: MATERIAL_MAP_HEIGHT
741 Represents the index for a texture's heightmap material.
743 { $see-also MaterialMapIndex }
746 HELP: MATERIAL_MAP_CUBEMAP
748 Represents the index for a texture's Cubemap material (NOTE: Uses GL_TEXTURE_CUBE_MAP).
750 { $see-also MaterialMapIndex }
753 HELP: MATERIAL_MAP_IRRADIANCE
755 Represents the index for a texture's irradiance material (NOTE: Uses GL_TEXTURE_CUBE_MAP).
757 { $see-also MaterialMapIndex }
760 HELP: MATERIAL_MAP_PREFILTER
762 Represents the index for a texture's prefilter material (NOTE: Uses GL_TEXTURE_CUBE_MAP).
764 { $see-also MaterialMapIndex }
767 HELP: MATERIAL_MAP_BRDF
769 Represents the index for a texture's brdf material.
771 { $see-also MaterialMapIndex }
774 ! Shader Location Index
775 ! TODO: make a better description of these. They are kinda bad...
776 HELP: ShaderLocationIndex
778 Shader location index enum.
780 { $enum-members ShaderLocationIndex }
783 HELP: SHADER_LOC_VERTEX_POSITION
785 Shader location: vertex attribute: position
787 { $see-also ShaderLocationIndex }
790 HELP: SHADER_LOC_VERTEX_TEXCOORD01
792 Shader location: vertex attribute: texcoord01
794 { $see-also ShaderLocationIndex }
797 HELP: SHADER_LOC_VERTEX_TEXCOORD02
799 Shader location: vertex attribute: texcoord02
801 { $see-also ShaderLocationIndex }
804 HELP: SHADER_LOC_VERTEX_NORMAL
806 Shader location: vertex attribute: normal
808 { $see-also ShaderLocationIndex }
811 HELP: SHADER_LOC_VERTEX_TANGENT
813 Shader location: vertex attribute: tangent
815 { $see-also ShaderLocationIndex }
818 HELP: SHADER_LOC_VERTEX_COLOR
820 Shader location: vertex attribute: color
822 { $see-also ShaderLocationIndex }
825 HELP: SHADER_LOC_MATRIX_MVP
827 Shader location: matrix uniform: model-view-projection
829 { $see-also ShaderLocationIndex }
832 HELP: SHADER_LOC_MATRIX_VIEW
834 Shader location: matrix uniform: view (camera transform)
836 { $see-also ShaderLocationIndex }
839 HELP: SHADER_LOC_MATRIX_PROJECTION
841 Shader location: matrix uniform: projection
843 { $see-also ShaderLocationIndex }
846 HELP: SHADER_LOC_MATRIX_MODEL
848 Shader location: matrix uniform: model (transform)
850 { $see-also ShaderLocationIndex }
853 HELP: SHADER_LOC_MATRIX_NORMAL
855 Shader location: matrix uniform: normal
857 { $see-also ShaderLocationIndex }
860 HELP: SHADER_LOC_VECTOR_VIEW
862 Shader location: vector uniform: view
864 { $see-also ShaderLocationIndex }
867 HELP: SHADER_LOC_COLOR_DIFFUSE
869 Shader location: vector uniform: diffuse color
871 { $see-also ShaderLocationIndex }
874 HELP: SHADER_LOC_COLOR_SPECULAR
876 Shader location: vector uniform: specular color
878 { $see-also ShaderLocationIndex }
881 HELP: SHADER_LOC_COLOR_AMBIENT
883 Shader location: vector uniform: ambient color
885 { $see-also ShaderLocationIndex }
888 HELP: SHADER_LOC_MAP_ALBEDO
890 Shader location: sampler2d texture: albedo (same as: SHADER_LOC_MAP_DIFFUSE)
892 { $see-also ShaderLocationIndex }
895 HELP: SHADER_LOC_MAP_METALNESS
897 Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR)
899 { $see-also ShaderLocationIndex }
902 HELP: SHADER_LOC_MAP_NORMAL
904 Shader location: sampler2d texture: normal
906 { $see-also ShaderLocationIndex }
909 HELP: SHADER_LOC_MAP_ROUGHNESS
911 Shader location: sampler2d texture: roughness
913 { $see-also ShaderLocationIndex }
916 HELP: SHADER_LOC_MAP_OCCLUSION
918 Shader location: sampler2d texture: occlusion
920 { $see-also ShaderLocationIndex }
923 HELP: SHADER_LOC_MAP_EMISSION
925 Shader location: sampler2d texture: emission
927 { $see-also ShaderLocationIndex }
930 HELP: SHADER_LOC_MAP_HEIGHT
932 Shader location: sampler2d texture: height
934 { $see-also ShaderLocationIndex }
937 HELP: SHADER_LOC_MAP_CUBEMAP
939 Shader location: samplerCube texture: cubemap
941 { $see-also ShaderLocationIndex }
944 HELP: SHADER_LOC_MAP_IRRADIANCE
946 Shader location: samplerCube texture: irradiance
948 { $see-also ShaderLocationIndex }
951 HELP: SHADER_LOC_MAP_PREFILTER
953 Shader location: samplerCube texture: prefilter
955 { $see-also ShaderLocationIndex }
958 HELP: SHADER_LOC_MAP_BRDF
960 Shader location: sampler2d texture: brdf
962 { $see-also ShaderLocationIndex }
967 ! Shader uniform data type
968 ! TODO: Better descriptions for these...
969 HELP: ShaderUniformDataType
971 Represents the various types a uniform shader can be.
973 { $enum-members MaterialMapIndex }
976 HELP: SHADER_UNIFORM_FLOAT
978 Shader uniform type: float
979 { $see-also ShaderUniformDataType }
982 HELP: SHADER_UNIFORM_VEC2
984 Shader uniform type: vec2 (2 float)
985 { $see-also ShaderUniformDataType }
988 HELP: SHADER_UNIFORM_VEC3
990 Shader uniform type: vec3 (3 float)
991 { $see-also ShaderUniformDataType }
994 HELP: SHADER_UNIFORM_VEC4
996 Shader uniform type: vec4 (4 float)
997 { $see-also ShaderUniformDataType }
1000 HELP: SHADER_UNIFORM_INT
1001 { $class-description
1002 Shader uniform type: int
1003 { $see-also ShaderUniformDataType }
1006 HELP: SHADER_UNIFORM_IVEC2
1007 { $class-description
1008 Shader uniform type: ivec2 (2 int)
1009 { $see-also ShaderUniformDataType }
1012 HELP: SHADER_UNIFORM_IVEC3
1013 { $class-description
1014 Shader uniform type: ivec3 (3 int)
1015 { $see-also ShaderUniformDataType }
1018 HELP: SHADER_UNIFORM_IVEC4
1019 { $class-description
1020 Shader uniform type: ivec4 (4 int)
1021 { $see-also ShaderUniformDataType }
1024 HELP: SHADER_UNIFORM_SAMPLER2D
1025 { $class-description
1026 Shader uniform type: sampler2d
1027 { $see-also ShaderUniformDataType }
1031 ! Shader attribute data type enum
1032 HELP: ShaderAttributeDataType
1034 Shader attribute data types
1036 { $enum-members ShaderAttributeDataType }
1039 HELP: SHADER_ATTRIB_FLOAT
1040 { $class-description
1041 Shader attribute type: float
1043 { $see-also ShaderAttributeDataType }
1046 HELP: SHADER_ATTRIB_VEC2
1047 { $class-description
1048 Shader attribute type: vec2 (2 float)
1050 { $see-also ShaderAttributeDataType }
1053 HELP: SHADER_ATTRIB_VEC3
1054 { $class-description
1055 Shader attribute type: vec3 (3 float)
1057 { $see-also ShaderAttributeDataType }
1060 HELP: SHADER_ATTRIB_VEC4
1061 { $class-description
1062 Shader attribute type: vec4 (4 float)
1064 { $see-also ShaderAttributeDataType }
1068 ! Pixel format enum.
1071 The various pixel formats that can be used by Raylib.
1072 This enum's values start from { $snippet 1 } .
1074 { $warning Support depends on OpenGL version and platform. }
1075 { $enum-members PixelFormat }
1078 HELP: PIXELFORMAT_UNCOMPRESSED_GRAYSCALE
1079 { $class-description
1080 8 bit per pixel (no alpha).
1082 { $see-also PixelFormat }
1085 HELP: PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA
1086 { $class-description
1087 8*2 bits per pixel (2 channels).
1089 { $see-also PixelFormat }
1092 HELP: PIXELFORMAT_UNCOMPRESSED_R5G6B5
1093 { $class-description
1096 { $see-also PixelFormat }
1099 HELP: PIXELFORMAT_UNCOMPRESSED_R8G8B8
1100 { $class-description
1103 { $see-also PixelFormat }
1106 HELP: PIXELFORMAT_UNCOMPRESSED_R5G5B5A1
1107 { $class-description
1108 16 bits per pixel (1 bit alpha).
1110 { $see-also PixelFormat }
1113 HELP: PIXELFORMAT_UNCOMPRESSED_R4G4B4A4
1114 { $class-description
1115 16 bits per pixel (4 bit alpha).
1117 { $see-also PixelFormat }
1120 HELP: PIXELFORMAT_UNCOMPRESSED_R8G8B8A8
1121 { $class-description
1124 { $see-also PixelFormat }
1127 HELP: PIXELFORMAT_UNCOMPRESSED_R32
1128 { $class-description
1129 32 bits per pixel (1 channel - float).
1131 { $see-also PixelFormat }
1134 HELP: PIXELFORMAT_UNCOMPRESSED_R32G32B32
1135 { $class-description
1136 32*3 bits per pixel (3 channels - float).
1138 { $see-also PixelFormat }
1141 HELP: PIXELFORMAT_UNCOMPRESSED_R32G32B32A32
1142 { $class-description
1143 32*4 bits per pixel (4 channels - float).
1145 { $see-also PixelFormat }
1148 HELP: PIXELFORMAT_COMPRESSED_DXT1_RGB
1149 { $class-description
1150 4 bits per pixel (no alpha).
1152 { $see-also PixelFormat }
1155 HELP: PIXELFORMAT_COMPRESSED_DXT1_RGBA
1156 { $class-description
1157 4 bits per pixel (1 bit alpha).
1159 { $see-also PixelFormat }
1162 HELP: PIXELFORMAT_COMPRESSED_DXT3_RGBA
1163 { $class-description
1166 { $see-also PixelFormat }
1169 HELP: PIXELFORMAT_COMPRESSED_DXT5_RGBA
1170 { $class-description
1173 { $see-also PixelFormat }
1176 HELP: PIXELFORMAT_COMPRESSED_ETC1_RGB
1177 { $class-description
1180 { $see-also PixelFormat }
1183 HELP: PIXELFORMAT_COMPRESSED_ETC2_RGB
1184 { $class-description
1187 { $see-also PixelFormat }
1190 HELP: PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA
1191 { $class-description
1194 { $see-also PixelFormat }
1197 HELP: PIXELFORMAT_COMPRESSED_PVRT_RGB
1198 { $class-description
1201 { $see-also PixelFormat }
1204 HELP: PIXELFORMAT_COMPRESSED_PVRT_RGBA
1205 { $class-description
1208 { $see-also PixelFormat }
1211 HELP: PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA
1212 { $class-description
1215 { $see-also PixelFormat }
1218 HELP: PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA
1219 { $class-description
1222 { $see-also PixelFormat }
1226 ! Texture filter mode enum
1227 HELP: TextureFilterMode
1229 Controls the filter mode of the texture. In Raylib, filtering will
1230 consider mipmaps if available in the current texture. Additionally,
1231 filter is accordingly set for minification and magnification.
1233 { $enum-members TextureFilterMode }
1236 HELP: TEXTURE_FILTER_POINT
1237 { $class-description
1238 No filter just pixel aproximation.
1240 { $see-also TextureFilterMode }
1243 HELP: TEXTURE_FILTER_BILINEAR
1244 { $class-description
1247 { $see-also TextureFilterMode }
1250 HELP: TEXTURE_FILTER_TRILINEAR
1251 { $class-description
1252 Trilinear filtering (linear with mipmaps).
1254 { $see-also TextureFilterMode }
1257 HELP: TEXTURE_FILTER_ANISOTROPIC_4X
1258 { $class-description
1259 Anisotropic filtering 4x.
1261 { $see-also TextureFilterMode }
1264 HELP: TEXTURE_FILTER_ANISOTROPIC_8X
1265 { $class-description
1266 Anisotropic filtering 8x.
1268 { $see-also TextureFilterMode }
1271 HELP: TEXTURE_FILTER_ANISOTROPIC_16X
1272 { $class-description
1273 Anisotropic filtering 16x.
1275 { $see-also TextureFilterMode }
1279 ! Texture wrap mode enume
1280 HELP: TextureWrapMode
1282 Represents the way a texture will repeate when reading
1283 past the image bounds.
1285 { $enum-members TextureWrapMode }
1288 HELP: TEXTURE_WRAP_REPEAT
1289 { $class-description
1290 Using this mode, a texture will repeate infinitely in all directions.
1292 { $see-also TextureWrapMode }
1295 HELP: TEXTURE_WRAP_CLAMP
1296 { $class-description
1297 Using this mode, the edge pixels in a texture will
1298 be stretched out into infinity.
1300 { $see-also TextureWrapMode }
1304 TEXTURE_WRAP_MIRROR_REPEAT
1305 { $class-description
1306 Using this mode, the texture will repeat infinitely in all directions.
1307 However, each tiling will be mirrored compared to the previous tiling.
1310 { $see-also TextureWrapMode }
1313 HELP: TEXTURE_WRAP_MIRROR_CLAMP
1314 { $class-description
1315 This mode combines mirrored with clamped. The texture will infinitely
1316 tile the last pixel from the oppisite side.
1318 { $see-also TextureWrapMode }
1322 ! Cubemap layout enum
1325 Represents the layout a cube map is using.
1327 { $enum-members CubemapLayout }
1330 HELP: CUBEMAP_LAYOUT_AUTO_DETECT
1331 { $class-description
1332 Raylib will attempt to automatically detect the cubemap's layout type.
1334 { $see-also CubemapLayout }
1337 HELP: CUBEMAP_LAYOUT_LINE_VERTICAL
1338 { $class-description
1339 A cubemap who's layout is defined by a horizontal line with faces.
1341 { $see-also CubemapLayout }
1344 HELP: CUBEMAP_LAYOUT_LINE_HORIZONTAL
1345 { $class-description
1346 A cubemap who's layout is defined by a vertical line with faces.
1348 { $see-also CubemapLayout }
1351 HELP: CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR
1352 { $class-description
1353 A cubemap who's layout is defined by a 3x4 cross with cubemap faces.
1355 { $see-also CubemapLayout }
1358 HELP: CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE
1359 { $class-description
1360 A cubemap who's layout is defined by a 4x3 cross with cubemap faces.
1362 { $see-also CubemapLayout }
1365 HELP: CUBEMAP_LAYOUT_PANORAMA
1366 { $class-description
1367 A cubemap who's layout is defined by a panoramic image (equirectangular map).
1369 { $see-also CubemapLayout }
1376 A C-enum defining the various font generation methods in Raylib.
1378 { $enum-members FontType }
1382 { $class-description
1383 Default font generation with anti-aliasing.
1385 { $see-also FontType }
1389 { $class-description
1390 Bitmap font generation without anti-aliasing.
1392 { $see-also FontType }
1396 { $class-description
1397 SDF font generation. Requires an external shader.
1399 { $see-also FontType }
1406 A C-enum holding the OpenGL texture blend modes.
1409 { $enum-members BlendMode }
1413 { $class-description
1414 Blend mode for blending texturing while considering the alpha channel.
1415 This is the default mode.
1416 { $see-also BlendMode }
1419 HELP: BLEND_ADDITIVE
1420 { $class-description
1421 Blend mode for blending textures while adding colors
1422 { $see-also BlendMode }
1425 HELP: BLEND_MULTIPLIED
1426 { $class-description
1427 Blend mode for blending textures while multiplying colors.
1428 { $see-also BlendMode }
1431 HELP: BLEND_ADD_COLORS
1432 { $class-description
1433 Alternative blend mode to \ BLEND_ADDITIVE
1434 { $see-also BlendMode }
1437 HELP: BLEND_SUBTRACT_COLORS
1438 { $class-description
1439 Blend mode for blending textures while subtracting colors.
1440 { $see-also BlendMode }
1443 HELP: BLEND_ALPHA_PREMULTIPLY
1444 { $class-description
1445 Blend mode for blending premultipled textures while considering the alpha channel
1446 { $see-also BlendMode }
1450 { $class-description
1451 Blend mode for using custom src/dst factors. This is intended for use with
1452 { $snippet rl-set-blend-factors } from { $vocab-link "rlgl" } .
1453 { $see-also BlendMode }
1456 HELP: BLEND_CUSTOM_SEPARATE
1457 { $class-description
1458 Blend mode for using custom rgb/alpha seperate src/dst
1459 factors. This is intended for use with { $snippet rl-set-blend-factors-seperate }
1460 from { $vocab-link "rlgl" } .
1461 { $see-also BlendMode }
1468 Represents the various touch gestures Raylib supports.
1469 This enum is a set of bitflags to enable desired
1470 gestures individually.
1472 { $enum-members Gestures }
1476 { $class-description
1477 Used as the empty set of gestures.
1479 Has the value: { $snippet 0 }
1480 { $see-also Gestures }
1484 { $class-description
1485 Represents a tap gesture.
1487 Has the value: { $snippet 1 }
1488 { $see-also Gestures }
1491 HELP: GESTURE_DOUBLETAP
1492 { $class-description
1493 Represents a double tap gesture.
1495 Has the value: { $snippet 2 }
1496 { $see-also Gestures }
1500 { $class-description
1501 Represents a hold gesture.
1503 Has the value: { $snippet 4 }
1504 { $see-also Gestures }
1508 { $class-description
1509 Represents a drag gesture.
1511 Has the value: { $snippet 8 }
1512 { $see-also Gestures }
1514 HELP: GESTURE_SWIPE_RIGHT
1515 { $class-description
1516 Represents a swipe to the right.
1518 Has the value: { $snippet 16 }
1519 { $see-also Gestures }
1522 HELP: GESTURE_SWIPE_LEFT
1523 { $class-description
1524 Represents a swipe to the left
1526 Has the value: { $snippet 32 }
1527 { $see-also Gestures }
1530 HELP: GESTURE_SWIPE_UP
1531 { $class-description
1532 Represents a swap upwards.
1534 Has the value: { $snippet 64 }
1535 { $see-also Gestures }
1538 HELP: GESTURE_SWIPE_DOWN
1539 { $class-description
1540 Represents a swap downwards.
1542 Has the value: { $snippet 128 }
1543 { $see-also Gestures }
1546 HELP: GESTURE_PINCH_IN
1547 { $class-description
1548 Represents a inwards pinch.
1550 Has the value: { $snippet 256 }
1551 { $see-also Gestures }
1554 HELP: GESTURE_PINCH_OUT
1555 { $class-description
1556 Represents a outwards pinch.
1558 Has the value: { $snippet 512 }
1559 { $see-also Gestures }
1566 The various modes a camera can behave in Raylib.
1568 { $enum-members CameraMode }
1572 { $class-description
1573 A 3D camera with custom behavior.
1575 { $see-also CameraMode }
1579 { $class-description
1580 A \ Camera3D with unrestricted movement.
1582 { $see-also CameraMode }
1585 HELP: CAMERA_ORBITAL
1586 { $class-description
1587 A \ Camera3D that will orbit a fixed point in 3D space.
1589 { $see-also CameraMode }
1592 HELP: CAMERA_FIRST_PERSON
1593 { $class-description
1594 A \ Camera3D that cannot roll and looked on the up-axis.
1596 { $see-also CameraMode }
1599 HELP: CAMERA_THIRD_PERSON
1600 { $class-description
1601 Similiar to \ CAMERA_FIRST_PERSON , however the camera is focused
1604 { $see-also CameraMode }
1608 ! Camera projection enum
1609 HELP: CameraProjection
1611 Represents the projects a camera can use.
1613 { $enum-members CameraProjection }
1616 HELP: CAMERA_PERSPECTIVE
1617 { $class-description
1618 Sets a \ Camera3D to use a perspective projection.
1620 { $see-also CameraProjection }
1623 HELP: CAMERA_ORTHOGRAPHIC
1624 { $class-description
1625 Sets a \ Camera3D to use an orthographic projection. Parallel lines
1626 will stay parallel in this projection.
1628 { $see-also CameraProjection }
1632 ! N-patch layout enum
1635 Raylib features support for " \"n-patch\" " tiles. N-patches allow
1636 for texture to be automatically repeated and stretched. Raylib
1637 has support for the follow n-patch styles:
1639 { "3x3 (" { $link NPATCH_NINE_PATCH } ")" }
1640 { "1x3 (" { $link NPATCH_THREE_PATCH_VERTICAL } ")" }
1641 { "3x1 (" { $link NPATCH_THREE_PATCH_HORIZONTAL } ")" }
1644 See the following page for an example:
1646 { $url "https://www.raylib.com/examples/textures/loader.html?name=textures_npatch_drawing" }
1647 { $enum-members NPatchLayout }
1650 HELP: NPATCH_NINE_PATCH
1651 { $class-description
1652 Represents a 3x3 n-patch tile. This tile type can expand both horizontally
1653 and vertically. It has the following sections:
1655 { "4 corners that are neither stretched nor scaled." }
1656 { "4 edge tiles (top, bottom, left, right) that will be repeated
1657 vertically and horizontally." }
1658 { "1 center tile that will be stretched to fill the space between
1659 the edge tiles and corner tiles." }
1662 { $see-also NPatchLayout }
1665 HELP: NPATCH_THREE_PATCH_VERTICAL
1666 { $class-description
1667 Represents a 1x3 tiling that can be stretched vertically.
1669 { $see-also NPatchLayout }
1672 HELP: NPATCH_THREE_PATCH_HORIZONTAL
1673 { $class-description
1674 Represents a 3x1 tiling that can be streched vertically.
1676 { $see-also NPatchLayout }
1681 { $class-description
1682 Represents a 2D vector in Raylib. Implements the
1683 { $link "sequence-protocol" } .
1686 Values are all single-precision where
1687 as Factor is double precision (see \ alien.c-types:float ) }
1691 { $class-description
1692 Represents a 3D vector in Raylib. Implements the
1693 { $link "sequence-protocol" } .
1696 Values are all single-precision where
1697 as Factor is double precision (see \ alien.c-types:float ) }
1701 { $class-description
1702 Represents a 4D vector in Raylib. Implements the
1703 { $link "sequence-protocol" } .
1706 Values are all single-precision where
1707 as Factor is double precision (see \ alien.c-types:float ) }
1711 { $class-description
1712 A c-typedef for a \ Vector4 .
1717 { $class-description
1718 Represents a 4x4 OpenGL style matrix. It's right handed
1722 Values are all single-precision where
1723 as Factor is double precision (see \ alien.c-types:float ) }
1728 { $class-description
1729 Represents a RGBA color with 8-bit unsigned components.
1730 Raylib comes with 25 default colors.
1732 { $heading Builtin colors }
1762 { $class-description
1763 Represents a 2D rectangle defined by a x position, y position, width, and height.
1765 Values are all single-precision where
1766 as Factor is double precision (see \ alien.c-types:float ) }
1770 { $class-description
1771 Represents a stream of audio data in Raylib.
1773 { { $snippet buffer } " a pointer to the internal data used by the audio system." }
1774 { { $snippet processor } " a pointer to the interanl data processor, useful for audio effects." }
1775 { { $snippet sampleRate } " the frequence of the samples." }
1776 { { $snippet sampleSize } " the bit depth of the samples: spport values are 8, 16, and 32." }
1777 { { $snippet channels } " the number of channels: 1 for mono, 2 for stereo." }
1786 { $class-description
1787 Represents a camera in 3D space. The fields are defined as followed:
1789 { { $snippet position } " is the camera position in 3D space." }
1790 { { $snippet target } " is the target the camera is looking at." }
1791 { { $snippet up } " is the direction that faces up relative to the camera." }
1792 { { $snippet fovy } " is the camera's field of view aperature in degrees. Used as the near-plane for orthogrphic projections." }
1793 { { $snippet projection } " is the camera's projection:" { $link CAMERA_PERSPECTIVE } " or " { $link CAMERA_ORTHOGRAPHIC } }
1798 { $class-description
1799 Represents a camera in 2D space. The fields are defined
1802 { { $snippet offset } " is the camera offset (dispacement from target)" }
1803 { { $snippet target } " is the camera target (rotation and zoom origin)." }
1804 { { $snippet rotation } " is the camera rotation in degrees." }
1805 { { $snippet zoom } " is the camera zoom/scalling, should be 1.0f by default." }
1811 A c-typedef alias for \ Camera3D .
1818 { $class-description
1819 A skeletal animation bone.
1821 { { $snippet name } " is the name of the bone. Max 32 characters." }
1822 { { $snippet processor } " the parent index." }
1827 { $class-description
1828 Represents a 3D bounding box defined by two points:
1830 { { $snippet min } " The minimum vertex box-corner." }
1831 { { $snippet max } " The maxium vertex box-corner." }
1839 { $class-description
1840 A list of file paths returned from \ load-directory-files ,
1841 \ load-directory-files-ex . Must be freed with
1842 \ unload-directory-files .
1844 The fields are defined as followed:
1846 { { $snippet capacity } " the max number of entries." }
1847 { { $snippet count } " the number of entries found." }
1848 { { $snippet paths } " array of string where each member is a file path." }
1852 load-directory-files
1853 load-directory-files-ex
1854 unload-directory-files
1859 { $class-description
1860 Represents a collections of glyphs that can be drawn to the screen.
1861 The fields are defined as followed:
1864 { { $snippet baseSize } { " the base size of the characters. This is how tall a glyph is." } }
1865 { { $snippet glyphCount } { " the number of glyph characters." } }
1866 { { $snippet glyphPadding } { " the padding around each glyph." } }
1867 { { $snippet texture } { " the texture atlas continaing the glyphs." } }
1868 { { $snippet recs } { " an array of rectangles used to find each glyph in " { $snippet texture } "." } }
1869 { { $snippet glyphs } { " metadata about each glyph." } }
1877 HELP: LIGHTGRAY { $raylib-color "200, 200, 200, 255" } ;
1878 HELP: GRAY { $raylib-color "130, 130, 130, 255" } ;
1879 HELP: DARKGRAY { $raylib-color "80, 80, 80, 255" } ;
1880 HELP: YELLOW { $raylib-color "253, 249, 0, 255" } ;
1881 HELP: GOLD { $raylib-color "255, 203, 0, 255" } ;
1882 HELP: ORANGE { $raylib-color "255, 161, 0, 255" } ;
1883 HELP: PINK { $raylib-color "255, 109, 194, 255" } ;
1884 HELP: RED { $raylib-color "230, 41, 55, 255" } ;
1885 HELP: MAROON { $raylib-color "190, 33, 55, 255" } ;
1886 HELP: GREEN { $raylib-color "0, 228, 48, 255" } ;
1887 HELP: LIME { $raylib-color "0, 158, 47, 255" } ;
1888 HELP: DARKGREEN { $raylib-color "0, 117, 44, 255" } ;
1889 HELP: SKYBLUE { $raylib-color "102, 191, 255, 255" } ;
1890 HELP: BLUE { $raylib-color "0, 121, 241, 255" } ;
1891 HELP: DARKBLUE { $raylib-color "0, 82, 172, 255" } ;
1892 HELP: PURPLE { $raylib-color "200, 122, 255, 255" } ;
1893 HELP: VIOLET { $raylib-color "135, 60, 190, 255 " } ;
1894 HELP: DARKPURPLE { $raylib-color "112, 31, 126, 255 " } ;
1895 HELP: BEIGE { $raylib-color "211, 176, 131, 255" } ;
1896 HELP: BROWN { $raylib-color "127, 106, 79, 255 " } ;
1897 HELP: DARKBROWN { $raylib-color "76, 63, 47, 255" } ;
1899 HELP: WHITE { $raylib-color "255, 255, 255, 255" } ;
1900 HELP: BLACK { $raylib-color "0, 0, 0, 255" } ;
1901 HELP: BLANK { $raylib-color "0, 0, 0, 0" } ;
1902 HELP: MAGENTA { $raylib-color "255, 0, 255, 255" } ;
1903 HELP: RAYWHITE { $raylib-color "245, 245, 245, 255" } ;
1905 ! Window-related functions
1915 "Initialize window and OpenGL context"
1918 HELP: window-should-close
1920 "Check if KEY_ESCAPE pressed or Close icon pressed"
1925 "Close window and unload OpenGL context"
1928 HELP: is-window-ready
1930 "Check if window has been initialized successfully"
1933 HELP: is-window-fullscreen
1935 "Check if window is currently fullscreen"
1938 HELP: is-window-hidden
1940 "Check if window is currently hidden (only PLATFORM_DESKTOP)"
1943 HELP: is-window-minimized
1945 "Check if window is currently minimized (only PLATFORM_DESKTOP)"
1948 HELP: is-window-maximized
1950 "Check if window is currently maximized (only PLATFORM_DESKTOP)"
1953 HELP: is-window-focused
1955 "Check if window is currently focused (only PLATFORM_DESKTOP)"
1958 HELP: is-window-resized
1960 "Check if window has been resized last frame"
1963 HELP: is-window-state
1970 "Check if one specific window flag is enabled"
1973 HELP: set-window-state
1980 "Set window configuration state using flags"
1983 HELP: clear-window-state
1990 "Clear window configuration state flags"
1993 HELP: toggle-fullscreen
1995 "Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)"
1998 HELP: maximize-window
2000 "Set window state: maximized, if resizable (only PLATFORM_DESKTOP)"
2003 HELP: minimize-window
2005 "Set window state: minimized, if resizable (only PLATFORM_DESKTOP)"
2008 HELP: restore-window
2010 "Set window state: not minimized/maximized (only PLATFORM_DESKTOP)"
2013 HELP: set-window-icon
2020 "Set icon for window (only PLATFORM_DESKTOP)"
2023 HELP: set-window-icons
2025 image: { "a " { $link pointer } " to a " { $link Image } }
2028 HELP: set-window-title
2035 "Set title for window (only PLATFORM_DESKTOP)"
2038 HELP: set-window-position
2046 "Set window position on screen (only PLATFORM_DESKTOP)"
2049 HELP: set-window-monitor
2056 "Set monitor for the current window (fullscreen mode)"
2059 HELP: set-window-min-size
2067 "Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)"
2070 HELP: set-window-size
2078 "Set window dimensions"
2081 HELP: set-window-opacity
2088 "Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)"
2091 HELP: get-window-handle
2093 "Get native window handle"
2096 HELP: get-screen-width
2098 "Get current screen width"
2101 HELP: get-screen-height
2103 "Get current screen height"
2106 HELP: get-render-width
2108 "Get current render width (it considers HiDPI)"
2111 HELP: get-render-height
2113 "Get current render height (it considers HiDPI)"
2116 HELP: get-monitor-count
2118 "Get number of connected monitors"
2121 HELP: get-current-monitor
2123 "Get current connected monitor"
2126 HELP: get-monitor-position
2133 "Get specified monitor position"
2136 HELP: get-monitor-width
2143 "Get specified monitor width (max available by monitor)"
2146 HELP: get-monitor-height
2153 "Get specified monitor height (max available by monitor)"
2156 HELP: get-monitor-physical-width
2163 "Get specified monitor physical width in millimetres"
2166 HELP: get-monitor-physical-height
2173 "Get specified monitor physical height in millimetres"
2176 HELP: get-monitor-refresh-rate
2183 "Get specified monitor refresh rate"
2186 HELP: get-window-position
2188 "Get window position XY on monitor"
2191 HELP: get-window-scale-dpi
2193 "Get window scale DPI factor"
2196 HELP: get-monitor-name
2203 "Get the human-readable, UTF-8 encoded name of the primary monitor"
2206 HELP: set-clipboard-text
2213 "Set clipboard text content"
2216 HELP: get-clipboard-text
2218 "Get clipboard text content"
2221 HELP: enable-event-waiting
2223 "Enable waiting for events on EndDrawing(), no automatic event polling"
2226 HELP: disable-event-waiting
2228 "Disable waiting for events on EndDrawing(), automatic events polling"
2232 ! Custom frame control functions
2233 ! NOTE: Those functions are intended for advance users that want full control over the frame processing
2234 ! By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timming + PollInputEvents()
2235 ! To avoid that behavior and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
2236 HELP: swap-screen-buffer
2238 "Swap back buffer with front buffer (screen drawing)"
2241 "Those functions are intended for advance users that want"
2242 " full control over the frame processing. By default"
2243 " EndDrawing() does this job: \n\t- draws everything"
2244 "\n\t- " { $link swap-screen-buffer }
2245 "\n\t- manage frame timming"
2246 "\n\t- " { $link poll-input-events } ".\n"
2247 "To avoid that behavior and control frame processes manually,"
2248 " enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL" }
2251 HELP: poll-input-events
2253 "Register all input events"
2256 "Those functions are intended for advance users that want"
2257 " full control over the frame processing. By default"
2258 " EndDrawing() does this job: \n\t- draws everything"
2259 "\n\t- " { $link swap-screen-buffer }
2260 "\n\t- manage frame timming"
2261 "\n\t- " { $link poll-input-events } ".\n"
2262 "To avoid that behavior and control frame processes manually,"
2263 " enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL" }
2273 "Wait for some milliseconds (halt program execution)"
2276 "Those functions are intended for advance users that want"
2277 " full control over the frame processing. By default"
2278 " EndDrawing() does this job: \n\t- draws everything"
2279 "\n\t- " { $link swap-screen-buffer }
2280 "\n\t- manage frame timming"
2281 "\n\t- " { $link poll-input-events } ".\n"
2282 "To avoid that behavior and control frame processes manually,"
2283 " enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL" }
2287 ! Cursor-related functions
2298 HELP: is-cursor-hidden
2300 "Check if cursor is not visible"
2305 "Enables cursor (unlock cursor)"
2308 HELP: disable-cursor
2310 "Disables cursor (lock cursor)"
2313 HELP: is-cursor-on-screen
2315 "Check if cursor is on the screen"
2319 ! Drawing-related functions
2320 HELP: clear-background
2327 "Set background color (framebuffer clear color)"
2332 "Setup canvas (framebuffer) to start drawing"
2337 "End canvas drawing and swap buffers (double buffering)"
2347 "Begin 2D mode with custom camera (2D)"
2352 "Ends 2D mode with custom camera"
2362 "Begin 3D mode with custom camera (3D)"
2367 "Ends 3D mode and returns to default 2D orthographic mode"
2370 HELP: begin-texture-mode
2372 target: RenderTexture2D
2377 "Begin drawing to render texture"
2380 HELP: end-texture-mode
2382 "Ends drawing to render texture"
2385 HELP: begin-shader-mode
2392 "Begin custom shader drawing"
2395 HELP: end-shader-mode
2397 "End custom shader drawing (use default shader)"
2400 HELP: begin-blend-mode
2407 "Begin blending mode (alpha, additive, multiplied, subtract, custom)"
2410 HELP: end-blend-mode
2412 "End blending mode (reset to default: alpha blending)"
2415 HELP: begin-scissor-mode
2425 "Begin scissor mode (define screen area for following drawing)"
2428 HELP: end-scissor-mode
2433 HELP: begin-vr-stereo-mode
2435 config: VrStereoConfig
2440 "Begin stereo rendering (requires VR simulator)"
2443 HELP: end-vr-stereo-mode
2445 "End stereo rendering (requires VR simulator)"
2449 ! VR stereo config functions for VR simulator
2450 HELP: load-vr-stereo-config
2452 device: VrDeviceInfo
2457 "Load VR stereo config for VR simulator device parameters"
2460 HELP: unload-vr-stereo-config
2462 config: VrStereoConfig
2467 "Unload VR stereo config"
2471 ! Shader management functions
2472 ! NOTE: Shader functionality is not available on OpenGL 1.1
2475 vsFileName: c-string
2476 fsFileName: c-string
2481 "Load shader from files and bind default locations"
2484 "Shader functionality is not available on OpenGL 1.1" }
2487 HELP: load-shader-from-memory
2495 "Load shader from code strings and bind default locations"
2497 "Shader functionality is not available on OpenGL 1.1" }
2500 HELP: is-shader-ready
2507 "Check if a shader is ready"
2509 "Shader functionality is not available on OpenGL 1.1" }
2512 HELP: get-shader-location
2515 uniformName: c-string
2520 "Get shader uniform location"
2522 "Shader functionality is not available on OpenGL 1.1" }
2525 HELP: get-shader-location-attrib
2528 attribName: c-string
2533 "Get shader attribute location"
2535 "Shader functionality is not available on OpenGL 1.1" }
2538 HELP: set-shader-value
2543 uniformType: ShaderUniformDataType
2548 "Set shader uniform value"
2550 "Shader functionality is not available on OpenGL 1.1" }
2553 HELP: set-shader-value-v
2558 uniformType: ShaderUniformDataType
2564 "Set shader uniform value vector"
2566 "Shader functionality is not available on OpenGL 1.1" }
2569 HELP: set-shader-value-matrix
2578 "Set shader uniform value (matrix 4x4)"
2580 "Shader functionality is not available on OpenGL 1.1" }
2583 HELP: set-shader-value-texture
2592 "Set shader uniform value for texture (sampler2d)"
2594 "Shader functionality is not available on OpenGL 1.1" }
2604 "Unload shader from GPU memory (VRAM)"
2606 "Shader functionality is not available on OpenGL 1.1" }
2610 ! Screen-space-related functions
2613 mousePosition: Vector2
2619 "Get a ray trace from mouse position"
2622 HELP: get-camera-matrix
2629 "Get camera transform matrix (view matrix)"
2632 HELP: get-camera-matrix-2d
2639 "Get camera 2d transform matrix"
2642 HELP: get-world-to-screen
2650 "Get the screen space position for a 3d world space position"
2653 HELP: get-world-to-screen-2d
2661 "Get the screen space position for a 2d camera world space position"
2664 HELP: get-world-to-screen-ex
2674 "Get size position for a 3d world space position"
2677 HELP: get-screen-to-world-2d
2685 "Get the world space position for a 2d camera screen space position"
2689 ! Timing-related functions
2690 HELP: set-target-fps
2697 "Set target FPS (maximum)"
2705 HELP: get-frame-time
2707 "Get time in seconds for last frame drawn (delta time)"
2712 "Get elapsed time in seconds since InitWindow()"
2717 HELP: get-random-value
2725 "Get a random value between min and max (both included)"
2728 HELP: set-random-seed
2735 "Set the seed for the random number generator"
2738 HELP: take-screenshot
2745 "Takes a screenshot of current screen (filename extension defines format)"
2748 HELP: set-config-flags
2755 "Setup init configuration flags (view FLAGS)"
2758 HELP: set-trace-log-level
2765 "Set the current threshold (minimum) log level"
2775 "Internal memory allocator"
2786 "Internal memory reallocator"
2796 "Internal memory free"
2807 "Open URL with default system browser (if available)"
2811 ! Files management functions
2812 HELP: load-file-data
2815 bytesRead: { "a " { $link pointer } " to a " { $link uint } }
2820 "Load file data as byte array (read)"
2823 HELP: unload-file-data
2830 "Unload file data allocated by LoadFileData()"
2833 HELP: save-file-data
2842 "Save data to file from byte array (write), returns true on success"
2845 HELP: export-data-as-code
2847 data: { "a " { $link pointer } " to a " { $link uchar } }
2854 "Export data to code (.h), returns true on success"
2857 HELP: load-file-text
2864 "Load text data from file (read), returns a '\0' terminated string"
2867 HELP: unload-file-text
2874 "Unload file text data allocated by LoadFileText()"
2877 HELP: save-file-text
2885 "Save text data to file (write), string must be '\0' terminated, returns true on success"
2895 "Check if file exists"
2898 HELP: directory-exists
2905 "Check if a directory path exists"
2908 HELP: is-file-extension
2916 "Check file extension (including point: .png, .wav)"
2919 HELP: get-file-length
2926 "Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)"
2929 HELP: get-file-extension
2936 "Get pointer to extension for a filename string (includes dot: '.png')"
2946 "Get pointer to filename for a path string"
2949 HELP: get-file-name-without-ext
2956 "Get filename string without extension (uses static string)"
2959 HELP: get-directory-path
2966 "Get full path for a given fileName with path (uses static string)"
2969 HELP: get-prev-directory-path
2976 "Get previous directory path for a given path (uses static string)"
2979 HELP: get-working-directory
2981 "Get current working directory (uses static string)"
2984 HELP: get-application-directory
2986 "Get the directory if the running application (uses static string)"
2989 HELP: change-directory
2996 "Change working directory, return true on success"
3006 "Check if a given path is a file or a directory"
3009 HELP: load-directory-files
3016 "Get filenames in a directory path (memory should be freed)"
3019 HELP: load-directory-files-ex
3028 "Get filenames in a directory path (memory should be freed)"
3031 HELP: unload-directory-files
3038 "Clear directory files paths buffers (free memory)"
3041 HELP: is-file-dropped
3043 "Check if a file has been dropped into window"
3046 HELP: load-dropped-files
3048 "Get dropped files names (memory should be freed)"
3051 HELP: unload-dropped-files
3058 "Clear dropped files paths buffer (free memory)"
3061 HELP: get-file-mod-time
3068 "Get file modification time (last write time)"
3072 ! Compression/Encoding functionality
3075 data: { "a " { $link pointer } " to a " { $link uchar } }
3077 compDataLength: { "a " { $link pointer } " to a " { $link int } }
3082 "Compress data (DEFLATE algorithm)"
3085 HELP: decompress-data
3087 compData: { "a " { $link pointer } " to a " { $link uchar } }
3089 dataLength: { "a " { $link pointer } " to a " { $link int } }
3094 "Decompress data (DEFLATE algorithm)"
3097 HELP: encode-data-base64
3099 data: { "a " { $link pointer } " to a " { $link uchar } }
3101 outputLength: { "a " { $link pointer } " to a " { $link int } }
3106 "Encode data to Base64 string"
3109 HELP: decode-data-base64
3111 data: { "a " { $link pointer } " to a " { $link uchar } }
3112 outputLength: { "a " { $link pointer } " to a " { $link int } }
3117 "Decode Base64 string data"
3121 ! ------------------------------------------------------------------------------------
3122 ! Input Handling Functions (Module: core)
3123 ! ------------------------------------------------------------------------------------
3125 ! Input-related functions: keyboard
3126 HELP: is-key-pressed
3133 "Check if a key has been pressed once"
3143 "Check if a key is being pressed"
3146 HELP: is-key-released
3153 "Check if a key has been released once"
3163 "Check if a key is NOT being pressed"
3173 "Set a custom key to exit program (default is ESC)"
3176 HELP: get-key-pressed
3178 "Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty"
3181 HELP: get-char-pressed
3183 "Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty"
3187 ! Input-related functions: gamepads
3188 HELP: is-gamepad-available
3195 "Check if a gamepad is available"
3198 HELP: get-gamepad-name
3205 "Get gamepad internal name id"
3208 HELP: is-gamepad-button-pressed
3211 button: GamepadButton
3216 "Check if a gamepad button has been pressed once"
3219 HELP: is-gamepad-button-down
3222 button: GamepadButton
3227 "Check if a gamepad button is being pressed"
3230 HELP: is-gamepad-button-released
3233 button: GamepadButton
3238 "Check if a gamepad button has been released once"
3241 HELP: is-gamepad-button-up
3244 button: GamepadButton
3249 "Check if a gamepad button is NOT being pressed"
3252 HELP: get-gamepad-button-pressed
3254 "Get the last gamepad button pressed"
3257 HELP: get-gamepad-axis-count
3264 "Get gamepad axis count for a gamepad"
3267 HELP: get-gamepad-axis-movement
3275 "Get axis movement value for a gamepad axis"
3278 HELP: set-gamepad-mappings
3285 "Set internal gamepad mappings (SDL_GameControllerDB)"
3289 ! Input-related functions: mouse
3290 HELP: is-mouse-button-pressed
3297 "Check if a mouse button has been pressed once"
3300 HELP: is-mouse-button-down
3307 "Check if a mouse button is being pressed"
3310 HELP: is-mouse-button-released
3317 "Check if a mouse button has been released once"
3320 HELP: is-mouse-button-up
3327 "Check if a mouse button is NOT being pressed"
3332 "Get mouse position X"
3337 "Get mouse position Y"
3340 HELP: get-mouse-position
3342 "Get mouse position XY"
3345 HELP: get-mouse-delta
3347 "Get mouse delta between frames"
3350 HELP: set-mouse-position
3358 "Set mouse position XY"
3361 HELP: set-mouse-offset
3372 HELP: set-mouse-scale
3383 HELP: get-mouse-wheel-move
3385 "Get mouse wheel movement Y"
3388 HELP: get-mouse-wheel-move-v
3390 "Get mouse wheel movement for both X and Y"
3393 HELP: set-mouse-cursor
3404 ! Input-related functions: touch
3407 "Get touch position X for touch point 0 (relative to screen size)"
3412 "Get touch position Y for touch point 0 (relative to screen size)"
3415 HELP: get-touch-position
3422 "Get touch position XY for a touch point index (relative to screen size)"
3425 HELP: get-touch-point-id
3432 "Get touch point identifier for given index"
3435 HELP: get-touch-point-count
3437 "Get number of touch points"
3441 ! ------------------------------------------------------------------------------------
3442 ! Gestures and Touch Handling Functions (Module: rgestures)
3443 ! ------------------------------------------------------------------------------------
3444 HELP: set-gestures-enabled
3451 "Enable a set of gestures using flags"
3454 HELP: is-gesture-detected
3461 "Check if a gesture have been detected"
3464 HELP: get-gesture-detected
3466 "Get latest detected gesture"
3469 HELP: get-gesture-hold-duration
3471 "Get gesture hold time in milliseconds"
3474 HELP: get-gesture-drag-vector
3476 "Get gesture drag vector"
3479 HELP: get-gesture-drag-angle
3481 "Get gesture drag angle"
3484 HELP: get-gesture-pinch-vector
3486 "Get gesture pinch delta"
3489 HELP: get-gesture-pinch-angle
3491 "Get gesture pinch angle"
3495 ! ------------------------------------------------------------------------------------
3496 ! Camera System Functions (Module: rcamera)
3497 ! ------------------------------------------------------------------------------------
3501 camera: { "a " { $link pointer } " to a " { $link Camera } }
3507 "Update camera position for selected mode"
3510 HELP: update-camera-pro
3512 camera: { "a " { $link pointer } " to a " { $link Camera } }
3520 "Update camera movement/rotation"
3524 ! ------------------------------------------------------------------------------------
3525 ! Basic Shapes Drawing Functions (Module: shapes)
3526 ! ------------------------------------------------------------------------------------
3527 ! Set texture and rectangle to be used on shapes drawing
3528 ! NOTE: It can be useful when using basic shapes and one single font,
3529 ! defining a font char white rectangle would allow drawing everything in a single draw call
3530 HELP: set-shapes-texture
3537 "Set texture and rectangle to be used on shapes drawing"
3541 ! Basic shapes drawing functions
3562 "Draw a pixel (Vector version)"
3588 "Draw a line (Vector version)"
3601 "Draw a line defining thickness"
3604 HELP: draw-line-bezier
3614 "Draw a line using cubic-bezier curves in-out"
3617 HELP: draw-line-bezier-quad
3628 "Draw line using quadratic bezier curves with a control point"
3631 HELP: draw-line-bezier-cubic
3635 startControlPos: Vector2
3636 endControlPos: Vector2
3643 "Draw line using cubic bezier curves with 2 control points"
3646 HELP: draw-line-strip
3648 points: { "a " { $link pointer } " to a " { $link Vector2 } }
3655 "Draw lines sequence"
3668 "Draw a color-filled circle"
3671 HELP: draw-circle-sector
3683 "Draw a piece of a circle"
3686 HELP: draw-circle-sector-lines
3698 "Draw circle sector outline"
3701 HELP: draw-circle-gradient
3712 "Draw a gradient-filled circle"
3724 "Draw a color-filled circle (Vector version)"
3727 HELP: draw-circle-lines
3737 "Draw circle outline"
3754 HELP: draw-ellipse-lines
3765 "Draw ellipse outline"
3784 HELP: draw-ring-lines
3800 HELP: draw-rectangle
3811 "Draw a color-filled rectangle"
3814 HELP: draw-rectangle-v
3823 "Draw a color-filled rectangle (Vector version)"
3826 HELP: draw-rectangle-rec
3834 "Draw a color-filled rectangle"
3837 HELP: draw-rectangle-pro
3847 "Draw a color-filled rectangle with pro parameters"
3850 HELP: draw-rectangle-gradient-v
3862 "Draw a vertical-gradient-filled rectangle"
3865 HELP: draw-rectangle-gradient-h
3877 "Draw a horizontal-gradient-filled rectangle"
3880 HELP: draw-rectangle-gradient-ex
3891 "Draw a gradient-filled rectangle with custom vertex colors"
3894 HELP: draw-rectangle-lines
3905 "Draw rectangle outline"
3908 HELP: draw-rectangle-lines-ex
3917 "Draw rectangle outline with extended parameters"
3920 HELP: draw-rectangle-rounded
3930 "Draw rectangle with rounded edges"
3933 HELP: draw-rectangle-rounded-lines
3944 "Draw rectangle with rounded edges outline"
3957 "Draw a color-filled triangle (vertex in counter-clockwise order!)"
3960 HELP: draw-triangle-lines
3970 "Draw triangle outline (vertex in counter-clockwise order!)"
3973 HELP: draw-triangle-fan
3975 points: { "a " { $link pointer } " to a " { $link Vector2 } }
3982 "Draw a triangle fan defined by points (first vertex is the center)"
3985 HELP: draw-triangle-strip
3987 points: { "a " { $link pointer } " to a " { $link Vector2 } }
3994 "Draw a triangle strip defined by points"
4008 "Draw a regular polygon (Vector version)"
4011 HELP: draw-poly-lines
4022 "Draw a polygon outline of n sides"
4025 HELP: draw-poly-lines-ex
4037 "Draw a polygon outline of n sides with extended parameters"
4041 ! Basic shapes collision detection functions
4042 HELP: check-collision-recs
4050 "Check collision between two rectangles"
4053 HELP: check-collision-circles
4063 "Check collision between two circles"
4066 HELP: check-collision-circle-rec
4075 "Check collision between circle and rectangle"
4078 HELP: check-collision-point-rec
4086 "Check if point is inside rectangle"
4089 HELP: check-collision-point-circle
4098 "Check if point is inside circle"
4101 HELP: check-collision-point-triangle
4111 "Check if point is inside a triangle"
4114 HELP: check-collision-point-poly
4117 points: { "a " { $link pointer } " to a " { $link Vector2 } }
4123 "Check if point is within a polygon described by array of vertices"
4126 HELP: check-collision-lines
4132 collisionPoint: { "a " { $link pointer } " to a " { $link Vector2 } }
4137 "Check the collision between two lines defined by two points each, returns collision point by reference"
4140 HELP: check-collision-point-line
4150 "Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]"
4153 HELP: get-collision-rec
4161 "Get collision rectangle for two rectangles collision"
4165 ! ------------------------------------------------------------------------------------
4166 ! Texture Loading and Drawing Functions (Module: textures)
4167 ! ------------------------------------------------------------------------------------
4169 ! Image loading functions
4170 ! NOTE: This functions do not require GPU access
4178 "Load image from file into CPU memory (RAM). "
4181 HELP: load-image-raw
4192 "Load image from RAW file data."
4195 HELP: load-image-anim
4198 frames: { "a " { $link pointer } " to a " { $link int } }
4203 "Load image sequence from file (frames appended to image.data)"
4206 HELP: load-image-from-memory
4215 "Load image from memory buffer, fileType refers to extension: i.e. '.png'"
4218 HELP: load-image-from-texture
4225 "Load image from GPU texture data"
4228 HELP: load-image-from-screen
4230 "Load image from screen buffer and (screenshot)"
4233 HELP: is-image-ready
4240 "Check if an image is ready"
4250 "Unload image from CPU memory (RAM)"
4261 "Export image data to file, returns true on success"
4264 HELP: export-image-as-code
4272 "Export image as code file defining an array of bytes, returns true on success"
4276 ! Image generation functions
4277 HELP: gen-image-color
4286 "Generate image: plain color"
4289 HELP: gen-image-gradient-v
4299 "Generate image: vertical gradient"
4302 HELP: gen-image-gradient-h
4312 "Generate image: horizontal gradient"
4315 HELP: gen-image-gradient-radial
4326 "Generate image: radial gradient"
4329 HELP: gen-image-checked
4341 "Generate image: checked"
4344 HELP: gen-image-white-noise
4353 "Generate image: white noise"
4356 HELP: gen-image-perlin-noise
4367 "Generate image: perlin noise"
4370 HELP: gen-image-cellular
4379 "Generate image: cellular algorithm, bigger tileSize means bigger cells"
4382 HELP: gen-image-text
4391 "Generate image: text"
4395 ! Image manipulation functions
4403 "Create an image duplicate (useful for transformations)"
4406 HELP: image-from-image
4414 "Create an image from another image piece"
4426 "Create an image from text (default font)"
4440 "Create an image from text (custom sprite font)"
4445 image: { "a " { $link pointer } " to a " { $link Image } }
4451 "Convert image data to desired format"
4456 image: { "a " { $link pointer } " to a " { $link Image } }
4462 "Convert image to POT (power-of-two)"
4467 image: { "a " { $link pointer } " to a " { $link Image } }
4473 "Crop an image to a defined rectangle"
4476 HELP: image-alpha-crop
4478 image: { "a " { $link pointer } " to a " { $link Image } }
4484 "Crop image depending on alpha value"
4487 HELP: image-alpha-clear
4489 image: { "a " { $link pointer } " to a " { $link Image } }
4496 "Clear alpha channel to desired color"
4499 HELP: image-alpha-mask
4501 image: { "a " { $link pointer } " to a " { $link Image } }
4507 "Apply alpha mask to image"
4510 HELP: image-alpha-premultiply
4512 image: { "a " { $link pointer } " to a " { $link Image } }
4517 "Premultiply alpha channel"
4520 HELP: image-blur-gaussian
4522 image: { "a " { $link pointer } " to a " { $link Image } }
4528 "Blur image with gaussian"
4533 image: { "a " { $link pointer } " to a " { $link Image } }
4540 "Resize image (Bicubic scaling algorithm)"
4543 HELP: image-resize-nn
4545 image: { "a " { $link pointer } " to a " { $link Image } }
4552 "Resize image (Nearest-Neighbor scaling algorithm)"
4555 HELP: image-resize-canvas
4557 image: { "a " { $link pointer } " to a " { $link Image } }
4567 "Resize canvas and fill with color"
4572 image: { "a " { $link pointer } " to a " { $link Image } }
4577 "Compute all mipmap levels for a provided image"
4582 image: { "a " { $link pointer } " to a " { $link Image } }
4591 "Dither image data to 16bpp or lower (Floyd-Steinberg dithering)"
4594 HELP: image-flip-vertical
4596 image: { "a " { $link pointer } " to a " { $link Image } }
4601 "Flip image vertically"
4604 HELP: image-flip-horizontal
4606 image: { "a " { $link pointer } " to a " { $link Image } }
4611 "Flip image horizontally"
4614 HELP: image-rotate-cw
4616 image: { "a " { $link pointer } " to a " { $link Image } }
4621 "Rotate image clockwise 90deg"
4624 HELP: image-rotate-ccw
4626 image: { "a " { $link pointer } " to a " { $link Image } }
4631 "Rotate image counter-clockwise 90deg"
4634 HELP: image-color-tint
4636 image: { "a " { $link pointer } " to a " { $link Image } }
4642 "Modify image color: tint"
4645 HELP: image-color-invert
4647 image: { "a " { $link pointer } " to a " { $link Image } }
4652 "Modify image color: invert"
4655 HELP: image-color-grayscale
4657 image: { "a " { $link pointer } " to a " { $link Image } }
4662 "Modify image color: grayscale"
4665 HELP: image-color-contrast
4667 image: { "a " { $link pointer } " to a " { $link Image } }
4673 "Modify image color: contrast (-100 to 100)"
4676 HELP: image-color-brightness
4678 image: { "a " { $link pointer } " to a " { $link Image } }
4684 "Modify image color: brightness (-255 to 255)"
4687 HELP: image-color-replace
4689 image: { "a " { $link pointer } " to a " { $link Image } }
4696 "Modify image color: replace color"
4699 HELP: load-image-colors
4706 "Load color data from image as a Color array (RGBA - 32bit)"
4709 HELP: load-image-palette
4713 colorCount: { "a " { $link pointer } " to a " { $link int } }
4718 "Load colors palette from image as a Color array (RGBA - 32bit)"
4721 HELP: unload-image-colors
4723 colors: { "a " { $link pointer } " to a " { $link Color } }
4728 "Unload color data loaded with LoadImageColors()"
4731 HELP: unload-image-palette
4733 colors: { "a " { $link pointer } " to a " { $link Color } }
4738 "Unload colors palette loaded with LoadImagePalette()"
4741 HELP: get-image-alpha-border
4749 "Get image alpha border rectangle"
4752 HELP: get-image-color
4761 "Get image pixel color at (x, y) position"
4765 ! Image drawing functions
4766 ! NOTE: Image software-rendering functions (CPU)
4767 HELP: image-clear-background
4769 dst: { "a " { $link pointer } " to a " { $link Image } }
4775 "Clear image background with given color"
4778 HELP: image-draw-pixel
4780 dst: { "a " { $link pointer } " to a " { $link Image } }
4788 "Draw pixel within an image"
4791 HELP: image-draw-pixel-v
4793 dst: { "a " { $link pointer } " to a " { $link Image } }
4800 "Draw pixel within an image (Vector version)"
4803 HELP: image-draw-line
4805 dst: { "a " { $link pointer } " to a " { $link Image } }
4815 "Draw line within an image"
4818 HELP: image-draw-line-v
4820 dst: { "a " { $link pointer } " to a " { $link Image } }
4828 "Draw line within an image (Vector version)"
4831 HELP: image-draw-circle
4833 dst: { "a " { $link pointer } " to a " { $link Image } }
4842 "Draw circle within an image"
4845 HELP: image-draw-circle-v
4847 dst: { "a " { $link pointer } " to a " { $link Image } }
4855 "Draw circle within an image (Vector version)"
4858 HELP: image-draw-circle-lines
4860 dst: { "a " { $link pointer } " to a " { $link Image } }
4869 "Draw circle within an image"
4872 HELP: image-draw-circle-lines-v
4874 dst: { "a " { $link pointer } " to a " { $link Image } }
4882 "Draw circle within an image (Vector version)"
4885 HELP: image-draw-rectangle
4887 dst: { "a " { $link pointer } " to a " { $link Image } }
4897 "Draw rectangle within an image"
4900 HELP: image-draw-rectangle-v
4902 dst: { "a " { $link pointer } " to a " { $link Image } }
4910 "Draw rectangle within an image (Vector version)"
4913 HELP: image-draw-rectangle-rec
4915 dst: { "a " { $link pointer } " to a " { $link Image } }
4922 "Draw rectangle within an image"
4925 HELP: image-draw-rectangle-lines
4927 dst: { "a " { $link pointer } " to a " { $link Image } }
4935 "Draw rectangle lines within an image"
4940 dst: { "a " { $link pointer } " to a " { $link Image } }
4949 "Draw a source image within a destination image (tint applied to source)"
4952 HELP: image-draw-text
4954 dst: { "a " { $link pointer } " to a " { $link Image } }
4964 "Draw text (using default font) within an image (destination)"
4967 HELP: image-draw-text-ex
4969 dst: { "a " { $link pointer } " to a " { $link Image } }
4980 "Draw text (custom sprite font) within an image (destination)"
4984 ! Texture loading functions
4985 ! NOTE: These functions require GPU access
4993 "Load texture from file into GPU memory (VRAM)"
4996 HELP: load-texture-from-image
5003 "Load texture from image data"
5006 HELP: load-texture-cubemap
5009 layout: CubemapLayout
5014 "Load cubemap from image, multiple image cubemap layouts supported"
5017 HELP: load-render-texture
5025 "Load texture for rendering (framebuffer)"
5028 HELP: is-texture-ready
5035 "Check if a texture is ready"
5038 HELP: unload-texture
5045 "Unload texture from GPU memory (VRAM)"
5048 HELP: is-render-texture-ready
5050 target: RenderTexture2D
5055 "Check if a render texture is ready"
5058 HELP: unload-render-texture
5060 target: RenderTexture2D
5065 "Unload render texture from GPU memory (VRAM)"
5068 HELP: update-texture
5076 "Update GPU texture with new data"
5079 HELP: update-texture-rec
5088 "Update GPU texture rectangle with new data"
5092 ! Texture configuration functions
5093 HELP: gen-texture-mipmaps
5095 texture: { "a " { $link pointer } " to a " { $link Texture2D } }
5100 "Generate GPU mipmaps for a texture"
5103 HELP: set-texture-filter
5106 filter: TextureFilterMode
5111 "Set texture scaling filter mode"
5114 HELP: set-texture-wrap
5117 wrap: TextureWrapMode
5122 "Set texture wrapping mode"
5126 ! Texture drawing functions
5140 HELP: draw-texture-v
5149 "Draw a Texture2D with position defined as Vector2"
5152 HELP: draw-texture-ex
5163 "Draw a Texture2D with extended parameters"
5166 HELP: draw-texture-rec
5176 "Draw a part of a texture defined by a rectangle"
5179 HELP: draw-texture-pro
5191 "Draw a part of a texture defined by a rectangle with 'pro' parameters"
5194 HELP: draw-texture-npatch
5197 nPatchInfo: NPatchInfo
5206 "Draws a texture (or part of it) that stretches or shrinks nicely"
5210 ! Color/pixel related functions
5219 "Get color with alpha applied, alpha goes from 0.0f to 1.0f"
5229 "Get hexadecimal value for a Color"
5232 HELP: color-normalize
5239 "Get Color normalized as float [0..1]"
5242 HELP: color-from-normalized
5249 "Get Color from normalized values [0..1]"
5259 "Get HSV values for a Color, hue [0..360], saturation/value [0..1]"
5262 HELP: color-from-hsv
5271 "Get a Color from HSV values, hue [0..360], saturation/value [0..1]"
5282 "Get color with tint"
5285 HELP: color-brightness
5293 "Get color with brightness"
5296 HELP: color-contrast
5304 "Get color with contrast"
5315 "Get color with alpha applied, alpha goes from 0.0f to 1.0f"
5318 HELP: color-alpha-blend
5327 "Get src alpha-blended into dst color with tint"
5337 "Get Color structure from hexadecimal value"
5340 HELP: get-pixel-color
5348 "Get Color from a source pixel pointer of certain format"
5351 HELP: set-pixel-color
5360 "Set color formatted into destination pixel pointer"
5363 HELP: get-pixel-data-size
5372 "Get pixel data size in bytes for certain format"
5376 ! ------------------------------------------------------------------------------------
5377 ! Font Loading and Text Drawing Functions (Module: text)
5378 ! ------------------------------------------------------------------------------------
5380 ! Font loading/unloading functions
5381 HELP: get-font-default
5383 "Get the default Font"
5393 "Load font from file into GPU memory (VRAM)"
5400 fontChars: { "a " { $link pointer } " to a " { $link int } }
5406 "Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set"
5409 HELP: load-font-from-image
5418 "Load font from Image (XNA style)"
5421 HELP: load-font-from-memory
5427 fontChars: { "a " { $link pointer } " to a " { $link int } }
5433 "Load font from memory buffer, fileType refers to extension: i.e. '.ttf'"
5443 "Check if a font is ready"
5446 HELP: load-font-data
5451 fontChars: { "a " { $link pointer } " to a " { $link int } }
5458 "Load font data for further use"
5461 HELP: gen-image-font-atlas
5463 chars: { "a " { $link pointer } " to a " { $link GlyphInfo } }
5464 recs: { "a double " { $link pointer } " to a " { $link Rectangle } }
5473 "Generate image font atlas using chars info"
5476 HELP: unload-font-data
5478 chars: { "a " { $link pointer } " to a " { $link GlyphInfo } }
5484 "Unload font chars info data (RAM)"
5494 "Unload Font from GPU memory (VRAM)"
5497 HELP: export-font-as-code
5505 "Export font as code file, returns true on success"
5509 ! Text drawing functions
5532 "Draw text (using default font)"
5547 "Draw text using font and additional parameters"
5564 "Draw text using Font and pro parameters (rotation)"
5567 HELP: draw-text-codepoint
5578 "Draw one character (codepoint)"
5581 HELP: draw-text-codepoints
5584 codepoint: { "a " { $link pointer } " to a " { $link int } }
5594 "Draw multiple character (codepoint)"
5598 ! Text font info functions
5607 "Measure string width for default font"
5610 HELP: measure-text-ex
5620 "Measure string size for Font"
5623 HELP: get-glyph-index
5631 "Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found"
5634 HELP: get-glyph-info
5642 "Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found"
5645 HELP: get-glyph-atlas-rec
5653 "Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found"
5657 ! Text codepoints management functions (unicode characters)
5660 codepoints: { "a " { $link pointer } " to a " { $link int } }
5666 "Load UTF-8 text encoded from codepoints array"
5676 "Unload UTF-8 text encoded from codepoints array"
5679 HELP: load-codepoints
5682 count: { "a " { $link pointer } " to a " { $link int } }
5687 "Load all codepoints from a UTF-8 text string, codepoints count returned by parameter"
5690 HELP: unload-codepoints
5692 codepoints: { "a " { $link pointer } " to a " { $link int } }
5697 "Unload codepoints data from memory"
5700 HELP: get-codepoint-count
5707 "Get total number of codepoints in a UTF-8 encoded string"
5713 bytesProcessed: { "a " { $link pointer } " to a " { $link int } }
5718 "Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure"
5721 HELP: get-codepoint-next
5724 codepointSize: { "a " { $link pointer } " to a " { $link int } }
5729 "Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure"
5732 HELP: get-codepoint-previous
5735 codepointSize: { "a " { $link pointer } " to a " { $link int } }
5740 "Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure"
5743 HELP: codepoint-to-utf8
5746 byteSize: { "a " { $link pointer } " to a " { $link int } }
5751 "Encode one codepoint into UTF-8 byte array (array length returned as parameter)"
5755 ! Text strings management functions (no UTF-8 strings, only byte chars)
5756 ! NOTE: Some strings allocate memory internally for returned strings, just be careful!
5765 "Copy one string to another, returns bytes copied"
5776 "Check if two text string are equal"
5786 "Get text length, checks for '\0' ending"
5798 "Get a piece of a text string"
5810 "Replace text string"
5812 "Memory must be freed!" }
5824 "Insert text in a position"
5826 "Memory must be freed!" }
5831 textList: { "a " { $link pointer } " to a " { $link c-string } }
5838 "Join text strings with delimiter"
5845 count: { "a " { $link pointer } " to a " { $link int } }
5850 "Split text into multiple strings"
5857 position: { "a " { $link pointer } " to a " { $link int } }
5862 "Append text at specific position and move cursor!"
5865 HELP: text-find-index
5873 "Find first text occurrence within a string"
5883 "Get upper case version of provided string"
5893 "Get lower case version of provided string"
5896 HELP: text-to-pascal
5903 "Get Pascal case notation version of provided string"
5906 HELP: text-to-integer
5913 "Get integer value from text."
5915 "Negative values not supported" }
5919 ! ------------------------------------------------------------------------------------
5920 ! Basic 3d Shapes Drawing Functions (Module: models)
5921 ! ------------------------------------------------------------------------------------
5923 ! Basic geometric 3D shapes drawing functions
5933 "Draw a line in 3D world space"
5944 "Draw a point in 3D space, actually a small line"
5947 HELP: draw-circle-3d
5951 rotationAxis: Vector3
5952 rotationAngle: float
5958 "Draw a circle in 3D world space"
5961 HELP: draw-triangle-3d
5971 "Draw a color-filled triangle (vertex in counter-clockwise order!)"
5974 HELP: draw-triangle-strip-3d
5976 points: { "a " { $link pointer } " to a " { $link Vector3 } }
5983 "Draw a triangle strip defined by points"
6009 "Draw cube (Vector version)"
6012 HELP: draw-cube-wires
6026 HELP: draw-cube-wires-v
6035 "Draw cube wires (Vector version)"
6050 HELP: draw-sphere-ex
6061 "Draw sphere with extended parameters"
6064 HELP: draw-sphere-wires
6090 "Draw a cylinder/cone"
6093 HELP: draw-cylinder-ex
6105 "Draw a cylinder with base at startPos and top at endPos"
6108 HELP: draw-cylinder-wires
6120 "Draw a cylinder/cone wires"
6123 HELP: draw-cylinder-wires-ex
6135 "Draw a cylinder wires with base at startPos and top at endPos"
6150 "Draw a capsule with the center of its sphere caps at startPos and endPos"
6153 HELP: draw-capsule-wires
6165 "Draw capsule wireframe with the center of its sphere caps at startPos and endPos"
6199 "Draw a grid (centered at (0, 0, 0))"
6203 ! ------------------------------------------------------------------------------------
6204 ! Model 3d Loading and Drawing Functions (Module: models)
6205 ! ------------------------------------------------------------------------------------
6207 ! Model management functions
6215 "Load model from files (meshes and materials)"
6218 HELP: load-model-from-mesh
6225 "Load model from generated mesh (default material)"
6228 HELP: is-model-ready
6235 "Check if a model is ready"
6245 "Unload model (including meshes) from memory (RAM and/or VRAM)"
6248 HELP: get-model-bounding-box
6255 "Compute model bounding box limits (considers all meshes)"
6259 ! Model drawing functions
6270 "Draw a model (with texture if set)"
6277 rotationAxis: Vector3
6278 rotationAngle: float
6285 "Draw a model with extended parameters"
6288 HELP: draw-model-wires
6298 "Draw a model wires (with texture if set)"
6301 HELP: draw-model-wires-ex
6305 rotationAxis: Vector3
6306 rotationAngle: float
6313 "Draw a model wires (with texture if set) with extended parameters"
6316 HELP: draw-bounding-box
6324 "Draw bounding box (wires)"
6327 HELP: draw-billboard
6338 "Draw a billboard texture"
6341 HELP: draw-billboard-rec
6353 "Draw a billboard texture defined by source"
6356 HELP: draw-billboard-pro
6371 "Draw a billboard texture defined by source and rotation"
6375 ! Mesh management functions
6378 mesh: { "a " { $link pointer } " to a " { $link Mesh } }
6384 "Upload mesh vertex data in GPU and provide VAO/VBO ids"
6387 HELP: update-mesh-buffer
6398 "Update mesh vertex data in GPU for a specific buffer index"
6408 "Unload mesh data from CPU and GPU"
6420 "Draw a 3d mesh with material and transform"
6423 HELP: draw-mesh-instanced
6427 transforms: { "a " { $link pointer } " to a " { $link Matrix } }
6433 "Draw multiple mesh instances with material and different transforms"
6444 "Export mesh data to file, returns true on success"
6447 HELP: get-mesh-bounding-box
6454 "Compute mesh bounding box limits"
6457 HELP: gen-mesh-tangents
6459 mesh: { "a " { $link pointer } " to a " { $link Mesh } }
6464 "Compute mesh tangents"
6468 ! Mesh generation functions
6477 "Generate polygonal mesh"
6480 HELP: gen-mesh-plane
6490 "Generate plane mesh (with subdivisions)"
6502 "Generate cuboid mesh"
6505 HELP: gen-mesh-sphere
6514 "Generate sphere mesh (standard sphere)"
6517 HELP: gen-mesh-hemi-sphere
6526 "Generate half-sphere mesh (no bottom cap)"
6529 HELP: gen-mesh-cylinder
6538 "Generate cylinder mesh"
6550 "Generate cone/pyramid mesh"
6553 HELP: gen-mesh-torus
6563 "Generate torus mesh"
6576 "Generate trefoil knot mesh"
6579 HELP: gen-mesh-heightmap
6587 "Generate heightmap mesh from image data"
6590 HELP: gen-mesh-cubicmap
6598 "Generate cubes-based map mesh from image data"
6602 ! Material loading/unloading functions
6603 HELP: load-materials
6606 materialCount: { "a " { $link pointer } " to a " { $link int } }
6611 "Load materials from model file"
6614 HELP: load-material-default
6616 "Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)"
6619 HELP: is-material-ready
6626 "check if a material is ready"
6629 HELP: unload-material
6636 "Unload material from GPU memory (VRAM)"
6639 HELP: set-material-texture
6641 material: { "a " { $link pointer } " to a " { $link Material } }
6648 "Set texture for a material map type ( Material_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)"
6651 HELP: set-model-mesh-material
6653 model: { "a " { $link pointer } " to a " { $link Model } }
6660 "Set material for a mesh"
6664 ! Model animations loading/unloading functions
6665 HELP: load-model-animations
6668 animCount: { "a " { $link pointer } " to a " { $link uint } }
6673 "Load model animations from file"
6676 HELP: update-model-animation
6679 anim: ModelAnimation
6685 "Update model animation pose"
6688 HELP: unload-model-animation
6690 anim: ModelAnimation
6695 "Unload animation data"
6698 HELP: unload-model-animations
6700 animations: { "a " { $link pointer } " to a " { $link ModelAnimation } }
6706 "Unload animation array data"
6709 HELP: is-model-animation-valid
6712 anim: ModelAnimation
6717 "Check model animation skeleton match"
6721 ! Collision detection functions
6722 HELP: check-collision-spheres
6732 "Check collision between two spheres"
6735 HELP: check-collision-boxes
6743 "Check collision between two bounding boxes"
6746 HELP: check-collision-box-sphere
6755 "Check collision between box and sphere"
6758 HELP: get-ray-collision-sphere
6767 "Get collision info between ray and sphere"
6770 HELP: get-ray-collision-box
6778 "Get collision info between ray and box"
6781 HELP: get-ray-collision-mesh
6790 "Get collision info between ray and mesh"
6793 HELP: get-ray-collision-triangle
6803 "Get collision info between ray and triangle"
6806 HELP: get-ray-collision-quad
6817 "Get collision info between ray and quad"
6820 HELP: get-ray-collision-model ;
6821 HELP: get-ray-collision-ground ;
6823 ! HELP: void AudioCallback ( void* bufferData, int frames )
6825 ! Audio device management functions
6826 HELP: init-audio-device
6828 "Initialize audio device and context " } ;
6830 HELP: close-audio-device
6832 "Close the audio device and context " } ;
6834 HELP: is-audio-device-ready
6836 "Check if audio device has been initialized successfully " } ;
6838 ! HELP: set-master-volume ( float volume ) ! Set master volume (listener)
6840 ! Wave/Sound loading/unloading functions
6841 ! HELP: load-wave ( c-string fileName ) ! Load wave data from file
6842 ! HELP: load-wave-from-memory ( c-string fileType, c-string fileData, int dataSize ) ! Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
6847 "Checks if wave data is ready " } ;
6849 ! HELP: load-sound ( c-string fileName ) ! Load sound from file
6850 HELP: load-sound-from-wave
6854 "Load sound from wave data " } ;
6856 HELP: is-sound-ready
6860 "Checks if a sound is ready" } ;
6862 ! HELP: update-sound ( Sound sound, void* data, int sampleCount ) ! Update sound buffer with new data
6867 "Unload wave data" } ;
6878 fileName: c-string }
6880 "Export wave data to file, returns true on success " } ;
6882 HELP: export-wave-as-code
6885 fileName: c-string }
6887 "Export wave sample data to code (.h), returns true on success " } ;
6890 ! Wave/Sound management functions
6901 Stop playing a sound } ;
6913 Resume a paused sound } ;
6915 HELP: is-sound-playing
6919 Check if a sound is currently playing } ;
6921 ! HELP: set-sound-volume ( Sound sound, float volume ) ! Set volume for a sound (1.0 is max level)
6922 ! HELP: set-sound-pitch ( Sound sound, float pitch ) ! Set pitch for a sound (1.0 is base level)
6923 ! HELP: set-sound-pan ( Sound sound, float pan ) ! Set pan for a sound (0.5 is center)
6928 "Copy a wave to a new wave " } ;
6930 ! HELP: wave-crop ( Wave* wave, int initSample, int finalSample ) ! Crop a wave to defined samples range
6931 ! HELP: wave-format ( Wave* wave, int sampleRate, int sampleSize, int channels ) ! Convert wave data to desired format
6932 HELP: load-wave-samples
6936 "Load samples data from wave as a floats array " } ;
6938 ! HELP: unload-wave-samples ( float* samples ) ! Unload samples data loaded with LoadWaveSamples()
6940 ! Music management functions
6941 ! HELP: load-music-stream ( c-string fileName ) ! Load music stream from file
6942 ! HELP: load-music-stream-from-memory ( c-string fileType, c-string data, int dataSize ) ! Load music stream from data
6943 HELP: is-music-ready
6947 "Checks if a music stream is ready " } ;
6949 HELP: unload-music-stream
6953 "Unload music stream " } ;
6955 HELP: play-music-stream
6959 "Start music playing " } ;
6961 HELP: is-music-stream-playing
6965 "Check if music is playing " } ;
6967 HELP: update-music-stream
6971 "Updates buffers for music streaming " } ;
6973 HELP: stop-music-stream
6977 "Stop music playing " } ;
6979 HELP: pause-music-stream
6983 "Pause music playing " } ;
6985 HELP: resume-music-stream
6989 "Resume playing paused music " } ;
6991 ! HELP: seek-music-stream ( Music music, float position ) ! Seek music to a position (in seconds)
6992 ! HELP: set-music-volume ( Music music, float volume ) ! Set volume for music (1.0 is max level)
6993 ! HELP: set-music-pitch ( Music music, float pitch ) ! Set pitch for a music (1.0 is base level)
6994 ! HELP: set-music-pan ( Music sound, float pan ) ! Set pan for a music (0.5 is center)
6995 HELP: get-music-time-length
6999 "Get music time length (in seconds) " } ;
7001 HELP: get-music-time-played
7005 "Get current music time played (in seconds) " } ;
7007 ! AudioStream management functions
7008 ! HELP: load-audio-stream ( uint sampleRate, uint sampleSize, uint channels ) ! Load audio stream (to stream raw audio pcm data)
7009 HELP: is-audio-stream-ready
7011 stream: AudioStream }
7013 "Checks if an audio stream is ready " } ;
7015 HELP: unload-audio-stream
7017 stream: AudioStream }
7019 "Unload audio stream and free memory " } ;
7021 ! HELP: update-audio-stream ( AudioStream stream, void* data, int frameCount ) ! Update audio stream buffers with data
7022 HELP: is-audio-stream-processed
7024 stream: AudioStream }
7026 "Check if any audio stream buffers requires refill " } ;
7028 HELP: play-audio-stream
7030 stream: AudioStream }
7032 "Play audio stream " } ;
7034 HELP: pause-audio-stream
7036 stream: AudioStream }
7038 "Pause audio stream " } ;
7040 HELP: resume-audio-stream
7042 stream: AudioStream }
7044 "Resume audio stream " } ;
7046 HELP: is-audio-stream-playing
7048 stream: AudioStream }
7050 "Check if audio stream is playing " } ;
7052 HELP: stop-audio-stream
7054 stream: AudioStream }
7056 "Stop audio stream " } ;
7058 ! HELP: set-audio-stream-volume ( AudioStream stream, float volume ) ! Set volume for audio stream (1.0 is max level)
7059 ! HELP: set-audio-stream-pitch ( AudioStream stream, float pitch ) ! Set pitch for audio stream (1.0 is base level)
7060 ! HELP: set-audio-stream-pan ( AudioStream stream, float pan ) ! Set pan for audio stream (0.5 is center)
7061 ! HELP: set-audio-stream-buffer-size-default ( int size ) ! Default size for new audio streams
7062 ! HELP: set-audio-stream-callback ( AudioStream stream, AudioCallback callback ) ! Audio thread callback to request new data
7064 ! HELP: attach-audio-stream-processor ( AudioStream stream, AudioCallback processor ) ! Attach audio stream processor to stream
7065 ! HELP: detach-audio-stream-processor ( AudioStream stream, AudioCallback processor ) ! Detach audio stream processor from stream
7067 ! HELP: attach-audio-mixed-processor ( AudioCallback processor ) ! Attach audio stream processor to the entire audio pipeline
7068 ! HELP: detach-audio-mixed-processor ( AudioCallback processor ) ! Detach audio stream processor from the entire audio pipeline
7071 ARTICLE: "raylib" "Raylib"
7072 { $heading About Raylib }
7073 Raylib attempts to be a simple and easy-to-use library for writing
7074 graphical applications.
7076 { $subheading Main Website }
7077 { $url "https://www.raylib.com/index.html" }
7079 { $subheading Raylib Cheat Sheet }
7080 { $url "https://www.raylib.com/cheatsheet/cheatsheet.html" }
7082 { $heading About These Bindings }
7083 The { $vocab-link "raylib" } vocabulary provides bindings to
7084 Raylib 4.5. The vocab is fully documented using Factor's help
7085 system. So, you can reliably use the browser to find information about
7086 the various functions in raylib.
7089 Use caution when attempting to leverage concurrency features.
7090 Raylib and the UI tools can interact in nasty ways: { $link "raylib-and-threads" } .
7094 ARTICLE: "raylib-and-threads" "Raylib and Threads"
7095 Factor features a powerful UI tool kit. However, Raylibe is designed
7096 under a single threaded model. Running a Raylib program will lock up
7097 the UI until the program finishes. However, attempting to use
7098 concurrency and threading features can corrupt the UI if done wrong.