Merge branch 'master' of github.com:raysan5/raylib
This commit is contained in:
commit
81d145fcfe
27 changed files with 1010 additions and 564 deletions
|
|
@ -36,7 +36,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers
|
||||||
| [jaylib](https://github.com/janet-lang/jaylib) | **5.0** | [Janet](https://janet-lang.org) | MIT |
|
| [jaylib](https://github.com/janet-lang/jaylib) | **5.0** | [Janet](https://janet-lang.org) | MIT |
|
||||||
| [jaylib](https://github.com/electronstudio/jaylib/) | 4.5 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | GPLv3+CE |
|
| [jaylib](https://github.com/electronstudio/jaylib/) | 4.5 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | GPLv3+CE |
|
||||||
| [raylib-j](https://github.com/CreedVI/Raylib-J) | 4.0 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | Zlib |
|
| [raylib-j](https://github.com/CreedVI/Raylib-J) | 4.0 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | Zlib |
|
||||||
| [raylib.jl](https://github.com/irishgreencitrus/raylib.jl) | 4.2 | [Julia](https://julialang.org) | Zlib |
|
| [Raylib.jl](https://github.com/chengchingwen/Raylib.jl) | 4.2 | [Julia](https://julialang.org) | Zlib |
|
||||||
| [kaylib](https://github.com/electronstudio/kaylib) | 3.7 | [Kotlin/native](https://kotlinlang.org) | **???** |
|
| [kaylib](https://github.com/electronstudio/kaylib) | 3.7 | [Kotlin/native](https://kotlinlang.org) | **???** |
|
||||||
| [KaylibKit](https://codeberg.org/Kenta/KaylibKit) | 4.5 | [Kotlin/native](https://kotlinlang.org) | Zlib |
|
| [KaylibKit](https://codeberg.org/Kenta/KaylibKit) | 4.5 | [Kotlin/native](https://kotlinlang.org) | Zlib |
|
||||||
| [raylib-lua](https://github.com/TSnake41/raylib-lua) | 4.5 | [Lua](http://www.lua.org) | ISC |
|
| [raylib-lua](https://github.com/TSnake41/raylib-lua) | 4.5 | [Lua](http://www.lua.org) | ISC |
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
### Config options ###
|
# ## Config options ###
|
||||||
include(CMakeDependentOption)
|
include(CMakeDependentOption)
|
||||||
include(EnumOption)
|
include(EnumOption)
|
||||||
|
|
||||||
|
|
@ -9,14 +9,14 @@ enum_option(OPENGL_VERSION "OFF;4.3;3.3;2.1;1.1;ES 2.0;ES 3.0" "Force a specific
|
||||||
# Configuration options
|
# Configuration options
|
||||||
option(BUILD_EXAMPLES "Build the examples." ${RAYLIB_IS_MAIN})
|
option(BUILD_EXAMPLES "Build the examples." ${RAYLIB_IS_MAIN})
|
||||||
option(CUSTOMIZE_BUILD "Show options for customizing your Raylib library build." OFF)
|
option(CUSTOMIZE_BUILD "Show options for customizing your Raylib library build." OFF)
|
||||||
option(ENABLE_ASAN "Enable AddressSanitizer (ASAN) for debugging (degrades performance)" OFF)
|
option(ENABLE_ASAN "Enable AddressSanitizer (ASAN) for debugging (degrades performance)" OFF)
|
||||||
option(ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer (UBSan) for debugging" OFF)
|
option(ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer (UBSan) for debugging" OFF)
|
||||||
option(ENABLE_MSAN "Enable MemorySanitizer (MSan) for debugging (not recommended to run with ASAN)" OFF)
|
option(ENABLE_MSAN "Enable MemorySanitizer (MSan) for debugging (not recommended to run with ASAN)" OFF)
|
||||||
|
|
||||||
# Shared library is always PIC. Static library should be PIC too if linked into a shared library
|
# Shared library is always PIC. Static library should be PIC too if linked into a shared library
|
||||||
option(WITH_PIC "Compile static library as position-independent code" OFF)
|
option(WITH_PIC "Compile static library as position-independent code" OFF)
|
||||||
option(BUILD_SHARED_LIBS "Build raylib as a shared library" OFF)
|
option(BUILD_SHARED_LIBS "Build raylib as a shared library" OFF)
|
||||||
option(MACOS_FATLIB "Build fat library for both i386 and x86_64 on macOS" OFF)
|
option(MACOS_FATLIB "Build fat library for both i386 and x86_64 on macOS" OFF)
|
||||||
cmake_dependent_option(USE_AUDIO "Build raylib with audio module" ON CUSTOMIZE_BUILD ON)
|
cmake_dependent_option(USE_AUDIO "Build raylib with audio module" ON CUSTOMIZE_BUILD ON)
|
||||||
|
|
||||||
enum_option(USE_EXTERNAL_GLFW "OFF;IF_POSSIBLE;ON" "Link raylib against system GLFW instead of embedded one")
|
enum_option(USE_EXTERNAL_GLFW "OFF;IF_POSSIBLE;ON" "Link raylib against system GLFW instead of embedded one")
|
||||||
|
|
@ -28,77 +28,9 @@ option(GLFW_BUILD_X11 "Build the bundled GLFW with X11 support" ON)
|
||||||
option(INCLUDE_EVERYTHING "Include everything disabled by default (for CI usage" OFF)
|
option(INCLUDE_EVERYTHING "Include everything disabled by default (for CI usage" OFF)
|
||||||
set(OFF ${INCLUDE_EVERYTHING} CACHE INTERNAL "Replace any OFF by default with \${OFF} to have it covered by this option")
|
set(OFF ${INCLUDE_EVERYTHING} CACHE INTERNAL "Replace any OFF by default with \${OFF} to have it covered by this option")
|
||||||
|
|
||||||
# raylib modules included
|
include(ParseConfigHeader)
|
||||||
cmake_dependent_option(SUPPORT_MODULE_RSHAPES "Include module: rshapes" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_MODULE_RTEXTURES "Include module: rtextures" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_MODULE_RTEXT "Include module: rtext" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_MODULE_RMODELS "Include module: rmodels" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_MODULE_RAUDIO "Include module: raudio" ON CUSTOMIZE_BUILD ON)
|
|
||||||
|
|
||||||
# rcore.c
|
foreach(FLAG IN LISTS CONFIG_HEADER_FLAGS)
|
||||||
cmake_dependent_option(SUPPORT_CAMERA_SYSTEM "Provide camera module (rcamera.h) with multiple predefined cameras: free, 1st/3rd person, orbital" ON CUSTOMIZE_BUILD ON)
|
string(REGEX MATCH "([^=]+)=(.+)" _ ${FLAG})
|
||||||
cmake_dependent_option(SUPPORT_GESTURES_SYSTEM "Gestures module is included (rgestures.h) to support gestures detection: tap, hold, swipe, drag" ON CUSTOMIZE_BUILD ON)
|
cmake_dependent_option(${CMAKE_MATCH_1} "" ${CMAKE_MATCH_2} CUSTOMIZE_BUILD ${CMAKE_MATCH_2})
|
||||||
cmake_dependent_option(SUPPORT_RPRAND_GENERATOR "Include pseudo-random numbers generator (rprand.h), based on Xoshiro128** and SplitMix64" ON CUSTOMIZE_BUILD ON)
|
endforeach()
|
||||||
cmake_dependent_option(SUPPORT_MOUSE_GESTURES "Mouse gestures are directly mapped like touches and processed by gestures system" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_SSH_KEYBOARD_RPI "Reconfigure standard input to receive key inputs, works with SSH connection" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_DEFAULT_FONT "Default font is loaded on window initialization to be available for the user to render simple text. If enabled, uses external module functions to load default raylib font (module: text)" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_SCREEN_CAPTURE "Allow automatic screen capture of current screen pressing F12, defined in KeyCallback()" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_GIF_RECORDING "Allow automatic gif recording of current screen pressing CTRL+F12, defined in KeyCallback()" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_BUSY_WAIT_LOOP "Use busy wait loop for timing sync instead of a high-resolution timer" OFF CUSTOMIZE_BUILD OFF)
|
|
||||||
cmake_dependent_option(SUPPORT_EVENTS_WAITING "Wait for events passively (sleeping while no events) instead of polling them actively every frame" OFF CUSTOMIZE_BUILD OFF)
|
|
||||||
cmake_dependent_option(SUPPORT_WINMM_HIGHRES_TIMER "Setting a higher resolution can improve the accuracy of time-out intervals in wait functions" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_COMPRESSION_API "Support for compression API" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_EVENTS_AUTOMATION "Support automatic generated events, loading and recording of those events when required" OFF CUSTOMIZE_BUILD OFF)
|
|
||||||
cmake_dependent_option(SUPPORT_CUSTOM_FRAME_CONTROL "Enabling this flag allows manual control of the frame processes, use at your own risk" OFF CUSTOMIZE_BUILD OFF)
|
|
||||||
|
|
||||||
# rshapes.c
|
|
||||||
cmake_dependent_option(SUPPORT_QUADS_DRAW_MODE "Use QUADS instead of TRIANGLES for drawing when possible. Some lines-based shapes could still use lines" ON CUSTOMIZE_BUILD ON)
|
|
||||||
|
|
||||||
# rtextures.c
|
|
||||||
cmake_dependent_option(SUPPORT_IMAGE_EXPORT "Support image exporting to file" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_IMAGE_GENERATION "Support procedural image generation functionality (gradient, spot, perlin-noise, cellular)" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_IMAGE_MANIPULATION "Support multiple image editing functions to scale, adjust colors, flip, draw on images, crop... If not defined only three image editing functions supported: ImageFormat(), ImageAlphaMask(), ImageToPOT()" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_PNG "Support loading PNG as textures" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_DDS "Support loading DDS as textures" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_HDR "Support loading HDR as textures" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_PIC "Support loading PIC as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_PNM "Support loading PNM as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_KTX "Support loading KTX as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_ASTC "Support loading ASTC as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_BMP "Support loading BMP as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_TGA "Support loading TGA as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_JPG "Support loading JPG as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_GIF "Support loading GIF as textures" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_QOI "Support loading QOI as textures" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_PSD "Support loading PSD as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_PKM "Support loading PKM as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_PVR "Support loading PVR as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_SVG "Support loading SVG as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
|
||||||
|
|
||||||
# rtext.c
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_FNT "Support loading fonts in FNT format" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_TTF "Support loading font in TTF/OTF format" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_TEXT_MANIPULATION "Support text manipulation functions" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FONT_ATLAS_WHITE_REC "Support white rec on font atlas bottom-right corner" ON CUSTOMIZE_BUILD ON)
|
|
||||||
|
|
||||||
# rmodels.c
|
|
||||||
cmake_dependent_option(SUPPORT_MESH_GENERATION "Support procedural mesh generation functions, uses external par_shapes.h library. NOTE: Some generated meshes DO NOT include generated texture coordinates" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_OBJ "Support loading OBJ file format" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_MTL "Support loading MTL file format" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_IQM "Support loading IQM file format" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_GLTF "Support loading GLTF file format" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_VOX "Support loading VOX file format" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_M3D "Support loading M3D file format" ON CUSTOMIZE_BUILD ON)
|
|
||||||
|
|
||||||
# raudio.c
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_WAV "Support loading WAV for sound" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_OGG "Support loading OGG for sound" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_XM "Support loading XM for sound" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_MOD "Support loading MOD for sound" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_MP3 "Support loading MP3 for sound" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_QOA "Support loading QOA for sound" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_FILEFORMAT_FLAC "Support loading FLAC for sound" ${OFF} CUSTOMIZE_BUILD OFF)
|
|
||||||
|
|
||||||
# utils.c
|
|
||||||
cmake_dependent_option(SUPPORT_STANDARD_FILEIO "Support standard file io library (stdio.h)" ON CUSTOMIZE_BUILD ON)
|
|
||||||
cmake_dependent_option(SUPPORT_TRACELOG "Show TraceLog() output messages. NOTE: By default LOG_DEBUG traces not shown" ON CUSTOMIZE_BUILD ON)
|
|
||||||
|
|
|
||||||
|
|
@ -3,126 +3,22 @@ target_compile_definitions("raylib" PUBLIC "${PLATFORM_CPP}")
|
||||||
target_compile_definitions("raylib" PUBLIC "${GRAPHICS}")
|
target_compile_definitions("raylib" PUBLIC "${GRAPHICS}")
|
||||||
|
|
||||||
function(define_if target variable)
|
function(define_if target variable)
|
||||||
if (${${variable}})
|
if(${${variable}})
|
||||||
message(STATUS "${variable}=${${variable}}")
|
message(STATUS "${variable}=${${variable}}")
|
||||||
target_compile_definitions(${target} PUBLIC "${variable}")
|
target_compile_definitions(${target} PRIVATE "${variable}")
|
||||||
endif ()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
if (${CUSTOMIZE_BUILD})
|
if(${CUSTOMIZE_BUILD})
|
||||||
target_compile_definitions("raylib" PUBLIC EXTERNAL_CONFIG_FLAGS)
|
target_compile_definitions("raylib" PRIVATE EXTERNAL_CONFIG_FLAGS)
|
||||||
define_if("raylib" USE_AUDIO)
|
define_if("raylib" USE_AUDIO)
|
||||||
define_if("raylib" SUPPORT_MODULE_RSHAPES)
|
|
||||||
define_if("raylib" SUPPORT_MODULE_RTEXTURES)
|
|
||||||
define_if("raylib" SUPPORT_MODULE_RTEXT)
|
|
||||||
define_if("raylib" SUPPORT_MODULE_RMODELS)
|
|
||||||
define_if("raylib" SUPPORT_MODULE_RAUDIO)
|
|
||||||
define_if("raylib" SUPPORT_CAMERA_SYSTEM)
|
|
||||||
define_if("raylib" SUPPORT_GESTURES_SYSTEM)
|
|
||||||
define_if("raylib" SUPPORT_MOUSE_GESTURES)
|
|
||||||
define_if("raylib" SUPPORT_SSH_KEYBOARD_RPI)
|
|
||||||
define_if("raylib" SUPPORT_DEFAULT_FONT)
|
|
||||||
define_if("raylib" SUPPORT_SCREEN_CAPTURE)
|
|
||||||
define_if("raylib" SUPPORT_GIF_RECORDING)
|
|
||||||
define_if("raylib" SUPPORT_BUSY_WAIT_LOOP)
|
|
||||||
define_if("raylib" SUPPORT_EVENTS_WAITING)
|
|
||||||
define_if("raylib" SUPPORT_WINMM_HIGHRES_TIMER)
|
|
||||||
define_if("raylib" SUPPORT_COMPRESSION_API)
|
|
||||||
define_if("raylib" SUPPORT_EVENTS_AUTOMATION)
|
|
||||||
define_if("raylib" SUPPORT_CUSTOM_FRAME_CONTROL)
|
|
||||||
define_if("raylib" SUPPORT_QUADS_DRAW_MODE)
|
|
||||||
define_if("raylib" SUPPORT_IMAGE_EXPORT)
|
|
||||||
define_if("raylib" SUPPORT_IMAGE_GENERATION)
|
|
||||||
define_if("raylib" SUPPORT_IMAGE_MANIPULATION)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_PNG)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_DDS)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_HDR)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_PIC)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_PNM)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_KTX)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_ASTC)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_BMP)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_TGA)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_JPG)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_GIF)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_QOI)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_PSD)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_PKM)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_PVR)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_SVG)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_FNT)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_TTF)
|
|
||||||
define_if("raylib" SUPPORT_TEXT_MANIPULATION)
|
|
||||||
define_if("raylib" SUPPORT_MESH_GENERATION)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_OBJ)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_MTL)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_IQM)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_GLTF)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_VOX)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_M3D)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_WAV)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_OGG)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_XM)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_MOD)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_MP3)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_QOA)
|
|
||||||
define_if("raylib" SUPPORT_FILEFORMAT_FLAC)
|
|
||||||
define_if("raylib" SUPPORT_STANDARD_FILEIO)
|
|
||||||
define_if("raylib" SUPPORT_TRACELOG)
|
|
||||||
|
|
||||||
if (UNIX AND NOT APPLE)
|
foreach(FLAG IN LISTS CONFIG_HEADER_FLAGS)
|
||||||
target_compile_definitions("raylib" PUBLIC "MAX_FILEPATH_LENGTH=4096")
|
string(REGEX MATCH "([^=]+)=(.+)" _ ${FLAG})
|
||||||
else ()
|
define_if("raylib" ${CMAKE_MATCH_1})
|
||||||
target_compile_definitions("raylib" PUBLIC "MAX_FILEPATH_LENGTH=512")
|
endforeach()
|
||||||
endif ()
|
|
||||||
|
|
||||||
target_compile_definitions("raylib" PUBLIC "MAX_GAMEPADS=4")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "MAX_GAMEPAD_AXIS=8")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "MAX_GAMEPAD_BUTTONS=32")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "MAX_TOUCH_POINTS=10")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "MAX_KEY_PRESSED_QUEUE=16")
|
|
||||||
|
|
||||||
target_compile_definitions("raylib" PUBLIC "STORAGE_DATA_FILE=\"storage.data\"")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "MAX_CHAR_PRESSED_QUEUE=16")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "MAX_DECOMPRESSION_SIZE=64")
|
|
||||||
|
|
||||||
if (${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_33" OR ${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_11")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_BUFFER_ELEMENTS=8192")
|
|
||||||
elseif (${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_ES2")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_BUFFER_ELEMENTS=2048")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_DRAWCALLS=256")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "MAX_MATRIX_STACK_SIZE=32")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "MAX_SHADER_LOCATIONS=32")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "MAX_MATERIAL_MAPS=12")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "RL_CULL_DISTANCE_NEAR=0.01")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "RL_CULL_DISTANCE_FAR=1000.0")
|
|
||||||
|
|
||||||
target_compile_definitions("raylib" PUBLIC "RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION=0")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD=1")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL=2")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR=3")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT=4")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2=5")
|
|
||||||
|
|
||||||
target_compile_definitions("raylib" PUBLIC "RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION=\"vertexPosition\"")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD=\"vertexTexCoord\"")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL=\"vertexNormal\"")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR=\"vertexColor\"")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT=\"vertexTangent\"")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2=\"vertexTexCoord2\"")
|
|
||||||
|
|
||||||
target_compile_definitions("raylib" PUBLIC "MAX_TEXT_BUFFER_LENGTH=1024")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "MAX_TEXT_UNICODE_CHARS=512")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "MAX_TEXTSPLIT_COUNT=128")
|
|
||||||
|
|
||||||
target_compile_definitions("raylib" PUBLIC "AUDIO_DEVICE_FORMAT=ma_format_f32")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "AUDIO_DEVICE_CHANNELS=2")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "AUDIO_DEVICE_SAMPLE_RATE=44100")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "DEFAULT_AUDIO_BUFFER_SIZE=4096")
|
|
||||||
|
|
||||||
target_compile_definitions("raylib" PUBLIC "MAX_TRACELOG_MSG_LENGTH=128")
|
|
||||||
target_compile_definitions("raylib" PUBLIC "MAX_UWP_MESSAGES=512")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
|
foreach(VALUE IN LISTS CONFIG_HEADER_VALUES)
|
||||||
|
target_compile_definitions("raylib" PRIVATE ${VALUE})
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -58,8 +58,9 @@ if (${PLATFORM} MATCHES "Desktop")
|
||||||
|
|
||||||
elseif (${PLATFORM} MATCHES "Web")
|
elseif (${PLATFORM} MATCHES "Web")
|
||||||
set(PLATFORM_CPP "PLATFORM_WEB")
|
set(PLATFORM_CPP "PLATFORM_WEB")
|
||||||
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
if(NOT GRAPHICS)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s USE_GLFW=3 -s ASSERTIONS=1 --profiling")
|
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
||||||
|
endif()
|
||||||
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
|
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
|
||||||
|
|
||||||
elseif (${PLATFORM} MATCHES "Android")
|
elseif (${PLATFORM} MATCHES "Android")
|
||||||
|
|
|
||||||
17
cmake/ParseConfigHeader.cmake
Normal file
17
cmake/ParseConfigHeader.cmake
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/src/config.h" CONFIG_HEADER_CONTENT)
|
||||||
|
|
||||||
|
set(BLANK_OR_BACKSLASH_PATTERN "[ \t\r\n\\]")
|
||||||
|
set(VALID_IDENTIFIER_PATTERN "[A-Za-z_]+[A-Za-z_0-9]*")
|
||||||
|
set(VALID_VALUE_PATTERN [=["?[A-Za-z_0-9.-]+"?]=]) # not really correct but does the job since the config.h file hopefully will have been checked by a C preprocessor.
|
||||||
|
set(MACRO_REGEX "(//${BLANK_OR_BACKSLASH_PATTERN}*)?\#define${BLANK_OR_BACKSLASH_PATTERN}+(${VALID_IDENTIFIER_PATTERN})${BLANK_OR_BACKSLASH_PATTERN}+(${VALID_VALUE_PATTERN})")
|
||||||
|
|
||||||
|
string(REGEX MATCHALL ${MACRO_REGEX} MACRO_LIST ${CONFIG_HEADER_CONTENT})
|
||||||
|
|
||||||
|
set(CONFIG_HEADER_FLAGS ${MACRO_LIST})
|
||||||
|
list(FILTER CONFIG_HEADER_FLAGS INCLUDE REGEX "^.+SUPPORT_")
|
||||||
|
list(TRANSFORM CONFIG_HEADER_FLAGS REPLACE ${MACRO_REGEX} [[\2=OFF]] REGEX "^//")
|
||||||
|
list(TRANSFORM CONFIG_HEADER_FLAGS REPLACE ${MACRO_REGEX} [[\2=ON]])
|
||||||
|
|
||||||
|
set(CONFIG_HEADER_VALUES ${MACRO_LIST})
|
||||||
|
list(FILTER CONFIG_HEADER_VALUES EXCLUDE REGEX "(^.+SUPPORT_)|(^//)")
|
||||||
|
list(TRANSFORM CONFIG_HEADER_VALUES REPLACE ${MACRO_REGEX} [[\2=\3]])
|
||||||
|
|
@ -96,10 +96,9 @@ if (${PLATFORM} MATCHES "Android")
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_basic_lighting.c)
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_basic_lighting.c)
|
||||||
|
|
||||||
elseif (${PLATFORM} MATCHES "Web")
|
elseif (${PLATFORM} MATCHES "Web")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s ASYNCIFY")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os")
|
||||||
# Since WASM is used, ALLOW_MEMORY_GROWTH has no extra overheads
|
# Since WASM is used, ALLOW_MEMORY_GROWTH has no extra overheads
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s ALLOW_MEMORY_GROWTH=1 --no-heap-copy")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s WASM=1 -s ASYNCIFY -s ALLOW_MEMORY_GROWTH=1 --shell-file ${CMAKE_SOURCE_DIR}/src/shell.html")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --shell-file ${CMAKE_SOURCE_DIR}/src/shell.html")
|
|
||||||
set(CMAKE_EXECUTABLE_SUFFIX ".html")
|
set(CMAKE_EXECUTABLE_SUFFIX ".html")
|
||||||
|
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/raylib_opengl_interop.c)
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/raylib_opengl_interop.c)
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@ fn add_module(comptime module: []const u8, b: *std.Build, target: std.Build.Reso
|
||||||
const install_cmd = b.addInstallArtifact(exe, .{});
|
const install_cmd = b.addInstallArtifact(exe, .{});
|
||||||
|
|
||||||
const run_cmd = b.addRunArtifact(exe);
|
const run_cmd = b.addRunArtifact(exe);
|
||||||
|
run_cmd.cwd = b.path(module);
|
||||||
run_cmd.step.dependOn(&install_cmd.step);
|
run_cmd.step.dependOn(&install_cmd.step);
|
||||||
|
|
||||||
const run_step = b.step(name, name);
|
const run_step = b.step(name, name);
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,8 @@ int main()
|
||||||
};
|
};
|
||||||
|
|
||||||
// Pick a color with a hue depending on cube position for the rainbow color effect
|
// Pick a color with a hue depending on cube position for the rainbow color effect
|
||||||
|
// NOTE: This function is quite costly to be done per cube and frame,
|
||||||
|
// pre-catching the results into a separate array could improve performance
|
||||||
Color cubeColor = ColorFromHSV((float)(((x + y + z)*18)%360), 0.75f, 0.9f);
|
Color cubeColor = ColorFromHSV((float)(((x + y + z)*18)%360), 0.75f, 0.9f);
|
||||||
|
|
||||||
// Calculate cube size
|
// Calculate cube size
|
||||||
|
|
|
||||||
|
|
@ -22,15 +22,12 @@ out vec3 fragNormal;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
// Compute MVP for current instance
|
|
||||||
mat4 mvpi = mvp*instanceTransform;
|
|
||||||
|
|
||||||
// Send vertex attributes to fragment shader
|
// Send vertex attributes to fragment shader
|
||||||
fragPosition = vec3(mvpi*vec4(vertexPosition, 1.0));
|
fragPosition = vec3(instanceTransform*vec4(vertexPosition, 1.0));
|
||||||
fragTexCoord = vertexTexCoord;
|
fragTexCoord = vertexTexCoord;
|
||||||
//fragColor = vertexColor;
|
//fragColor = vertexColor;
|
||||||
fragNormal = normalize(vec3(matNormal*vec4(vertexNormal, 1.0)));
|
fragNormal = normalize(vec3(matNormal*vec4(vertexNormal, 1.0)));
|
||||||
|
|
||||||
// Calculate final vertex position
|
// Calculate final vertex position, note that we multiply mvp by instanceTransform
|
||||||
gl_Position = mvpi*vec4(vertexPosition, 1.0);
|
gl_Position = mvp*instanceTransform*vec4(vertexPosition, 1.0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,10 @@ int main(void)
|
||||||
{ 710.0f, 260.0f },
|
{ 710.0f, 260.0f },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Array required for spline bezier-cubic,
|
||||||
|
// including control points interleaved with start-end segment points
|
||||||
|
Vector2 pointsInterleaved[3*(MAX_SPLINE_POINTS - 1) + 1] = { 0 };
|
||||||
|
|
||||||
int pointCount = 5;
|
int pointCount = 5;
|
||||||
int selectedPoint = -1;
|
int selectedPoint = -1;
|
||||||
int focusedPoint = -1;
|
int focusedPoint = -1;
|
||||||
|
|
@ -63,7 +67,7 @@ int main(void)
|
||||||
Vector2 *focusedControlPoint = NULL;
|
Vector2 *focusedControlPoint = NULL;
|
||||||
|
|
||||||
// Cubic Bezier control points initialization
|
// Cubic Bezier control points initialization
|
||||||
ControlPoint control[MAX_SPLINE_POINTS] = { 0 };
|
ControlPoint control[MAX_SPLINE_POINTS-1] = { 0 };
|
||||||
for (int i = 0; i < pointCount - 1; i++)
|
for (int i = 0; i < pointCount - 1; i++)
|
||||||
{
|
{
|
||||||
control[i].start = (Vector2){ points[i].x + 50, points[i].y };
|
control[i].start = (Vector2){ points[i].x + 50, points[i].y };
|
||||||
|
|
@ -88,6 +92,9 @@ int main(void)
|
||||||
if (IsMouseButtonPressed(MOUSE_RIGHT_BUTTON) && (pointCount < MAX_SPLINE_POINTS))
|
if (IsMouseButtonPressed(MOUSE_RIGHT_BUTTON) && (pointCount < MAX_SPLINE_POINTS))
|
||||||
{
|
{
|
||||||
points[pointCount] = GetMousePosition();
|
points[pointCount] = GetMousePosition();
|
||||||
|
int i = pointCount - 1;
|
||||||
|
control[i].start = (Vector2){ points[i].x + 50, points[i].y };
|
||||||
|
control[i].end = (Vector2){ points[i + 1].x - 50, points[i + 1].y };
|
||||||
pointCount++;
|
pointCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -114,7 +121,7 @@ int main(void)
|
||||||
if ((splineTypeActive == SPLINE_BEZIER) && (focusedPoint == -1))
|
if ((splineTypeActive == SPLINE_BEZIER) && (focusedPoint == -1))
|
||||||
{
|
{
|
||||||
// Spline control point focus and selection logic
|
// Spline control point focus and selection logic
|
||||||
for (int i = 0; i < pointCount; i++)
|
for (int i = 0; i < pointCount - 1; i++)
|
||||||
{
|
{
|
||||||
if (CheckCollisionPointCircle(GetMousePosition(), control[i].start, 6.0f))
|
if (CheckCollisionPointCircle(GetMousePosition(), control[i].start, 6.0f))
|
||||||
{
|
{
|
||||||
|
|
@ -185,13 +192,32 @@ int main(void)
|
||||||
}
|
}
|
||||||
else if (splineTypeActive == SPLINE_BEZIER)
|
else if (splineTypeActive == SPLINE_BEZIER)
|
||||||
{
|
{
|
||||||
|
// NOTE: Cubic-bezier spline requires the 2 control points of each segnment to be
|
||||||
|
// provided interleaved with the start and end point of every segment
|
||||||
|
for (int i = 0; i < (pointCount - 1); i++)
|
||||||
|
{
|
||||||
|
pointsInterleaved[3*i] = points[i];
|
||||||
|
pointsInterleaved[3*i + 1] = control[i].start;
|
||||||
|
pointsInterleaved[3*i + 2] = control[i].end;
|
||||||
|
}
|
||||||
|
|
||||||
|
pointsInterleaved[3*(pointCount - 1)] = points[pointCount - 1];
|
||||||
|
|
||||||
// Draw spline: cubic-bezier (with control points)
|
// Draw spline: cubic-bezier (with control points)
|
||||||
for (int i = 0; i < pointCount - 1; i++)
|
DrawSplineBezierCubic(pointsInterleaved, 3*(pointCount - 1) + 1, splineThickness, RED);
|
||||||
|
|
||||||
|
/*
|
||||||
|
for (int i = 0; i < 3*(pointCount - 1); i += 3)
|
||||||
{
|
{
|
||||||
// Drawing individual segments, not considering thickness connection compensation
|
// Drawing individual segments, not considering thickness connection compensation
|
||||||
DrawSplineSegmentBezierCubic(points[i], control[i].start, control[i].end, points[i + 1], splineThickness, RED);
|
DrawSplineSegmentBezierCubic(pointsInterleaved[i], pointsInterleaved[i + 1], pointsInterleaved[i + 2], pointsInterleaved[i + 3], splineThickness, MAROON);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Every cubic bezier point should have two control points
|
// Draw spline control points
|
||||||
|
for (int i = 0; i < pointCount - 1; i++)
|
||||||
|
{
|
||||||
|
// Every cubic bezier point have two control points
|
||||||
DrawCircleV(control[i].start, 6, GOLD);
|
DrawCircleV(control[i].start, 6, GOLD);
|
||||||
DrawCircleV(control[i].end, 6, GOLD);
|
DrawCircleV(control[i].end, 6, GOLD);
|
||||||
if (focusedControlPoint == &control[i].start) DrawCircleV(control[i].start, 8, GREEN);
|
if (focusedControlPoint == &control[i].start) DrawCircleV(control[i].start, 8, GREEN);
|
||||||
|
|
@ -244,4 +270,4 @@ int main(void)
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5345,7 +5345,7 @@
|
||||||
"returnType": "void",
|
"returnType": "void",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
"type": "Vector2 *",
|
"type": "const Vector2 *",
|
||||||
"name": "points"
|
"name": "points"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -6022,7 +6022,7 @@
|
||||||
"returnType": "void",
|
"returnType": "void",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
"type": "Vector2 *",
|
"type": "const Vector2 *",
|
||||||
"name": "points"
|
"name": "points"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -6041,7 +6041,7 @@
|
||||||
"returnType": "void",
|
"returnType": "void",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
"type": "Vector2 *",
|
"type": "const Vector2 *",
|
||||||
"name": "points"
|
"name": "points"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -6145,7 +6145,7 @@
|
||||||
"returnType": "void",
|
"returnType": "void",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
"type": "Vector2 *",
|
"type": "const Vector2 *",
|
||||||
"name": "points"
|
"name": "points"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -6168,7 +6168,7 @@
|
||||||
"returnType": "void",
|
"returnType": "void",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
"type": "Vector2 *",
|
"type": "const Vector2 *",
|
||||||
"name": "points"
|
"name": "points"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -6191,7 +6191,7 @@
|
||||||
"returnType": "void",
|
"returnType": "void",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
"type": "Vector2 *",
|
"type": "const Vector2 *",
|
||||||
"name": "points"
|
"name": "points"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -6214,7 +6214,7 @@
|
||||||
"returnType": "void",
|
"returnType": "void",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
"type": "Vector2 *",
|
"type": "const Vector2 *",
|
||||||
"name": "points"
|
"name": "points"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -6237,7 +6237,7 @@
|
||||||
"returnType": "void",
|
"returnType": "void",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
"type": "Vector2 *",
|
"type": "const Vector2 *",
|
||||||
"name": "points"
|
"name": "points"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -6644,7 +6644,7 @@
|
||||||
"name": "point"
|
"name": "point"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Vector2 *",
|
"type": "const Vector2 *",
|
||||||
"name": "points"
|
"name": "points"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -7359,7 +7359,7 @@
|
||||||
"name": "image"
|
"name": "image"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "float*",
|
"type": "float *",
|
||||||
"name": "kernel"
|
"name": "kernel"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -8013,6 +8013,141 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "ImageDrawTriangle",
|
||||||
|
"description": "Draw triangle within an image",
|
||||||
|
"returnType": "void",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Image *",
|
||||||
|
"name": "dst"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Vector2",
|
||||||
|
"name": "v1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Vector2",
|
||||||
|
"name": "v2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Vector2",
|
||||||
|
"name": "v3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "color"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ImageDrawTriangleEx",
|
||||||
|
"description": "Draw triangle with interpolated colors within an image",
|
||||||
|
"returnType": "void",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Image *",
|
||||||
|
"name": "dst"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Vector2",
|
||||||
|
"name": "v1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Vector2",
|
||||||
|
"name": "v2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Vector2",
|
||||||
|
"name": "v3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "c1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "c2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "c3"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ImageDrawTriangleLines",
|
||||||
|
"description": "Draw triangle outline within an image",
|
||||||
|
"returnType": "void",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Image *",
|
||||||
|
"name": "dst"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Vector2",
|
||||||
|
"name": "v1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Vector2",
|
||||||
|
"name": "v2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Vector2",
|
||||||
|
"name": "v3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "color"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ImageDrawTriangleFan",
|
||||||
|
"description": "Draw a triangle fan defined by points within an image (first vertex is the center)",
|
||||||
|
"returnType": "void",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Image *",
|
||||||
|
"name": "dst"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Vector2 *",
|
||||||
|
"name": "points"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "int",
|
||||||
|
"name": "pointCount"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "color"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ImageDrawTriangleStrip",
|
||||||
|
"description": "Draw a triangle strip defined by points within an image",
|
||||||
|
"returnType": "void",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Image *",
|
||||||
|
"name": "dst"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Vector2 *",
|
||||||
|
"name": "points"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "int",
|
||||||
|
"name": "pointCount"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "color"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "ImageDraw",
|
"name": "ImageDraw",
|
||||||
"description": "Draw a source image within a destination image (tint applied to source)",
|
"description": "Draw a source image within a destination image (tint applied to source)",
|
||||||
|
|
@ -9613,7 +9748,7 @@
|
||||||
"returnType": "void",
|
"returnType": "void",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
"type": "Vector3 *",
|
"type": "const Vector3 *",
|
||||||
"name": "points"
|
"name": "points"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4636,7 +4636,7 @@ return {
|
||||||
description = "Draw lines sequence (using gl lines)",
|
description = "Draw lines sequence (using gl lines)",
|
||||||
returnType = "void",
|
returnType = "void",
|
||||||
params = {
|
params = {
|
||||||
{type = "Vector2 *", name = "points"},
|
{type = "const Vector2 *", name = "points"},
|
||||||
{type = "int", name = "pointCount"},
|
{type = "int", name = "pointCount"},
|
||||||
{type = "Color", name = "color"}
|
{type = "Color", name = "color"}
|
||||||
}
|
}
|
||||||
|
|
@ -4947,7 +4947,7 @@ return {
|
||||||
description = "Draw a triangle fan defined by points (first vertex is the center)",
|
description = "Draw a triangle fan defined by points (first vertex is the center)",
|
||||||
returnType = "void",
|
returnType = "void",
|
||||||
params = {
|
params = {
|
||||||
{type = "Vector2 *", name = "points"},
|
{type = "const Vector2 *", name = "points"},
|
||||||
{type = "int", name = "pointCount"},
|
{type = "int", name = "pointCount"},
|
||||||
{type = "Color", name = "color"}
|
{type = "Color", name = "color"}
|
||||||
}
|
}
|
||||||
|
|
@ -4957,7 +4957,7 @@ return {
|
||||||
description = "Draw a triangle strip defined by points",
|
description = "Draw a triangle strip defined by points",
|
||||||
returnType = "void",
|
returnType = "void",
|
||||||
params = {
|
params = {
|
||||||
{type = "Vector2 *", name = "points"},
|
{type = "const Vector2 *", name = "points"},
|
||||||
{type = "int", name = "pointCount"},
|
{type = "int", name = "pointCount"},
|
||||||
{type = "Color", name = "color"}
|
{type = "Color", name = "color"}
|
||||||
}
|
}
|
||||||
|
|
@ -5004,7 +5004,7 @@ return {
|
||||||
description = "Draw spline: Linear, minimum 2 points",
|
description = "Draw spline: Linear, minimum 2 points",
|
||||||
returnType = "void",
|
returnType = "void",
|
||||||
params = {
|
params = {
|
||||||
{type = "Vector2 *", name = "points"},
|
{type = "const Vector2 *", name = "points"},
|
||||||
{type = "int", name = "pointCount"},
|
{type = "int", name = "pointCount"},
|
||||||
{type = "float", name = "thick"},
|
{type = "float", name = "thick"},
|
||||||
{type = "Color", name = "color"}
|
{type = "Color", name = "color"}
|
||||||
|
|
@ -5015,7 +5015,7 @@ return {
|
||||||
description = "Draw spline: B-Spline, minimum 4 points",
|
description = "Draw spline: B-Spline, minimum 4 points",
|
||||||
returnType = "void",
|
returnType = "void",
|
||||||
params = {
|
params = {
|
||||||
{type = "Vector2 *", name = "points"},
|
{type = "const Vector2 *", name = "points"},
|
||||||
{type = "int", name = "pointCount"},
|
{type = "int", name = "pointCount"},
|
||||||
{type = "float", name = "thick"},
|
{type = "float", name = "thick"},
|
||||||
{type = "Color", name = "color"}
|
{type = "Color", name = "color"}
|
||||||
|
|
@ -5026,7 +5026,7 @@ return {
|
||||||
description = "Draw spline: Catmull-Rom, minimum 4 points",
|
description = "Draw spline: Catmull-Rom, minimum 4 points",
|
||||||
returnType = "void",
|
returnType = "void",
|
||||||
params = {
|
params = {
|
||||||
{type = "Vector2 *", name = "points"},
|
{type = "const Vector2 *", name = "points"},
|
||||||
{type = "int", name = "pointCount"},
|
{type = "int", name = "pointCount"},
|
||||||
{type = "float", name = "thick"},
|
{type = "float", name = "thick"},
|
||||||
{type = "Color", name = "color"}
|
{type = "Color", name = "color"}
|
||||||
|
|
@ -5037,7 +5037,7 @@ return {
|
||||||
description = "Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]",
|
description = "Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]",
|
||||||
returnType = "void",
|
returnType = "void",
|
||||||
params = {
|
params = {
|
||||||
{type = "Vector2 *", name = "points"},
|
{type = "const Vector2 *", name = "points"},
|
||||||
{type = "int", name = "pointCount"},
|
{type = "int", name = "pointCount"},
|
||||||
{type = "float", name = "thick"},
|
{type = "float", name = "thick"},
|
||||||
{type = "Color", name = "color"}
|
{type = "Color", name = "color"}
|
||||||
|
|
@ -5048,7 +5048,7 @@ return {
|
||||||
description = "Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]",
|
description = "Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]",
|
||||||
returnType = "void",
|
returnType = "void",
|
||||||
params = {
|
params = {
|
||||||
{type = "Vector2 *", name = "points"},
|
{type = "const Vector2 *", name = "points"},
|
||||||
{type = "int", name = "pointCount"},
|
{type = "int", name = "pointCount"},
|
||||||
{type = "float", name = "thick"},
|
{type = "float", name = "thick"},
|
||||||
{type = "Color", name = "color"}
|
{type = "Color", name = "color"}
|
||||||
|
|
@ -5239,7 +5239,7 @@ return {
|
||||||
returnType = "bool",
|
returnType = "bool",
|
||||||
params = {
|
params = {
|
||||||
{type = "Vector2", name = "point"},
|
{type = "Vector2", name = "point"},
|
||||||
{type = "Vector2 *", name = "points"},
|
{type = "const Vector2 *", name = "points"},
|
||||||
{type = "int", name = "pointCount"}
|
{type = "int", name = "pointCount"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -5621,7 +5621,7 @@ return {
|
||||||
returnType = "void",
|
returnType = "void",
|
||||||
params = {
|
params = {
|
||||||
{type = "Image *", name = "image"},
|
{type = "Image *", name = "image"},
|
||||||
{type = "float*", name = "kernel"},
|
{type = "float *", name = "kernel"},
|
||||||
{type = "int", name = "kernelSize"}
|
{type = "int", name = "kernelSize"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -5970,6 +5970,66 @@ return {
|
||||||
{type = "Color", name = "color"}
|
{type = "Color", name = "color"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "ImageDrawTriangle",
|
||||||
|
description = "Draw triangle within an image",
|
||||||
|
returnType = "void",
|
||||||
|
params = {
|
||||||
|
{type = "Image *", name = "dst"},
|
||||||
|
{type = "Vector2", name = "v1"},
|
||||||
|
{type = "Vector2", name = "v2"},
|
||||||
|
{type = "Vector2", name = "v3"},
|
||||||
|
{type = "Color", name = "color"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "ImageDrawTriangleEx",
|
||||||
|
description = "Draw triangle with interpolated colors within an image",
|
||||||
|
returnType = "void",
|
||||||
|
params = {
|
||||||
|
{type = "Image *", name = "dst"},
|
||||||
|
{type = "Vector2", name = "v1"},
|
||||||
|
{type = "Vector2", name = "v2"},
|
||||||
|
{type = "Vector2", name = "v3"},
|
||||||
|
{type = "Color", name = "c1"},
|
||||||
|
{type = "Color", name = "c2"},
|
||||||
|
{type = "Color", name = "c3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "ImageDrawTriangleLines",
|
||||||
|
description = "Draw triangle outline within an image",
|
||||||
|
returnType = "void",
|
||||||
|
params = {
|
||||||
|
{type = "Image *", name = "dst"},
|
||||||
|
{type = "Vector2", name = "v1"},
|
||||||
|
{type = "Vector2", name = "v2"},
|
||||||
|
{type = "Vector2", name = "v3"},
|
||||||
|
{type = "Color", name = "color"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "ImageDrawTriangleFan",
|
||||||
|
description = "Draw a triangle fan defined by points within an image (first vertex is the center)",
|
||||||
|
returnType = "void",
|
||||||
|
params = {
|
||||||
|
{type = "Image *", name = "dst"},
|
||||||
|
{type = "Vector2 *", name = "points"},
|
||||||
|
{type = "int", name = "pointCount"},
|
||||||
|
{type = "Color", name = "color"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "ImageDrawTriangleStrip",
|
||||||
|
description = "Draw a triangle strip defined by points within an image",
|
||||||
|
returnType = "void",
|
||||||
|
params = {
|
||||||
|
{type = "Image *", name = "dst"},
|
||||||
|
{type = "Vector2 *", name = "points"},
|
||||||
|
{type = "int", name = "pointCount"},
|
||||||
|
{type = "Color", name = "color"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "ImageDraw",
|
name = "ImageDraw",
|
||||||
description = "Draw a source image within a destination image (tint applied to source)",
|
description = "Draw a source image within a destination image (tint applied to source)",
|
||||||
|
|
@ -6855,7 +6915,7 @@ return {
|
||||||
description = "Draw a triangle strip defined by points",
|
description = "Draw a triangle strip defined by points",
|
||||||
returnType = "void",
|
returnType = "void",
|
||||||
params = {
|
params = {
|
||||||
{type = "Vector3 *", name = "points"},
|
{type = "const Vector3 *", name = "points"},
|
||||||
{type = "int", name = "pointCount"},
|
{type = "int", name = "pointCount"},
|
||||||
{type = "Color", name = "color"}
|
{type = "Color", name = "color"}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -670,7 +670,7 @@
|
||||||
<Param type="unsigned int" name="frames" desc="" />
|
<Param type="unsigned int" name="frames" desc="" />
|
||||||
</Callback>
|
</Callback>
|
||||||
</Callbacks>
|
</Callbacks>
|
||||||
<Functions count="566">
|
<Functions count="571">
|
||||||
<Function name="InitWindow" retType="void" paramCount="3" desc="Initialize window and OpenGL context">
|
<Function name="InitWindow" retType="void" paramCount="3" desc="Initialize window and OpenGL context">
|
||||||
<Param type="int" name="width" desc="" />
|
<Param type="int" name="width" desc="" />
|
||||||
<Param type="int" name="height" desc="" />
|
<Param type="int" name="height" desc="" />
|
||||||
|
|
@ -1317,7 +1317,7 @@
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="DrawLineStrip" retType="void" paramCount="3" desc="Draw lines sequence (using gl lines)">
|
<Function name="DrawLineStrip" retType="void" paramCount="3" desc="Draw lines sequence (using gl lines)">
|
||||||
<Param type="Vector2 *" name="points" desc="" />
|
<Param type="const Vector2 *" name="points" desc="" />
|
||||||
<Param type="int" name="pointCount" desc="" />
|
<Param type="int" name="pointCount" desc="" />
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
|
@ -1493,12 +1493,12 @@
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="DrawTriangleFan" retType="void" paramCount="3" desc="Draw a triangle fan defined by points (first vertex is the center)">
|
<Function name="DrawTriangleFan" retType="void" paramCount="3" desc="Draw a triangle fan defined by points (first vertex is the center)">
|
||||||
<Param type="Vector2 *" name="points" desc="" />
|
<Param type="const Vector2 *" name="points" desc="" />
|
||||||
<Param type="int" name="pointCount" desc="" />
|
<Param type="int" name="pointCount" desc="" />
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="DrawTriangleStrip" retType="void" paramCount="3" desc="Draw a triangle strip defined by points">
|
<Function name="DrawTriangleStrip" retType="void" paramCount="3" desc="Draw a triangle strip defined by points">
|
||||||
<Param type="Vector2 *" name="points" desc="" />
|
<Param type="const Vector2 *" name="points" desc="" />
|
||||||
<Param type="int" name="pointCount" desc="" />
|
<Param type="int" name="pointCount" desc="" />
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
|
@ -1525,31 +1525,31 @@
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="DrawSplineLinear" retType="void" paramCount="4" desc="Draw spline: Linear, minimum 2 points">
|
<Function name="DrawSplineLinear" retType="void" paramCount="4" desc="Draw spline: Linear, minimum 2 points">
|
||||||
<Param type="Vector2 *" name="points" desc="" />
|
<Param type="const Vector2 *" name="points" desc="" />
|
||||||
<Param type="int" name="pointCount" desc="" />
|
<Param type="int" name="pointCount" desc="" />
|
||||||
<Param type="float" name="thick" desc="" />
|
<Param type="float" name="thick" desc="" />
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="DrawSplineBasis" retType="void" paramCount="4" desc="Draw spline: B-Spline, minimum 4 points">
|
<Function name="DrawSplineBasis" retType="void" paramCount="4" desc="Draw spline: B-Spline, minimum 4 points">
|
||||||
<Param type="Vector2 *" name="points" desc="" />
|
<Param type="const Vector2 *" name="points" desc="" />
|
||||||
<Param type="int" name="pointCount" desc="" />
|
<Param type="int" name="pointCount" desc="" />
|
||||||
<Param type="float" name="thick" desc="" />
|
<Param type="float" name="thick" desc="" />
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="DrawSplineCatmullRom" retType="void" paramCount="4" desc="Draw spline: Catmull-Rom, minimum 4 points">
|
<Function name="DrawSplineCatmullRom" retType="void" paramCount="4" desc="Draw spline: Catmull-Rom, minimum 4 points">
|
||||||
<Param type="Vector2 *" name="points" desc="" />
|
<Param type="const Vector2 *" name="points" desc="" />
|
||||||
<Param type="int" name="pointCount" desc="" />
|
<Param type="int" name="pointCount" desc="" />
|
||||||
<Param type="float" name="thick" desc="" />
|
<Param type="float" name="thick" desc="" />
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="DrawSplineBezierQuadratic" retType="void" paramCount="4" desc="Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]">
|
<Function name="DrawSplineBezierQuadratic" retType="void" paramCount="4" desc="Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]">
|
||||||
<Param type="Vector2 *" name="points" desc="" />
|
<Param type="const Vector2 *" name="points" desc="" />
|
||||||
<Param type="int" name="pointCount" desc="" />
|
<Param type="int" name="pointCount" desc="" />
|
||||||
<Param type="float" name="thick" desc="" />
|
<Param type="float" name="thick" desc="" />
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="DrawSplineBezierCubic" retType="void" paramCount="4" desc="Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]">
|
<Function name="DrawSplineBezierCubic" retType="void" paramCount="4" desc="Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]">
|
||||||
<Param type="Vector2 *" name="points" desc="" />
|
<Param type="const Vector2 *" name="points" desc="" />
|
||||||
<Param type="int" name="pointCount" desc="" />
|
<Param type="int" name="pointCount" desc="" />
|
||||||
<Param type="float" name="thick" desc="" />
|
<Param type="float" name="thick" desc="" />
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
|
|
@ -1655,7 +1655,7 @@
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="CheckCollisionPointPoly" retType="bool" paramCount="3" desc="Check if point is within a polygon described by array of vertices">
|
<Function name="CheckCollisionPointPoly" retType="bool" paramCount="3" desc="Check if point is within a polygon described by array of vertices">
|
||||||
<Param type="Vector2" name="point" desc="" />
|
<Param type="Vector2" name="point" desc="" />
|
||||||
<Param type="Vector2 *" name="points" desc="" />
|
<Param type="const Vector2 *" name="points" desc="" />
|
||||||
<Param type="int" name="pointCount" desc="" />
|
<Param type="int" name="pointCount" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="CheckCollisionLines" retType="bool" paramCount="5" desc="Check the collision between two lines defined by two points each, returns collision point by reference">
|
<Function name="CheckCollisionLines" retType="bool" paramCount="5" desc="Check the collision between two lines defined by two points each, returns collision point by reference">
|
||||||
|
|
@ -1844,7 +1844,7 @@
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="ImageKernelConvolution" retType="void" paramCount="3" desc="Apply Custom Square image convolution kernel">
|
<Function name="ImageKernelConvolution" retType="void" paramCount="3" desc="Apply Custom Square image convolution kernel">
|
||||||
<Param type="Image *" name="image" desc="" />
|
<Param type="Image *" name="image" desc="" />
|
||||||
<Param type="float*" name="kernel" desc="" />
|
<Param type="float *" name="kernel" desc="" />
|
||||||
<Param type="int" name="kernelSize" desc="" />
|
<Param type="int" name="kernelSize" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="ImageResize" retType="void" paramCount="3" desc="Resize image (Bicubic scaling algorithm)">
|
<Function name="ImageResize" retType="void" paramCount="3" desc="Resize image (Bicubic scaling algorithm)">
|
||||||
|
|
@ -2017,6 +2017,41 @@
|
||||||
<Param type="int" name="thick" desc="" />
|
<Param type="int" name="thick" desc="" />
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="ImageDrawTriangle" retType="void" paramCount="5" desc="Draw triangle within an image">
|
||||||
|
<Param type="Image *" name="dst" desc="" />
|
||||||
|
<Param type="Vector2" name="v1" desc="" />
|
||||||
|
<Param type="Vector2" name="v2" desc="" />
|
||||||
|
<Param type="Vector2" name="v3" desc="" />
|
||||||
|
<Param type="Color" name="color" desc="" />
|
||||||
|
</Function>
|
||||||
|
<Function name="ImageDrawTriangleEx" retType="void" paramCount="7" desc="Draw triangle with interpolated colors within an image">
|
||||||
|
<Param type="Image *" name="dst" desc="" />
|
||||||
|
<Param type="Vector2" name="v1" desc="" />
|
||||||
|
<Param type="Vector2" name="v2" desc="" />
|
||||||
|
<Param type="Vector2" name="v3" desc="" />
|
||||||
|
<Param type="Color" name="c1" desc="" />
|
||||||
|
<Param type="Color" name="c2" desc="" />
|
||||||
|
<Param type="Color" name="c3" desc="" />
|
||||||
|
</Function>
|
||||||
|
<Function name="ImageDrawTriangleLines" retType="void" paramCount="5" desc="Draw triangle outline within an image">
|
||||||
|
<Param type="Image *" name="dst" desc="" />
|
||||||
|
<Param type="Vector2" name="v1" desc="" />
|
||||||
|
<Param type="Vector2" name="v2" desc="" />
|
||||||
|
<Param type="Vector2" name="v3" desc="" />
|
||||||
|
<Param type="Color" name="color" desc="" />
|
||||||
|
</Function>
|
||||||
|
<Function name="ImageDrawTriangleFan" retType="void" paramCount="4" desc="Draw a triangle fan defined by points within an image (first vertex is the center)">
|
||||||
|
<Param type="Image *" name="dst" desc="" />
|
||||||
|
<Param type="Vector2 *" name="points" desc="" />
|
||||||
|
<Param type="int" name="pointCount" desc="" />
|
||||||
|
<Param type="Color" name="color" desc="" />
|
||||||
|
</Function>
|
||||||
|
<Function name="ImageDrawTriangleStrip" retType="void" paramCount="4" desc="Draw a triangle strip defined by points within an image">
|
||||||
|
<Param type="Image *" name="dst" desc="" />
|
||||||
|
<Param type="Vector2 *" name="points" desc="" />
|
||||||
|
<Param type="int" name="pointCount" desc="" />
|
||||||
|
<Param type="Color" name="color" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="ImageDraw" retType="void" paramCount="5" desc="Draw a source image within a destination image (tint applied to source)">
|
<Function name="ImageDraw" retType="void" paramCount="5" desc="Draw a source image within a destination image (tint applied to source)">
|
||||||
<Param type="Image *" name="dst" desc="" />
|
<Param type="Image *" name="dst" desc="" />
|
||||||
<Param type="Image" name="src" desc="" />
|
<Param type="Image" name="src" desc="" />
|
||||||
|
|
@ -2440,7 +2475,7 @@
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="DrawTriangleStrip3D" retType="void" paramCount="3" desc="Draw a triangle strip defined by points">
|
<Function name="DrawTriangleStrip3D" retType="void" paramCount="3" desc="Draw a triangle strip defined by points">
|
||||||
<Param type="Vector3 *" name="points" desc="" />
|
<Param type="const Vector3 *" name="points" desc="" />
|
||||||
<Param type="int" name="pointCount" desc="" />
|
<Param type="int" name="pointCount" desc="" />
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
|
|
||||||
|
|
@ -1100,7 +1100,7 @@ static void ShowCommandLineInfo(void)
|
||||||
printf(" NOTE: If not specified, defaults to: raylib_api.txt\n\n");
|
printf(" NOTE: If not specified, defaults to: raylib_api.txt\n\n");
|
||||||
printf(" -f, --format <type> : Define output format for parser data.\n");
|
printf(" -f, --format <type> : Define output format for parser data.\n");
|
||||||
printf(" Supported types: DEFAULT, JSON, XML, LUA, CODE\n\n");
|
printf(" Supported types: DEFAULT, JSON, XML, LUA, CODE\n\n");
|
||||||
printf(" -d, --define <DEF> : Define functions specifiers (i.e. RLAPI for raylib.h, RMDEF for raymath.h, etc.)\n");
|
printf(" -d, --define <DEF> : Define functions specifiers (i.e. RLAPI for raylib.h, RMAPI for raymath.h, etc.)\n");
|
||||||
printf(" NOTE: If no specifier defined, defaults to: RLAPI\n\n");
|
printf(" NOTE: If no specifier defined, defaults to: RLAPI\n\n");
|
||||||
printf(" -t, --truncate <after> : Define string to truncate input after (i.e. \"RLGL IMPLEMENTATION\" for rlgl.h)\n");
|
printf(" -t, --truncate <after> : Define string to truncate input after (i.e. \"RLGL IMPLEMENTATION\" for rlgl.h)\n");
|
||||||
printf(" NOTE: If not specified, the full input file is parsed.\n\n");
|
printf(" NOTE: If not specified, the full input file is parsed.\n\n");
|
||||||
|
|
@ -1110,7 +1110,7 @@ static void ShowCommandLineInfo(void)
|
||||||
printf(" Process <raylib.h> to generate <api.json>\n\n");
|
printf(" Process <raylib.h> to generate <api.json>\n\n");
|
||||||
printf(" > raylib_parser --output raylib_data.info --format XML\n");
|
printf(" > raylib_parser --output raylib_data.info --format XML\n");
|
||||||
printf(" Process <raylib.h> to generate <raylib_data.info> as XML text data\n\n");
|
printf(" Process <raylib.h> to generate <raylib_data.info> as XML text data\n\n");
|
||||||
printf(" > raylib_parser --input raymath.h --output raymath_data.info --format XML\n");
|
printf(" > raylib_parser --input raymath.h --output raymath_data.info --format XML --define RMAPI\n");
|
||||||
printf(" Process <raymath.h> to generate <raymath_data.info> as XML text data\n\n");
|
printf(" Process <raymath.h> to generate <raymath_data.info> as XML text data\n\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,10 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (${PLATFORM} MATCHES "Web")
|
if (${PLATFORM} MATCHES "Web")
|
||||||
target_link_options(raylib PRIVATE "-sUSE_GLFW=3")
|
target_link_options(raylib PUBLIC "-sUSE_GLFW=3")
|
||||||
|
if(${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_ES3")
|
||||||
|
target_link_options(raylib PUBLIC "-sFULL_ES3")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_properties(raylib PROPERTIES
|
set_target_properties(raylib PROPERTIES
|
||||||
|
|
|
||||||
|
|
@ -316,7 +316,7 @@ endif
|
||||||
# -D_GNU_SOURCE access to lots of nonstandard GNU/Linux extension functions
|
# -D_GNU_SOURCE access to lots of nonstandard GNU/Linux extension functions
|
||||||
# -Werror=pointer-arith catch unportable code that does direct arithmetic on void pointers
|
# -Werror=pointer-arith catch unportable code that does direct arithmetic on void pointers
|
||||||
# -fno-strict-aliasing jar_xm.h does shady stuff (breaks strict aliasing)
|
# -fno-strict-aliasing jar_xm.h does shady stuff (breaks strict aliasing)
|
||||||
CFLAGS = -Wall -D_GNU_SOURCE -D$(PLATFORM) -D$(GRAPHICS) -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing $(CUSTOM_CFLAGS)
|
CFLAGS = -Wall -D_GNU_SOURCE -D$(PLATFORM) -D$(GRAPHICS) -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing
|
||||||
|
|
||||||
ifneq ($(RAYLIB_CONFIG_FLAGS), NONE)
|
ifneq ($(RAYLIB_CONFIG_FLAGS), NONE)
|
||||||
CFLAGS += -DEXTERNAL_CONFIG_FLAGS $(RAYLIB_CONFIG_FLAGS)
|
CFLAGS += -DEXTERNAL_CONFIG_FLAGS $(RAYLIB_CONFIG_FLAGS)
|
||||||
|
|
@ -449,6 +449,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
CFLAGS += $(CUSTOM_CFLAGS)
|
||||||
|
|
||||||
# Define include paths for required headers: INCLUDE_PATHS
|
# Define include paths for required headers: INCLUDE_PATHS
|
||||||
# NOTE: Several external required libraries (stb and others)
|
# NOTE: Several external required libraries (stb and others)
|
||||||
#------------------------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -217,6 +217,7 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
raylib.addIncludePath(b.path("src"));
|
||||||
raylib.root_module.addCSourceFiles(.{
|
raylib.root_module.addCSourceFiles(.{
|
||||||
.root = b.path("src"),
|
.root = b.path("src"),
|
||||||
.files = c_source_files.items,
|
.files = c_source_files.items,
|
||||||
|
|
|
||||||
4
src/external/rl_gputex.h
vendored
4
src/external/rl_gputex.h
vendored
|
|
@ -171,6 +171,10 @@ void *rl_load_dds_from_memory(const unsigned char *file_data, unsigned int file_
|
||||||
|
|
||||||
*width = header->width;
|
*width = header->width;
|
||||||
*height = header->height;
|
*height = header->height;
|
||||||
|
|
||||||
|
if (*width % 4 != 0) LOG("WARNING: IMAGE: DDS file width must be multiple of 4. Image will not display correctly");
|
||||||
|
if (*height % 4 != 0) LOG("WARNING: IMAGE: DDS file height must be multiple of 4. Image will not display correctly");
|
||||||
|
|
||||||
image_pixel_size = header->width*header->height;
|
image_pixel_size = header->width*header->height;
|
||||||
|
|
||||||
if (header->mipmap_count == 0) *mips = 1; // Parameter not used
|
if (header->mipmap_count == 0) *mips = 1; // Parameter not used
|
||||||
|
|
|
||||||
|
|
@ -666,6 +666,9 @@ void SetWindowMaxSize(int width, int height)
|
||||||
// Set window dimensions
|
// Set window dimensions
|
||||||
void SetWindowSize(int width, int height)
|
void SetWindowSize(int width, int height)
|
||||||
{
|
{
|
||||||
|
CORE.Window.screen.width = width;
|
||||||
|
CORE.Window.screen.height = height;
|
||||||
|
|
||||||
glfwSetWindowSize(platform.handle, width, height);
|
glfwSetWindowSize(platform.handle, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue