Commit graph

84 commits

Author SHA1 Message Date
raysan5
b972b8d324 REVIEWED: API functions specifiers 2021-10-05 18:33:41 +02:00
Ray
99ab4d6cb8 WARNING: MODULES RENAMING!!!
raylib modules have been slightly renamed to add some identity and note that they are independent modules that can be used as standalone separate parts of raylib if required.

The renamed modules are:
 - `core` -> `rcore`
 - `shapes` -> `rshapes`
 - `textures` -> `rtextures`
 - `text` -> `rtext`
 - `models` -> `rmodels`
 - `camera` -> `rcamera`
 - `gestures` -> `rgestures`
 - `core` -> `rcore`

All the build systems has been adapted to this change.
2021-09-22 00:15:06 +02:00
Ray
803094f41f REVIEWED: Touch input system #1975 #1960
- ADDED: `GetTouchPointCount()` to core module, removed from gestures module.
 - Support multiple touch points: `MAX_TOUCH_POINTS`.
2021-09-10 15:19:12 +02:00
procfxgen
dfc465ca6d
new models_magicavoxel_loading example (#1940)
* new models_magicavoxel_loading example

* Portable header-only file "magicavoxel_loader.h" for MagicaVoxel loader example.

* models_magicavoxel_loading example added to CMakeLists.txt and Makefile

* fix models_magicavoxel_loading example for linux.

* * vox_loader into "src/external/vox_loader.h"
 * vox file support for "models.c"
 * updated example "models/models_magicavoxel_loading.c"

* * Fix Vox_FreeArrays (removed memory leak)

* * removed magicavoxel_loader.h

* * Revert vs2019 solution
2021-09-04 19:55:09 +02:00
raysan5
5b6d83b533 REVIEWED: rlgl defines for consistency 2021-07-31 19:46:44 +02:00
raysan5
b4fddf146b REVIEWED: Added new mechanism to avoid data types collision between modules that share same data types and can be used in standalone mode 2021-07-30 13:44:52 +02:00
Uneven Prankster
4e363b5479
Remove unused UWP defines (#1894)
* Unused UWP define removal

* Further removal of unusued UWP defines
2021-07-26 17:40:10 +02:00
Ray
e0720a0a55 WARNING: REVIEWED: Default shader uniform names
When a shader is loaded, by default, several locations are tried to be set automatically.
2021-06-25 13:35:43 +02:00
Ray
3db26f82ea WARNING: BREAKING: Functions renamed!
RENAMED: GetCodepoints() -> LoadCodepoints(), now codepoint array data is loaded dynamically instead of reusing a limited static buffer.
ADDED: UnloadCodepoints() to safely free loaded codepoints
RENAMED: GetNextCodepoint() -> GetCodepoint()
2021-06-23 09:58:49 +02:00
raysan5
28093c46a8 Disable SUPPORT_EVENTS_AUTOMATION by default 2021-06-19 19:54:36 +02:00
Ray
8be5ec2288 Avoid SUPPORT_MOUSE_CURSOR_POINT 2021-06-17 18:18:16 +02:00
Ray
e07054d0d4 RENAMED: SwapBuffers() -> SwapScreenBuffer()
Avoid possible symbol collisions
2021-06-17 12:47:03 +02:00
Ray
19b71f5f13 WARNING: Exposed SUPPORT_CUSTOM_FRAME_CONTROL #1729 2021-06-17 12:17:50 +02:00
Ray
68e408474d Renamed SUPPORT_MOUSE_CURSOR_NATIVE -> SUPPORT_MOUSE_CURSOR_POINT 2021-06-17 11:17:39 +02:00
Ray
de7b8ad551 NEW CRAZY FEATURE: EVENTS AUTOMATION!
https://youtu.be/3dZenkpmRzM
2021-06-11 12:27:46 +02:00
Jeffery Myers
133e6f097d
Convert the half sleep to a sleep that is a fraction of the target FPS (Default 95%) to reduce CPU use. (#1756)
Co-authored-by: Jeffery Myers <JefMyers@blizzard.com>
2021-05-07 19:49:44 +02:00
Ray
a41ed986bd Expose RAYLIB_VERSION in raylib.h #1747 2021-05-04 11:20:47 +02:00
Ray
d4ccca81db WARNING: REDESIGNED: rlLoadExtensions() #1295
Added config flag: SUPPORT_GL_DETAILS_INFO
2021-04-18 20:24:19 +02:00
Ray
71b86bf4d0 REDESIGNED: Vr stereo rendering 2021-04-06 22:49:41 +02:00
raysan5
c2c141f941 Update version to raylib 3.7 2021-04-05 13:36:23 +02:00
raysan5
d64f27bad1 Remove old flag 2021-04-02 13:42:07 +02:00
Jeffery Myers
b573ff3e7a
[AUDIO] Use device native sample rates (#1660)
* Init MinAudio to a sample rate of 0 to let the device pick the rate.
Read the rate from the device after it starts up.
Convert AUDIO_DEVICE_SAMPLE_RATE from a #def into an int, that is set from the device's rate
Set all sample systems to use the AUDIO_DEVICE_SAMPLE_RATE as the target rate to minimize resampling.

* use device sample rate instead of separate var
let config define a device sample rate if it wants to, but let the default be 0 for native rate.

* Don't use fixed sample rates for tracker files.
Remove config default audio buffer size and replace with a function that computes one for a reasonable frame rate at the output sample rate.
2021-03-21 22:07:55 +01:00
Ray
a76fcaba3e BIG CHANGE: REDESIGNED: Vr device simulator #1582
Vr simulator has been moved to core module and completely redesigned. Now user is in charge of stereo-render fbo and also in full control of distortion shader. Code is a bit more complex but better aligned with other raylib examples.
2021-03-20 18:36:25 +01:00
Ray
9909068714 Removed trailing spaces 2021-03-19 19:43:44 +01:00
Ray
0872365938 Add config flag: SUPPORT_WINMM_HIGHRES_TIMER #1641
Useful to avoid WinMM requirement and useful to avoid possible performance issues.
2021-03-12 17:18:48 +01:00
Ray
b084552808 ADDED: Config flag: SUPPORT_STANDARD_FILEIO
This new flag allows omitting stdio.h library in case of a custom implementation is used.
2021-03-04 20:36:04 +01:00
Agnis "NeZvērs" Aldiņš
209445ccde
LoadMusicStreamFromMemory (#1606)
* define SUPPORT_FILEFORMAT_MOD in config.h

* RLAPI LoadModuleFromData() definition in raylib.h

* LoadModuleFromData() definition in raudio.h

* LoadModuleFromData implementation in raudio.c

* Rename API to LoadMusicStreamFromMemory & default unload.

* raudio.c tabs to spaces

* Styling curly bracket and removing dev debugging TRACELOG

Co-authored-by: nezvers <agnis16@inbox.lv>
2021-02-22 19:45:52 +01:00
Ray
ef8318f5e3 [models] Move vboId ALLOC/FREE to rlgl module #1603
Actually, it seems more logical that rlgl takes care of OpenGL data than the models module...

Also, models module loaded vertex data is unloaded by models module.
2021-02-21 12:09:52 +01:00
hristo
f3ce3a6f74
Removing config.h.in file (#1546)
CMake relied on this file for configurations and also was interfering in the regular config.h by having a separate definition if building with CMake. This was not entirely correct so instead we will define compile time definitions separately through CMake (CompileDefinitions.cmake) and also will use the provided EXTERNAL_CONFIG_FLAGS that I found that will not use config.h in through the build process.

I also introduced a new compiler option (CUSTOMIZE_BUILD) that when OFF will use the default config.h and when ON will show other options for redefining your own options.

Fixed an error in rlgl.h where if you have both RLGL_STANDALONE and SUPPORT_VR_SIMULATOR you get a compile time error.
2021-01-25 10:47:53 +01:00
hristo
9821725c6b
Big cmake changes (#1514)
* Delete emscripten.cmake

This file is not needed at this point. EMSDK provides a toolchain file that has a lot more things in it and is better supported. Project currently works fine with the documentation provided in Emscripten SDK on how to build projects.

* First pass file separation.

The main two files are cleaner now. Only important things can be seen. Major changes include:
- raylib_static is now the alias instead of raylib
- Repeating segments are removed and pulled into separate files into <root>/cmake
- File is reordered to make more sense
- Installs are better structured
- Library is build into an output directory "raylib" instead of "src"
- All public header files are now set as a public header file
- Source files need to be listed (it is a bad practice to capture them using wildcards and file globs)
- CMakeLists are better commented

* Second pass on the example dirs.

They are quite complex so I'm more hesitant to do major changes. Also it works pretty well. Noticed that I forgot one of the seperated files and added it into src/CMakeLists.txt.

* Returned the header copy as it was convenient to have the public headers copied.

* A better description to the variable RAYLIB_IS_MAIN

Co-authored-by: Rob Loach <robloach@gmail.com>

* Remove debug message

Co-authored-by: Rob Loach <robloach@gmail.com>

* Improvements based on review.

* Simplify the install condition to not be platform specific as it was before.

Co-authored-by: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com>

* Remove some CMAKE variables as they don't affect the build in any way

Co-authored-by: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com>

Co-authored-by: Rob Loach <robloach@gmail.com>
Co-authored-by: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com>
2021-01-13 23:10:02 +01:00
Ray
5d1d590692 REDESIGN: Compresion API
Now it compresses/decompresses valid DEFLATE streams instead of zlib streams. It uses the minimal and efficient libraries: sdefl/sinfl.
2021-01-12 21:15:11 +01:00
raysan5
d7b4b9e485 Update year to 2021 2021-01-02 18:15:13 +01:00
Ray
976932e05e Set version for raylib 3.5 2020-12-19 20:38:49 +01:00
Ray
23ed67cce0 Review some config options 2020-11-30 09:00:40 +01:00
Ray
468a0bedd8 REDESIGNED: Window state config #1367 -WIP-
Some flags not working properly yet...
2020-11-23 00:49:27 +01:00
Ray
4eae76302f REPLACED: rgif.h by msf_gif.h
The improvement in performance is considerable!
2020-11-20 00:34:18 +01:00
kernelkinetic
e90b4d8915
Platform DRM (#1388)
* updated README.md

* fixed CMakeLists.txt to allow building and debugging with Visual Studio Code and CMAKE Tools extension

* added PLATFORM_DRM
contains mouse pointer code from https://github.com/chriscamacho

* removed redundant cleanup in InitGraphicsDevice

* fixed DRM connector mode selection

* added choosen DRM connected mode to log output

* added respecting TargetFPS on DRM mode selection, default to 60

* added support for GetMonitorRefreshRate

* changed SUPPORT_MOUSE_CURSOR_RPI to SUPPORT_MOUSE_CURSOR_NATIVE

* changed avoidProgressive to allowInterlaced

* cleanup, function extraction and improved mode selection

* README reverted to original for PR

* line endings fixed for core.c

* removed old code

* mouse pointer reverted to small square

* replaced SetGraphicDeviceName() by DEFAULT_GRAPHIC_DEVICE_DRM

Co-authored-by: kernelkinetic <kernelkinetic@outlook.com>
2020-09-27 10:18:43 +02:00
Ray
5986eee6ab Expose additional configuration options
Some internal defines have been exposed in config.h
2020-06-30 11:05:09 +02:00
raysan5
3a6af2cc57 Remove SUPPORT_IMAGE_DRAWING flag
ImageDraw() is actually used in multiple functions and it aslo depends on several functions...
2020-05-09 17:17:54 +02:00
raysan5
7efed56b66 Added [text] flag: SUPPORT_TEXT_MANIPULATION 2020-05-09 12:38:33 +02:00
raysan5
959447d8ed Reorganized texture functions
Removed ImageAlphaMask() dependency on [text] LoadBMFont()
2020-05-09 12:05:00 +02:00
raysan5
e469f4ebf7 Update config.h, enable some file-formats by default 2020-03-30 17:42:42 +02:00
raysan5
e37d021cd3 Enable IQM models support on config.h 2020-03-25 18:51:46 +01:00
raysan5
133a882556 Update config.h 2020-03-25 18:39:28 +01:00
Ray
eb86d69a38 Review default config flags 2020-02-27 16:14:31 +01:00
Ray
23bde477e5 REDESIGN: LoadStorageValue()/SaveStorageValue()
Using new file I/O ABI
2020-02-27 13:18:15 +01:00
Ray
aa3b413390 SUPPORT_HALFBUSY_WAIT_LOOP 2020-02-11 19:01:29 +01:00
raysan5
49145e90a2 Remove spacing 2020-02-10 13:16:34 +01:00
Ray
cde26c743c Replace TraceLog() function by TRACELOG macro
Added SUPPORT_TRACELOG_DEBUG config
2020-02-03 19:13:24 +01:00
Ray
40b73a8a91
Develop branch integration (#1091)
* [core] REDESIGNED: Implement global context

* [rlgl] REDESIGNED: Implement global context

* Reviewed globals for Android

* Review Android globals usage

* Update Android globals

* Bump raylib version to 3.0 !!!

* [raudio] REDESIGNED: Implement global context

* [raudio] Reorder functions

* [core] Tweaks on descriptions

* Issues with SUPPORT_MOUSE_GESTURES

* [camera] Use global context

* REDESIGN: Move shapes drawing texture/rec to RLGL context

* Review some issues on standalone mode

* Update to use global context

* [GAME] Upload RE-PAIR game from GGJ2020 -WIP-

* Update game: RE-PAIR

* [utils] TRACELOG macros proposal

* Update config.h
2020-02-03 18:31:30 +01:00