910 Commits
2.6.0 ... 3.5.0

Author SHA1 Message Date
Ray
e25e380e80 Update webassembly.yml 2020-12-25 02:07:24 +01:00
Ray
1320d9e303 Update macos.yml 2020-12-25 02:06:50 +01:00
Ray
e4477472f3 Update android.yml 2020-12-25 02:05:39 +01:00
Ray
60ffc9f59b Update linux.yml 2020-12-25 02:04:18 +01:00
Ray
79435bf34e Update windows.yml 2020-12-25 02:03:33 +01:00
Ray
ef5667c078 Update HISTORY.md 2020-12-25 01:35:22 +01:00
Ray
b6557166f2 Update README.md 2020-12-25 01:31:15 +01:00
Ray
a7599b83a5 Update HISTORY.md 2020-12-25 01:25:40 +01:00
Ray
047747a4cc Update HISTORY.md 2020-12-25 01:22:58 +01:00
raysan5
e8ea105b3d Update HISTORY.md 2020-12-25 01:21:09 +01:00
raysan5
1caa31396e Update CHANGELOG 2020-12-25 01:20:19 +01:00
raysan5
b973c2f08e Update SPONSORS.md 2020-12-24 23:21:44 +01:00
raysan5
e0c1f25116 Update ROADMAP.md 2020-12-24 23:10:42 +01:00
raysan5
d38e01d186 Minor tweak 2020-12-24 23:10:29 +01:00
raysan5
ea0f6c7a26 Replace TABS by 4 spaces 2020-12-24 23:07:52 +01:00
Ray
b93c4b0c20 Update CHANGELOG 2020-12-24 19:33:52 +01:00
raysan5
ec3845fa9f Review some RPI4 tracelogs 2020-12-24 19:09:05 +01:00
raysan5
3e041a27b1 Update Makefile 2020-12-24 19:08:02 +01:00
raysan5
5ffce8f230 Review tracelog messages for DRM platform 2020-12-24 17:56:08 +01:00
raysan5
8073c5ec93 Update README.md 2020-12-24 15:51:46 +01:00
raysan5
13a288d13a Update README.md 2020-12-24 15:48:43 +01:00
Ray
5662403488 Update README.md 2020-12-24 15:32:15 +01:00
raysan5
b68e522ffc Updated several files while porting examples to web 2020-12-24 13:51:24 +01:00
raysan5
bab1b9c1c5 Review example formating 2020-12-23 20:59:14 +01:00
raysan5
d9a9bacb48 Review formatting 2020-12-23 20:30:00 +01:00
raysan5
10a57f297e Merge branch 'master' of https://github.com/raysan5/raylib 2020-12-23 17:50:08 +01:00
raysan5
60a3746a80 Remove dup example 2020-12-23 17:49:54 +01:00
Ray
002258aa57 Update CHANGELOG 2020-12-23 17:44:00 +01:00
Ray
c59ea67b97 Update CHANGELOG 2020-12-23 17:43:06 +01:00
raysan5
7e459dc38b Review Android Makefiles to required version 2020-12-23 17:05:51 +01:00
raysan5
f8a2903cec Review issues when compiling for Android 2020-12-23 17:05:07 +01:00
raysan5
ef46003270 Update raylib functions parser to generate XML intellisense file
Update Notepad++ functions intellisense
2020-12-23 16:35:39 +01:00
raysan5
1df89039ad Update Makefile(s) 2020-12-23 16:34:21 +01:00
raysan5
0a9e080998 Remove trailing spaces 2020-12-23 15:03:26 +01:00
raysan5
547960ca71 Update raylib version 2020-12-23 13:48:53 +01:00
raysan5
59949bf848 Update resource file 2020-12-23 13:48:43 +01:00
Ray
28b3571517 Update CHANGELOG 2020-12-23 13:26:31 +01:00
raysan5
aa38532cc3 Remove unused variable 2020-12-23 13:03:13 +01:00
raysan5
9216e96315 Corrected typo 2020-12-23 13:02:40 +01:00
raysan5
0da827d754 Corrected small issue 2020-12-23 12:54:57 +01:00
raysan5
871c3d87b4 REMOVED: Travis CI 2020-12-23 12:46:06 +01:00
raysan5
b78ee13791 ADDED: CheckCollisionLines()
Removed function from raymath
2020-12-23 12:45:53 +01:00
Ray
2bdb45f280 Remove Travis CI badge 2020-12-23 12:30:00 +01:00
Victor Gallet
668b3e4cfb [Math Feature]: Add two functions for Vector2 to know if two lines intersect and two segments intersect (#1466)
* Add a function to know if two lines intersect each other and if yes, get the intersection point

* Remove indents

* Rework the declaration of the 'Vector2LineIntersect' function, and add the 'Vector2SegmentIntersect' function

* Remove bad indents

* Fix compilation issues

* Fix compilation error

* Fix compilation error

* Replace keyword '_Bool' by 'bool'
2020-12-21 21:04:02 +01:00
Ray
51e75be9d1 Update CHANGELOG 2020-12-20 11:05:24 +01:00
Ray
976932e05e Set version for raylib 3.5 2020-12-19 20:38:49 +01:00
Ray
d82113ec34 Camera funcs, review params names
Just for a better consistency
2020-12-19 20:14:34 +01:00
Ray
9097d0b4ef REVIEW: CheckCollisionSpheres() params naming 2020-12-19 20:05:32 +01:00
Ray
f30354fc35 Minor tweak 2020-12-19 20:01:07 +01:00
Ray
d2d72b1dfb ADDED: MemAlloc() / MemFree() #1440
Exposing internal memory allocator/free, useful for advance users when required
2020-12-19 19:43:25 +01:00
Ray
cbf7369a3d Update raylib.h 2020-12-19 19:28:06 +01:00
Ray
2374281204 Avoid *Rec suffix in some variables
Pefixing/Suffixing some data type identifier in the variables is not a convention used in raylib, just reviewed it for consistency...

Still, I kept the *Rec suffix in some functions.
2020-12-19 19:27:31 +01:00
Ray
015e715278 Corrected DrawTextRecEx() bug 2020-12-19 19:12:51 +01:00
Ray
e404a18226 Support font chars padding on drawing #1432
Previous implementation did not consider any padding while drawing the characters on screen (despite being available on the font atlas), so, only minimum character area was drawn.

If some text effect shader was required (shadow, glow, outline...), there was no space in the drawn quad to draw that pixels effect.

This commit corrects that issue.
2020-12-19 12:16:23 +01:00
Ray
51e8f37688 Minimal tweak 2020-12-19 00:22:58 +01:00
Ray
c36a6f3d9f Update textures.c 2020-12-19 00:01:14 +01:00
Ray
e07bc372a1 WARNING: RENAMED several functions for consistency #1440
This is a BREAKING CHANGE!

To address the linked issue, several functions have been renamed and couterpart functions have been created to free loaded memory:
 - RENAMED: GetImageData() -> LoadImageColors()
 - RENAMED: GetImagePalette() -> LoadImagePalette()
 - RENAMED: GetWaveData() -> LoadWaveSamples()
 - ADDED: UnloadImageColors()
 - ADDED: UnloadImagePalette()
 - ADDED: UnloadWaveSamples()
2020-12-18 21:03:08 +01:00
Ray
5dd142beb6 Added some Web checks for missing GLFW functions 2020-12-18 19:32:52 +01:00
Ray
96542269d0 WARNING: GetKeyPressed() <-> GetCharPressed() #1336
Previous GetKeyPressed() method was actually returning unicode codepoints equivalent values instead of the key-code of the pressed key. So, it has been replaced by GetCharPressed(), returning unicode codepoints and GetKeyPressed() now returns key-codes.
2020-12-18 18:58:02 +01:00
Ray
893a64712e Support mouse input on example #1465 2020-12-18 18:36:04 +01:00
hristo
0987507ef5 Add headers to install cmake (#1462)
* Changed extension for web from .bc to .a

I did this to support vcpkg expectation. When using the library from vcpkg for web you would install it using vcpkg install raylib:wasm32-emscripten but also vcpkg expects the output lib to be with .a extension instead of .bc

Doesn't make a difference for standalone builds or when raylib is used as a subdirectory dependency.

* Added headers to install targets to fix vcpkg usage

Currently vcpkg works by installing the cmake target into its packages directory. The problem is that install only copies the public header at this point so we need to add the others to the install targets.
2020-12-16 19:11:21 +01:00
Andrea Fontana
ef0dcaabf9 Changing JPG compression (#1463)
Since I don't think the purpose of raylib is to save space compressing image, I think it could be a good idea to keep quality from 90 to 100.
2020-12-16 19:07:18 +01:00
Ray
f5b4656801 Added additional charsPadding initialization #1432 2020-12-14 23:51:55 +01:00
Ray
5f690819e7 REVIEWED: Font struct, added charsPadding #1432 -WIP-
Not implemented usage of this variable yet but already setup for the future... some functions require review to consider it on drawing...
2020-12-14 23:47:11 +01:00
Ray
e69f2f0c26 REVIEWED: DrawGrid(), issue with buffer limits check #1417 2020-12-14 23:39:12 +01:00
Ray
d360a49f36 ADDED: UnloadFileData() / UnloadFileText() #1440 2020-12-14 20:47:58 +01:00
Ray
cd3eb3d8bd Added some security checks on GenMesh*() #1454 2020-12-14 20:41:58 +01:00
Jeffery Myers
7a0e73331d Add mesh collision function so we can check meshes directly instead of having to put them in a model. (#1459)
Make model collision function call the mesh function.
2020-12-14 19:26:32 +01:00
hristo
a840d8a77d Changed extension for web from .bc to .a (#1461)
I did this to support vcpkg expectation. When using the library from vcpkg for web you would install it using vcpkg install raylib:wasm32-emscripten but also vcpkg expects the output lib to be with .a extension instead of .bc

Doesn't make a difference for standalone builds or when raylib is used as a subdirectory dependency.
2020-12-14 19:24:56 +01:00
hristo
3ec8ac52f8 Building examples by default only if raylib is standalone. (#1460)
This change only modifies the default value. In cmake you can have raylib as a subdirectory (dependency) and when you have it as dependency you wouldn't probably want to use the example by default. You can still use the option to enable them though.
2020-12-14 19:24:20 +01:00
hristo
6e79476650 Fixed the build for web using CMake. (#1452)
* Fixed the build for web using CMake.

I found that the build for me was failing and I added some if defined checks in the core.c file where the glfwSetWindowAttrib was used. (error: implicit declaration of function 'glfwSetWindowAttrib' is invalid in C99 [-Werror,-Wimplicit-function-declaration])

I also changed some values in the toolchain file so that it correctly uses the .bat files when on windows.

* Cleaned up the additional variables (they are not important)

* Added more improvements to cmakelists

Added the option to use the system provided Emscripten toolchain to be more uniform with other libraries.

Fixed and issue which prevented example being built from cmake and also building with html extensions properly.

* Fixed ENUM to STRING because of a missed warning
2020-12-13 20:29:47 +01:00
Jeffery Myers
11ebb54674 Don't put the obj and temp files for all the projects in the same place, it causes conflicts (#1458) 2020-12-13 16:08:22 +01:00
Alexander Buhl
a798fd401f Fixed #1455 (#1456)
* Fixed #1455

Fixed writing out of array bounds
Adjusted FPS comment to match value
Deleted unused function at the end, which has never been in use in the history of this file

* Fixed #1455

Readded the function
2020-12-13 16:06:55 +01:00
Jeffery Myers
342d4faf14 Add options to set line width and aliasing to rlGL layer. (#1457)
* Add options to set line width and aliasing to rlGL layer.

* Don't do line smoothing in OpenGLES
2020-12-13 10:58:24 +01:00
Ray
e6ae4879f6 Added security check to pitch change #1450 2020-12-12 13:07:46 +01:00
Ray
459c4754dc Reviewed SetAudioBufferPitch() #1450 2020-12-12 13:01:31 +01:00
Jeffery Myers
039503e7c2 Add functions to enable/disable depth writes to go with functions for depth tests. (#1451) 2020-12-05 21:53:19 +01:00
Jeffery Myers
03df593263 Add function to get the position of a monitor (and fix some comments) (#1449) 2020-12-05 21:51:20 +01:00
Ray
62406259d7 Corrected minor windows flags issues 2020-12-03 20:33:46 +01:00
Ray
dd45d0ed64 Update VS2019 project 2020-12-03 20:22:06 +01:00
Ray
c4aee2d09a Add VS2019 project 2020-12-03 20:19:54 +01:00
Ray
7955381fb3 Update core_basic_window.c 2020-12-03 20:19:32 +01:00
Ray
7e9028ae08 Update user name 2020-12-03 20:17:50 +01:00
Ray
1c9726fd8c Update core_window_flags.c 2020-12-03 20:17:21 +01:00
Ray
d1119816d7 Review comment 2020-12-03 20:16:46 +01:00
Ray
0540f0ad32 Review window flags 2020-12-03 20:16:35 +01:00
Ray
84ab00d52e Merge branch 'master' of https://github.com/raysan5/raylib 2020-12-02 08:29:14 +01:00
Ray
63d33d7a7a Update CMakeLists.txt 2020-12-02 08:27:43 +01:00
Jeffery Myers
679a26a195 Two small quality of life changes to projects. (#1448)
1) use the latest windows SDK not a specific one.
2) use the project dir as the root for the include dir for raylib, to help if the project is ever included in some other solution.
2020-12-02 07:35:48 +01:00
Ray
60928ec82c ADDED: UnloadModelKeepMeshes() #1441 2020-12-01 23:44:10 +01:00
Ray
0481053dad Review for issue #1446 2020-12-01 23:23:30 +01:00
Ray
59be7b9c29 Update CMakeLists.txt 2020-12-01 23:21:35 +01:00
Ray
83916bd3c2 Updated GLFW to latest 3.4 (github master - 16Nov2020)
WARNING: Some CMake files not changed
WARNING: glfw_native.h contains custom changes
2020-11-30 09:11:22 +01:00
Ray
23ed67cce0 Review some config options 2020-11-30 09:00:40 +01:00
Jeffery Myers
df249f5513 Fix typecast warnings in raylib code as reported by visual studio 2019 (#1443) 2020-11-30 08:14:11 +01:00
Seth Archambault
d43268b317 Added GLFW_OPENGL_FORWARD_COMPAT for Apple Support (#1445)
Without GLFW_OPENGL_FORWARD_COMPAT, running this as a standalone will yield the error:
```
NSGL: The targeted version of macOS only supports forward-compatible core profile contexts for OpenGL 3.2 and above
```
2020-11-29 10:15:51 +01:00
Random
0322fc28d4 optimized MatrixLookAt (#1442) 2020-11-29 10:08:22 +01:00
Seth Archambault
ed0fda2b40 Added Apple Compilation Instructions (#1444)
Stumbled on this example and I love this! Adding instructions that work for me on MacOS.. Note that glfw3 will need to be statically built locally and copied to this external/libs directory on mac. I can upload my static version, but it probably makes sense to do this only if there's some general naming convention for adding platform specific folders. Like "external_osx/lib" or "external/lib_osx". Then I'll drop my static libs in there.
2020-11-29 09:53:29 +01:00
raysan5
d6f4f3ee88 REMOVED: GetImageDataNormalized()
Let the advance users manage it as they want...
2020-11-28 19:11:31 +01:00
raysan5
14c1ee2681 ADDED: UnloadFontData() 2020-11-28 19:07:41 +01:00
Ray
28213c2a20 Update CHANGELOG 2020-11-25 00:24:51 +01:00
Ray
687dd34c38 Update CHANGELOG 2020-11-25 00:14:51 +01:00
Ray
3d1ae3500c REVIEWED: Window state flags -WIP-
WARNING: Several functions removed, replaced by SetWindowState() / ClearWindowState() equivalents, only for advance users.
ADDED: ClearWindowState() to reset window state
REMOVED: HideWindow() / UnhideWindow()
REMOVED: DecorateWindow() / UndecorateWindow()
2020-11-23 23:46:05 +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
a560fe9a1e Added some comments 2020-11-22 10:56:17 +01:00
Ray
11da1714d5 Added raylib Harbour binding 2020-11-22 09:34:42 +01:00
Ray
8e48268310 Update CHANGELOG 2020-11-22 00:16:26 +01:00
Ray
bb9d734f69 Exposing some file access results to user layer #1420 2020-11-22 00:10:16 +01:00
Ray
36dc302c25 Reverted to previous working version #1434 2020-11-21 14:14:25 +01:00
Ray
9bb4d84577 Update CHANGELOG 2020-11-20 23:23:26 +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
Ray
4a7ab0ae24 Update windows.yml 2020-11-19 20:21:05 +01:00
Ray
7564097d5e Update webassembly.yml 2020-11-19 20:19:18 +01:00
Ray
7f6cd93d62 WARNING: Multiple funcs reviewed!
There were some problems about frameCount vs sampleCount that could cause some breaks.

raylib audio structs stores sampleCount = frameCount*channels.

Most libraries return framesCount instead of sampleCount.

stb_vorbis seems to refer to framesCount as samples.

All required functions have been reviewed.
2020-11-19 20:11:11 +01:00
Ray
72e51cd6de Review formating 2020-11-19 20:06:35 +01:00
Ray
700bff5fd8 Version tweak 2020-11-19 20:01:40 +01:00
Ray
9471794449 Update to latest tiniobjloader
WARNING: OBJ loading is broken at this point...
2020-11-17 00:30:12 +01:00
Ray
a54d9f734b rlUpdateTexture(): Corrected issue 2020-11-16 15:18:05 +01:00
Richard Smith
94dd2f81e9 Update BINDINGS.md for raylib-python-cffi 3.1-dev (#1433) 2020-11-16 15:17:03 +01:00
Ray
f448542dd2 Review issues with FLAC loading 2020-11-16 12:20:50 +01:00
raysan5
4d5ee7953c Updated tinyobjloader 2020-11-15 14:31:43 +01:00
raysan5
cb517d0050 Update tinyobj_loader_c.h 2020-11-15 14:19:55 +01:00
raysan5
a3d33d9222 Update tinyobj_loader_c.h 2020-11-15 14:18:59 +01:00
raysan5
82d61a5875 Updated stb_image v2.26 and stb_image_write v1.15 2020-11-15 14:11:36 +01:00
raysan5
66f9fbaa88 Update cgltf.h
v1.8
2020-11-15 14:06:39 +01:00
raysan5
321f55bce1 Update audio libraries #1423
miniaudio -> v0.10.25
dr_wav -> v0.12.14
dr_mp3 -> v0.6.19
dr_flac -> v0.12.22
2020-11-15 14:04:28 +01:00
raysan5
8ff2b387f9 Review code formating 2020-11-15 13:17:11 +01:00
Ilya3point999K
bd287efa4c Fixed zero-window upscaling (#1428)
There is no zero-check, so window upscales to nothing.
SetupFramebuffer() is kinda wrong, it uses not its params, but global variables. I won't touch it, maybe it has purpose
2020-11-15 13:13:21 +01:00
raysan5
9b2b660f91 Commented new feature 2020-11-15 13:10:12 +01:00
raysan5
55dc8171f8 [text] Consider characters padding -WIP- #1432 2020-11-15 12:39:59 +01:00
Ray
c222e231f0 Added SmallBASIC binding 2020-11-08 17:47:21 +01:00
Ray
3e1cd487df Remove trailing spaces 2020-11-03 23:47:33 +01:00
kernelkinetic
f46514b855 Fixed keyboard stuttering but for cmake only (#1422)
* fixed mouse movements are bound to the screen resolution (https://github.com/raysan5/raylib/issues/1392)

* fixed keyboard stuttering on PLATFORM_RPI and PLATFORM_DRM (https://github.com/raysan5/raylib/issues/1392)

* fixed keyboard stuttering on PLATFORM_RPI and PLATFORM_DRM (https://github.com/raysan5/raylib/issues/1392)
2020-11-03 23:39:56 +01:00
Ray
05ab39ed9f REVIEWED: SaveFileText() error checking 2020-11-01 19:42:50 +01:00
Ray
5ac9cb04c2 Reverted ChangeDirectory() redesign
It returns true on success again
2020-11-01 19:06:21 +01:00
Ray
01d9af12f7 REDESIGNED: ChangeDirectory()
Not returning error code (or success), just log if it fails
2020-11-01 18:14:55 +01:00
Ray
8e15dae5ed Review contributed examples 2020-11-01 13:39:48 +01:00
Ray
5f79ad9765 Update CHANGELOG 2020-11-01 13:38:42 +01:00
Dominus Iniquitatis
fc1fc250e7 A couple of little comment fixes (#1416) 2020-10-31 14:40:35 +01:00
Ray
8327857488 Update shaders_multi_sample2d.c 2020-10-31 11:49:19 +01:00
Ray
fbc51e822b REDESIGNED: Multiple sampler2D usage on batch system
New implementation allow enabling additional textures per batch only.
2020-10-31 11:48:44 +01:00
Ray
8a16348131 Support multiple sample2D on batch drawing #1333 2020-10-29 20:22:52 +01:00
Ray
60d874caf8 REVIEWED: GetWindowScaleDPI() #1086 2020-10-29 19:29:59 +01:00
Ray
37e2d993e7 Updated assets
Reduce size and better license CC0
2020-10-29 18:41:05 +01:00
Ray
2bcd3a6df5 Simplified example and resources sizes 2020-10-28 20:35:44 +01:00
Ray
d99ac093d4 Support additional texture units for default batch system #1333
This path requires some testing...
2020-10-26 20:13:08 +01:00
Ray
d9e591f235 Review some comments 2020-10-26 20:11:58 +01:00
raysan5
482b8a5e7e Some tweaks 2020-10-24 10:37:15 +02:00
Ray
88dbaae3be Update CHANGELOG 2020-10-21 23:32:24 +02:00
Ray
e820aae80b Added raylib 3.5 CHANGELOG -WIP- 2020-10-21 23:27:00 +02:00
Ray
f12db180cd Reviewed PR #1407 2020-10-21 11:08:37 +02:00
Chance Snow
9833fe45eb Added desktop cursor getter and setter functions (#1407)
* [core] Added desktop cursor getter and setter functions

* Example: Set mouse cursor in text input box

* Setup standard cursors _after_ GLFW window initialization

* Remove old `int GetMouseWheelMove` declaration
2020-10-21 10:55:52 +02:00
Rabia Alhaffar
eb3e9e4df5 Added version of raylib-cppsharp via used raylib license date! (#1413)
It's 2.5
@raysan5 Oh...There are 4 bindings has license date of 2016, But unsure if 1.6.0 or 1.5.0 or 1.4.0 :(

Co-authored-by: Ray <raysan5@gmail.com>
2020-10-21 00:13:39 +02:00
Rabia Alhaffar
5df08daa3f Added Boo bindings for raylib! (#1412) 2020-10-20 21:03:19 +02:00
kernelkinetic
3c9f7263e5 fixed mouse movements are bound to the screen resolution (https://github.com/raysan5/raylib/issues/1392) (#1410) 2020-10-13 22:26:40 +02:00
raysan5
fa357b8d5d Review undesired changes 2020-10-10 19:27:18 +02:00
raysan5
c62c4df749 Updated miniaudio #1402 2020-10-10 19:25:23 +02:00
chriscamacho
6ebf6b4e72 allow for multiple materials in obj files (#1408)
* allow for multiple materials in obj files also fix obj_loader hash map issues

* minor fix for warning

Co-authored-by: codifies <nospam@antispam.com>
2020-10-08 20:31:59 +02:00
Ray
41192c6d4a Replace 0.f by 0.0f 2020-10-05 20:19:18 +02:00
Doyle
b29311c7ca mouse: Return float movement for precise scrolling where possible (#1397) 2020-10-05 20:16:23 +02:00
Ray
a4ea9f872f Review "aggregate initializations" #1403 2020-10-05 20:04:33 +02:00
Daniel-Junior Dubé
a8685ee4fd Add Vector2Reflect to raymath.h (#1400)
Vector3Reflect exists but not Vector2Reflect. The code is pretty much the same.
I'm not sure what RMDEF does, but I added it to match other function definitions (haven't done much C programming, maybe I'm missing something). Can someone explain to me what it does?
2020-10-04 12:12:52 +02:00
Intasx
7e62d973f9 Add some bindings' versions (#1398)
Raylib-forever: 3.1-dev
It generates the c-to-nim bindings straight from the source.

nim-raylib: 3.1-dev
It uses Raylib-forever.

raylib-php: 3.0
Tested it using the provided binaries.

raylib-java: 2.0
Tested it using the provided binaries.
2020-10-02 08:01:21 +02:00
Tobias Jammer
0c29ca8166 Fix 1393 (#1395) 2020-09-29 17:57:28 +02:00
Ray
a850246030 Review Texture type
Texture type also maps to Texture2D and TextureCubemap
2020-09-28 00:40:32 +02:00
raysan5
446f9fff00 Added note 2020-09-27 11:14:49 +02:00
seanpringle
4bcddc3b15 [wip] rlDrawMeshInstanced (#1318)
* rlDrawMeshInstanced first attempt

* rlDrawMeshInstanced OpenGL 3.3 and VAO checks

* rlDrawMeshInstanced GetShaderAttribLocation; comments

* example instanced shader

* RLGL_STANDALONE RAYMATH_STANDALONE Vector4

* apply suggested naming changes; add instanced mesh example

* remove orphan variables
2020-09-27 10:29:05 +02: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
raysan5
c2e56f2604 REVIEW: GenTextureCubemap(), avoid using models.c functions
- DrawCube() belongs to models.c -> rl*() alternative should be used
2020-09-26 11:51:42 +02:00
raysan5
b9053eebe7 Added new GIF recording library (not used yet) 2020-09-26 11:41:49 +02:00
raysan5
eef82b04ac REVIEW: Replace rlglDraw() calls by DrawRenderBatch() internal calls 2020-09-25 18:19:19 +02:00
raysan5
fe8bf2fa55 REVIEWED: GenTextureCubemap(), use rlgl functionality only
Function has been reviewed to avoid any direct OpenGL call and use rlgl functionality, also, GenDrawCube() has been replaced by the internal batch system with DrawCube().

WARNING: rlEnableTexture() call must be issued after enabling the current framebuffer when using batch mechanism because it includes a set of security checks to avoid batch overflow and push/pop matrix operations.
2020-09-25 18:14:46 +02:00
Adam Griffiths
b9ece86ffd Add join_paths and join prefix with include/lib dirs (#1383)
Fixes #1380: incorrect usage of CMake paths which causes issues
on some more complicated environments (NixOS especially).
2020-09-25 16:20:49 +02:00
raysan5
bd512764ff REVIEW: example: models_cubicmap_pbr #1384
It does not work properly yet but it compiles correctly
2020-09-23 14:19:10 +02:00
raysan5
4a97a5c63a Update models_skybox.c 2020-09-23 14:18:15 +02:00
raysan5
032b2db398 REVIEWED: GenTextureCubemap()
Added some tracelog messages
2020-09-21 13:18:53 +02:00
André L. Alvares
59bbba19a7 update raylib-nelua repository url (#1382)
The repository is not a mirror anymore.
2020-09-20 18:46:51 +02:00
coderoth
c05dbb4581 Updated joystick mappings with latest version of gamecontrollerdb (executed GenerateMappings.cmake), so that raylib can identify more joysticks (#1381) 2020-09-19 21:51:32 +02:00
raysan5
8d41683917 REVIEWED: models_skybox example
Now supports dynamic panoramic view, just drag and drop
2020-09-19 20:42:19 +02:00
raysan5
789c5fbdf9 Updated build script to generate .a on WebAssembly
This is the recommended way
2020-09-18 20:53:57 +02:00
raysan5
4a242c2889 Updated library build script for HTML5 (emscripten 2.0.4) 2020-09-18 20:48:25 +02:00
raysan5
b5d50ee51a EXAMPLE: models_skybox works on OpenGL ES 2.0 2020-09-18 20:47:39 +02:00
raysan5
79d63e6ca1 Review comment 2020-09-18 16:44:28 +02:00
raysan5
55204dae03 Review Makefile path 2020-09-18 16:43:48 +02:00
raysan5
152665ff48 REDESIGNED: GenTexture*() #721
Functions have been redesigned to use rlgl and allow to externalize them (aka removing them from rlgl because they use custom shaders...).
2020-09-18 13:50:51 +02:00
Ray
b7867fb10d Update raylib-pas binding version
Related to commit https://github.com/tazdij/raylib-pas/pull/15
2020-09-18 12:25:22 +02:00
raysan5
ccda320be4 REVIEWED: rlFramebufferAttach() to support texture layers
Required to attach multiple color textures and multiple cubemap faces
2020-09-18 11:37:57 +02:00
kernelkinetic
6038c8fdd5 fixed wrong error message for input device on RPI (#1379)
* fixed wrong error message for input device

* error message without errnofor input device on RPI
 to prevent from including additional header

Co-authored-by: kkl <klingenberger@bfmc.de>
2020-09-18 08:52:52 +02:00
raysan5
04406c0f1a Corrected minor framebuffer issue on OpenGL ES 2.0 2020-09-18 02:14:05 +02:00
raysan5
cdc8850e68 WARNING: REDESIGN of rlgl framebuffers API #721
This redesign allows more flexibility when creating RenderTexture and a simplification (and hopefully removal) of `GenTexture*()` functions, that should not belong to this model but the user code, due to the use of custom shaders.

Also, this new API opens the door for a possible GBuffers type and advance rendering possibilities...

Some functions of the API have been also simplified or even removed.

rlgl module can be used as an standalone library, so, a version for the library has been added: v3.1.0, matching current raylib version.
2020-09-18 02:11:49 +02:00
raysan5
fa2c114636 WARNING: struct RenderTexture2D: Removed depthTexture
Not required anymore, attachment type is queried when required
2020-09-17 13:44:03 +02:00
raysan5
6da3c1e7c3 Reverted previous change 2020-09-16 16:37:31 +02:00
raysan5
cbdb9bfe42 REVIEWED: UnloadShader() issue
Avoid unloading default shader, raylib will take care of it
2020-09-16 16:33:17 +02:00
raysan5
b870b9f828 Minor: remove tabs 2020-09-16 13:17:31 +02:00
raysan5
90befff4b8 Make sure to detach data before deleting
Before deleting certain objects, they must be detached from their parents. That's the case for shader objects after linkage to shader program and also for the texture/cubemaps/renderbuffers attached to framebuffers. If objects are deleted before detached, they are kept in memory to avoid accessing deleted data.
2020-09-16 13:17:16 +02:00
raysan5
11fbd49b73 Avoid GETCWD() warning #1371 2020-09-16 11:44:48 +02:00
raysan5
43d82c1f21 Add security checks when loading data from memory 2020-09-16 11:33:56 +02:00
raysan5
c5c156d65e Review GenDrawCube() and GenDrawQuad()
Better organized and commented
2020-09-15 13:44:04 +02:00
raysan5
2d96196d25 REVIEWED: SaveWAV() to use memory write insted of file 2020-09-15 13:17:10 +02:00
raysan5
405d3fac0c Corrected issue with floor() #1377 2020-09-15 11:40:51 +02:00
raysan5
0983d7b45c Solved issues when compiled for OpenGL 1.1 2020-09-15 11:30:20 +02:00
Ray
8cf0be4b6c Review memory loading functions signesness 2020-09-14 19:20:38 +02:00
raysan5
5073619962 REVIEWED: GetTextureData(), allow retrieving 32bit float data 2020-09-14 16:03:45 +02:00
raysan5
43b9113c0c Reverted some previous changes... 2020-09-14 15:55:31 +02:00
raysan5
d7853127db Reviewed some structs to reduce size and padding
Also updated raylib Wiki about struct sizes in 32bit and 64bit
2020-09-14 15:36:50 +02:00
ArnautDaniel
ddba31d423 Add Gforth bindings and update Factor bindings (#1375) 2020-09-13 21:37:55 +02:00
Ray
c196b09d33 Remove function declaration added by error 2020-09-13 16:43:19 +02:00
Ray
db652daf42 ADDED: LoadFontFromMemory() (TTF only) #1327 2020-09-13 16:42:31 +02:00
Ray
88c5deac87 WARNING: REDESIGNED: LoadFontData() 2020-09-13 16:41:52 +02:00
Ray
250a0e3592 Minor tweak 2020-09-13 16:40:34 +02:00
Ray
63b739bbfa Corrected issue on log 2020-09-13 16:01:51 +02:00
Ray
dace2172d1 Update cgltf library to v1.7 2020-09-13 15:55:48 +02:00
Ray
5b60a743bd ADDED: LoadWaveFromMemory() #1327 2020-09-13 15:38:57 +02:00
Ray
768b29dd74 ADDED: LoadImageFromMemory() #1327 2020-09-13 15:37:15 +02:00
Ray
cb8cbb038b WARNING: RENAMED: GetExtension() to GetFileExtension() 2020-09-13 14:07:08 +02:00
raysan5
f1ed8be5d7 REDESIGNED: ColorFromHSV()
Replaced Vector3 by direct values, easier to use and understand
2020-09-07 19:33:06 +02:00
raysan5
85d5744679 REVIEW: glfwSetWindowMaximizeCallback() not available on web 2020-09-07 15:34:21 +02:00
georgjz
311aa0ab58 Added Gambit Scheme to bindings (#1369) 2020-09-05 16:25:04 +02:00
Ray
6120ec9437 Added QuickJS-raylib version 2020-09-02 12:42:35 +02:00
Ray
4bc918fb9f Added some more versions to bindings 2020-09-02 11:27:59 +02:00
Rabia Alhaffar
17b01e3b7a Added more versions info! (#1366)
Co-authored-by: Ray <raysan5@gmail.com>
2020-09-02 11:03:54 +02:00
Rob Loach
900a28c165 Add versions for various bindings (#1365)
- raylib-cpp
- raylib-lua-sol
- node-raylib
- raylib-js
- raylib-chaiscript
- raylib-squirrel

Co-authored-by: Ray <raysan5@gmail.com>
2020-09-02 11:02:54 +02:00
Rabia Alhaffar
9781e1ca8f Update BINDINGS.md (#1364) 2020-09-02 00:02:50 +02:00
Ray
796f61d447 Added some versions... PLEASE HELP! 2020-09-01 23:31:12 +02:00
Ray
76ceb1daaa Added go-raylib binding and some versions 2020-09-01 23:27:27 +02:00
Ray
ed6d27f495 Add langauge links and version field (to be filled) 2020-09-01 23:17:46 +02:00
raysan5
1134024985 Update rlgl.h 2020-09-01 21:27:47 +02:00
raysan5
05cdaf7d01 MOVED: rlUnproject() [rlgl] -> Vector3Unproject() [raymath] 2020-09-01 21:08:45 +02:00
raysan5
a1422ba1c1 Review custom blend modes mechanism
rlBlendMode() has been added to rlgl to be used on BLEND_CUSTOM. This functionality is exposed to advance users.

In any case, new blending modes could be added if required.
2020-09-01 21:02:19 +02:00
cedemax
bfafb80cde Multiple blendmodes (#1324)
Co-authored-by: max <max.cedercreutz@cetopo.com>
2020-09-01 20:33:49 +02:00
Juan Medina
dcbe481a28 adding new windows functions (#1357) 2020-09-01 20:29:13 +02:00
Ray
e4d891fa37 Added some missing bindings 2020-08-31 18:54:04 +02:00
raysan5
ffe2364334 Update miniaudio to version 0.10.18 2020-08-30 20:01:38 +02:00
raysan5
8b5485f822 Remove unused variable 2020-08-30 20:00:56 +02:00
smaludzi
8d615a99f6 Added Never language to the list of bindings. (#1361) 2020-08-30 19:58:30 +02:00
Ray
103df6c408 Added raylib-ocaml 2020-08-29 18:42:40 +02:00
raysan5
945a02798b DrawTextEx(): Minor tweak 2020-08-29 13:57:59 +02:00
Ray
9da0656c2f Update CI badges links 2020-08-23 21:21:31 +02:00
raysan5
d0ebeb1713 Reorder some functions 2020-08-23 21:18:39 +02:00
raysan5
ea832628c4 Review last PR formatting to follow raylib standards 2020-08-23 21:10:59 +02:00
chriscamacho
d140dc81c0 work on quat and matrix math - deleted multiple copies of raymath.h causing issues (#1359)
Co-authored-by: codifies <nospam@antispam.com>
2020-08-23 21:01:26 +02:00
raysan5
816856eb75 Corrected compiling issue
When using USE_PTHREADS=1 on libraylib.bc compilation, program requires --shared-memory passed to the linker and despite it compiles, it fails on execution (at least for me).
2020-08-23 21:01:10 +02:00
Ray
c101f916fa Update README.md 2020-08-21 14:03:13 +02:00
Ray
94f32848b8 Update README.md 2020-08-21 14:02:27 +02:00
Ray
606a69ded7 Remove Android and HTML5 builds 2020-08-21 13:53:44 +02:00
Ray
f688ec6b51 Update webassembly.yml 2020-08-21 13:16:46 +02:00
Ray
89cf02ba56 Update macos.yml 2020-08-21 13:16:40 +02:00
Ray
b22a4ecdf9 Update windows.yml 2020-08-21 13:16:35 +02:00
Ray
a33111ae9d Update linux.yml 2020-08-21 13:16:32 +02:00
Ray
6b5f68af5e Update android.yml 2020-08-21 13:16:30 +02:00
Ray
336c6b7055 Update webassembly.yml 2020-08-21 13:03:15 +02:00
Ray
2d8e8a3b84 Update webassembly.yml 2020-08-21 12:53:04 +02:00
Ray
890ea77246 Update webassembly.yml 2020-08-21 12:48:59 +02:00
Ray
7bb92972d1 Update windows.yml 2020-08-20 20:53:32 +02:00
Ray
58ab0e462e Update windows.yml 2020-08-20 20:51:55 +02:00
raysan5
e785ca73b5 Review compilation parameter for objective C code on GLFW 2020-08-20 19:37:03 +02:00
raysan5
06ff1ce2aa Minor tweak for consistency 2020-08-20 19:31:54 +02:00
Ray
c1585dda02 Update linux.yml 2020-08-20 19:30:05 +02:00
Ray
b5f508c336 Update windows.yml 2020-08-20 19:23:42 +02:00
Ray
801e255a36 Update linux.yml 2020-08-20 19:21:51 +02:00
Ray
01563c2d48 Update windows.yml 2020-08-20 19:18:23 +02:00
Ray
58d452c78d Update linux.yml 2020-08-20 19:13:59 +02:00
Ray
c500b9c036 Update windows.yml 2020-08-20 19:10:38 +02:00
Ray
5ec0f68937 Update linux.yml 2020-08-20 19:05:17 +02:00
Ray
5c755d4afd Update windows.yml 2020-08-20 19:00:21 +02:00
Ray
74637ef884 Update linux.yml 2020-08-20 18:57:05 +02:00
Ray
3c85cea36e Remove AppVeyor badge 2020-08-20 18:54:51 +02:00
Ray
f5a6397a57 AppVeyor replaced by GitHub Actions 2020-08-20 18:51:41 +02:00
Ray
f6aa8f7c6d Update linux.yml 2020-08-20 18:50:23 +02:00
Ray
418e6f3e18 Update linux.yml 2020-08-20 18:44:21 +02:00
Ray
a55786c994 Update linux.yml 2020-08-20 18:37:38 +02:00
Ray
145803092b Update windows.yml 2020-08-20 18:34:22 +02:00
Ray
7d2243ea92 Update linux.yml 2020-08-20 18:31:16 +02:00
Ray
e54ed5fc58 Update windows.yml 2020-08-20 18:28:56 +02:00
Ray
00b7f08ca9 Update windows.yml 2020-08-20 18:23:37 +02:00
Ray
23ca58175e Update linux.yml 2020-08-20 18:22:43 +02:00
Ray
ed22e2f4a4 Update windows.yml 2020-08-20 18:17:14 +02:00
Ray
85aee79050 Update windows.yml 2020-08-20 18:12:50 +02:00
Ray
10c294a021 Update linux.yml 2020-08-20 18:11:44 +02:00
Ray
eedea1d2de Update windows.yml 2020-08-20 18:00:14 +02:00
Ray
784b24e35e Update linux.yml 2020-08-20 17:45:28 +02:00
Ray
7737085c1b Update windows.yml 2020-08-20 17:41:08 +02:00
raysan5
3490e0c1b4 Removed unneded PNG chunks 2020-08-20 17:40:28 +02:00
raysan5
45b28b9d3d Merge branch 'master' of https://github.com/raysan5/raylib 2020-08-20 17:37:20 +02:00
raysan5
b499b50154 Avoid architecture selection on gcc, use correct gcc version instead
Review raylib resource file for DLL compilation
2020-08-20 17:37:01 +02:00
Ray
c47fb0a463 Update windows.yml 2020-08-20 12:38:56 +02:00
Ray
d6a566da06 Update windows.yml 2020-08-20 12:34:10 +02:00
Ray
aa6c3c869d Update windows.yml 2020-08-20 12:28:32 +02:00
Ray
d43514a44d Update windows.yml 2020-08-20 12:21:38 +02:00
Ray
600d7b524d Update windows.yml 2020-08-20 12:16:03 +02:00
Ray
cb5e4f9b44 Update windows.yml 2020-08-20 12:09:43 +02:00
Ray
ec768bb83e Update windows.yml 2020-08-20 12:07:13 +02:00
Ray
9d74f27abd Update webassembly.yml 2020-08-20 12:03:07 +02:00
Ray
4f55d833d3 Update webassembly.yml 2020-08-20 00:23:55 +02:00
Ray
2d86705314 Update webassembly.yml 2020-08-20 00:13:15 +02:00
Ray
3352d54554 Update webassembly.yml 2020-08-20 00:10:52 +02:00
Ray
5876825bcd Update webassembly.yml 2020-08-20 00:05:23 +02:00
Ray
864ff48e11 Update linux.yml 2020-08-19 23:16:18 +02:00
Ray
9c00b1338c Update windows.yml 2020-08-19 23:13:48 +02:00
Ray
d64d017c1c Update android.yml 2020-08-19 20:06:34 +02:00
Ray
a91962b1de Update macos.yml 2020-08-19 19:55:11 +02:00
Ray
73d401b8d7 Update macos.yml 2020-08-19 19:50:47 +02:00
Ray
73c81455df Update macos.yml 2020-08-19 19:40:38 +02:00
Ray
2e50485a54 Update macos.yml 2020-08-19 19:30:35 +02:00
Ray
c577e7310c Update macos.yml 2020-08-19 19:27:16 +02:00
Ray
771ea1f9e0 Update macos.yml 2020-08-19 19:23:18 +02:00
Ray
18f98987be Update macos.yml 2020-08-19 19:12:17 +02:00
raysan5
249708dbb8 Support externally provided library name
It can be useful in some cases qhen compiling for multiple architectures
2020-08-19 19:11:18 +02:00
Ray
78f78e69ba Update android.yml 2020-08-19 18:48:44 +02:00
Ray
c119908c15 Update macos.yml 2020-08-19 18:48:16 +02:00
Ray
3178992889 Update linux.yml 2020-08-19 18:47:58 +02:00
Ray
f16b9267de Update webassembly.yml 2020-08-19 18:46:39 +02:00
Ray
c345a9a356 Update webassembly.yml 2020-08-19 18:08:09 +02:00
Ray
9d50f23f80 Update webassembly.yml 2020-08-19 18:04:03 +02:00
Ray
052c821102 Update webassembly.yml 2020-08-19 18:02:35 +02:00
Ray
59277566e3 Update webassembly.yml 2020-08-19 17:54:52 +02:00
Ray
14e12db675 Update android.yml 2020-08-19 17:39:43 +02:00
Ray
b0708c43bf Update README.md 2020-08-19 17:38:07 +02:00
Ray
7471eb11a7 Create webassembly.yml 2020-08-19 17:37:21 +02:00
Ray
f52c5cb9b5 Update windows.yml 2020-08-19 17:22:55 +02:00
Ray
1d6d58ef5b Update linux.yml 2020-08-19 17:22:15 +02:00
Ray
dfb1460236 Update macos.yml 2020-08-19 17:20:44 +02:00
Ray
33002a9e91 Update README.md 2020-08-19 17:07:29 +02:00
Ray
fdc875a579 Update android.yml 2020-08-19 16:52:11 +02:00
raysan5
1e9de0f9ff Review Android arch names to lowercase 2020-08-19 16:51:43 +02:00
Ray
ba547648df Update android.yml 2020-08-19 16:43:12 +02:00
raysan5
44dd1fc7f5 Trying to configure android_native_app_glue target compilation 2020-08-19 16:30:33 +02:00
raysan5
48f0dfa18e Update Makefile 2020-08-19 16:25:51 +02:00
raysan5
ac0362d30e Update Makefile 2020-08-19 16:17:27 +02:00
raysan5
687187b5cf Merge branch 'master' of https://github.com/raysan5/raylib 2020-08-19 16:13:28 +02:00
raysan5
34c8f4c39c Update Makefile 2020-08-19 16:13:16 +02:00
Ray
1bea69001c Update android.yml 2020-08-19 15:58:52 +02:00
Ray
4d627a29ad Update android.yml 2020-08-19 15:54:06 +02:00
Ray
467ef87a76 Update android.yml 2020-08-19 15:50:32 +02:00
Ray
2217b93f30 Update android.yml 2020-08-19 15:47:54 +02:00
raysan5
cc8626f6bb Update Makefile 2020-08-19 15:47:36 +02:00
Ray
0c76431efb Update android.yml 2020-08-19 15:37:49 +02:00
Ray
028a86cc53 Update android.yml 2020-08-19 15:34:19 +02:00
Ray
f7d37292a6 Update android.yml 2020-08-19 15:31:21 +02:00
Ray
97a40e6140 Update android.yml 2020-08-19 15:29:03 +02:00
Ray
5df73fe627 Update android.yml 2020-08-19 15:22:38 +02:00
raysan5
6760338eb0 Merge branch 'master' of https://github.com/raysan5/raylib 2020-08-19 15:21:34 +02:00
raysan5
1316183b3a Trying to automate Android building... 2020-08-19 15:21:20 +02:00
Ray
606f4ea47c Update android.yml 2020-08-19 15:14:22 +02:00
Ray
39e267c029 Create android.yml 2020-08-19 14:05:13 +02:00
raysan5
3416858d1c Update Makefile 2020-08-19 14:04:53 +02:00
raysan5
0d05004468 Added resource file for DLL compilation info 2020-08-19 11:59:50 +02:00
Ray
391a23ad84 Update README.md 2020-08-19 11:37:14 +02:00
raysan5
d98c471883 Add LDFLAGS when required 2020-08-19 11:25:13 +02:00
Ray
903b7b5213 Update README.md 2020-08-19 11:13:33 +02:00
Ray
71bd9f04fe Update macos.yml 2020-08-19 10:43:48 +02:00
Ray
5427e08c18 Update macos.yml 2020-08-19 10:39:57 +02:00
raysan5
05b3ca0a83 Update Makefile 2020-08-19 10:38:53 +02:00
Ray
721f015e07 Update linux.yml 2020-08-19 10:36:25 +02:00
Ray
d875ea4d24 Update macos.yml 2020-08-19 10:35:05 +02:00
Ray
0fc897e82f Update macos.yml 2020-08-19 10:32:56 +02:00
raysan5
d90767ad83 Delete ci_src_examples_win.yml.disabled 2020-08-19 10:04:17 +02:00
raysan5
861fd68bda Delete cd_src_release.yml.disabled 2020-08-19 10:03:00 +02:00
Ray
9436b63f5f Update macos.yml 2020-08-19 10:00:19 +02:00
Ray
f3091185ca Update linux.yml 2020-08-18 15:24:20 +02:00
Ray
279182ca14 Update linux.yml 2020-08-18 15:21:42 +02:00
Ray
db8927f6b1 Update linux.yml 2020-08-18 15:17:10 +02:00
Ray
0d0c3d2504 Update linux.yml 2020-08-18 15:05:32 +02:00
Ray
a142e7c3d0 Update linux.yml 2020-08-18 14:45:17 +02:00
Ray
96e4f369bd Update linux.yml 2020-08-18 14:17:11 +02:00
Ray
b6bd00ebff Update macos.yml 2020-08-18 14:12:55 +02:00
Ray
0f5b01eb73 Update windows.yml 2020-08-18 14:07:55 +02:00
Ray
6c9e6cb097 Update linux.yml 2020-08-18 14:03:05 +02:00
Ray
a29f0695ef Update linux.yml 2020-08-18 13:53:40 +02:00
Ray
3d24dbc7b4 Update windows.yml 2020-08-18 13:51:25 +02:00
Ray
2a198651de Update linux.yml 2020-08-18 13:40:11 +02:00
Ray
eb656a1982 Update windows.yml 2020-08-18 13:24:46 +02:00
Ray
53f3103a93 Update linux.yml 2020-08-18 13:20:48 +02:00
Ray
c1ee4c3e7e Update windows.yml 2020-08-18 13:11:32 +02:00
Ray
3fb0fa673a Update windows.yml 2020-08-18 13:00:59 +02:00
Ray
5552323553 Update windows.yml 2020-08-18 00:52:02 +02:00
Ray
122f86b4c5 Update windows.yml 2020-08-18 00:39:57 +02:00
Ray
45dad5d903 Update windows.yml 2020-08-18 00:37:19 +02:00
Ray
b6e0766d86 Update windows.yml 2020-08-18 00:35:29 +02:00
Ray
28917c0d14 Update windows.yml 2020-08-18 00:31:50 +02:00
Ray
0b366ec4b6 Update windows.yml 2020-08-18 00:24:53 +02:00
Ray
337068dad0 Update windows.yml 2020-08-18 00:23:40 +02:00
Ray
e41ba55036 Update windows.yml 2020-08-18 00:15:33 +02:00
Ray
84103ae936 Update windows.yml 2020-08-17 23:41:17 +02:00
Ray
9ef1ef93e7 Update windows.yml 2020-08-17 23:26:28 +02:00
raysan5
ab8ec9adad Support multiple build architectures (x86, x64) 2020-08-17 23:23:42 +02:00
Ray
8af787cabc Update windows.yml 2020-08-17 23:01:17 +02:00
Ray
d64f5ee02a Update windows.yml 2020-08-17 22:53:44 +02:00
Ray
6f98c0c9b6 Update windows.yml 2020-08-17 22:49:03 +02:00
Ray
eb8cf7e4d2 Update windows.yml 2020-08-17 22:48:12 +02:00
Ray
5f78b78489 Update windows.yml 2020-08-17 22:42:34 +02:00
raysan5
5c097b26d4 Merge branch 'master' of https://github.com/raysan5/raylib 2020-08-17 22:41:38 +02:00
raysan5
090490389e Improved Makefile clean on Windows 2020-08-17 22:41:26 +02:00
Ray
cd1b71b3f9 Update windows.yml 2020-08-17 22:27:44 +02:00
raysan5
921f0c02e2 Update Makefile 2020-08-17 22:27:22 +02:00
Ray
f618c41061 Update windows.yml 2020-08-17 21:54:39 +02:00
Ray
38d4768cdd Update windows.yml 2020-08-17 21:42:37 +02:00
Ray
f86126aaea Update windows.yml 2020-08-17 21:25:16 +02:00
Ray
e7f507c204 Update windows.yml 2020-08-17 21:20:02 +02:00
Ray
c6ddaaf953 Update windows.yml 2020-08-17 21:10:34 +02:00
Ray
ebeee7ebed Update windows.yml 2020-08-17 21:07:03 +02:00
Ray
6df0f2c535 Update linux.yml 2020-08-17 21:05:42 +02:00
Ray
1d9cdc1d83 Update macos.yml 2020-08-17 21:04:58 +02:00
Ray
be6e1e7c06 Update macos.yml 2020-08-17 21:04:20 +02:00
Ray
6f012d44d4 Update linux.yml 2020-08-17 21:03:58 +02:00
Ray
ceea5cb99b Update and rename ci_src_examples_linux.yml to linux.yml 2020-08-17 21:02:56 +02:00
Ray
62302b1f71 Update and rename ci_src_examples_macos.yml to macos.yml 2020-08-17 20:54:10 +02:00
Ray
18aef2f781 Rename ci_src_examples_win.yml to ci_src_examples_win.yml.disabled 2020-08-17 20:49:04 +02:00
Ray
4fd227527e Rename cd_src_release.yml to cd_src_release.yml.disabled 2020-08-17 20:48:44 +02:00
Ray
2dd4ab9535 Update windows.yml 2020-08-17 20:47:58 +02:00
Ray
a96b2b5b0d Update windows.yml 2020-08-17 20:46:25 +02:00
Ray
e3709a9754 Create windows.yml 2020-08-17 20:40:17 +02:00
raysan5
2d0811d94c Update Makefile 2020-08-17 20:38:06 +02:00
raysan5
c32ae480af RENAMED: FormatText() -> TextFormat()
This function was renamed for consistency in raylib 3.0, just unified all examples to use TextFormat() instead of FormatText()
2020-08-16 11:28:15 +02:00
raysan5
26f6a64a39 NEW EXAMPLE: shaders_hot_reloading #1198 2020-08-16 11:18:25 +02:00
raysan5
ebdeab7e25 Code reorganization on example 2020-08-16 11:17:33 +02:00
Ray
7b346dbbe1 Review issue with .fnt -> .png path #1351
When .fnt file is in the .exe path, image path was wrongly calculated
2020-08-15 11:32:23 +02:00
Ray
902a97f540 Update BINDINGS.md 2020-08-15 11:00:32 +02:00
Ray
53b17765f4 Added raylib-luajit 2020-08-13 10:53:09 +02:00
Gaëtan Blaise-Cazalet
810f51b3e7 Change raylib version for VSCode mingw project makefile (#1347) 2020-08-12 15:04:17 +02:00
raysan5
ad1b3330b7 Support mulstiple WAV sampleSize for MusicStream #1340
24bit per sample is not supported internally and automatically converted 16bit
2020-08-11 19:08:07 +02:00
Henrique de Lima
702341ae6e Making the windows build script a bit faster by verifying if the msvc environment was set up previously and only setting it up if it wasn't (#1346) 2020-08-10 21:08:51 +02:00
Ray
959d0d2591 Review Makefiles for WEB compilation 2020-08-08 14:08:56 +02:00
Ahmad Fatoum
1841a6bd3b CMake: allow spaces in CMAKE_INSTALL_PREFIX
We use @CMAKE_INSTALL_PREFIX@ in the pkg-config template, but the way we
use it breaks when used with a path containing a space. Use quote to fix
this. This now means, we probably can't have quotes, but that's of
lesser concern.
2020-08-08 01:11:45 +02:00
Ahmad Fatoum
6108ba89df CMake: don't use raylib_static name for MinGW on Windows
There are no *.lib files that could overwrite each other when building
both static and shared versions of raylib at once. So just use the
normal library name without _static suffix.
2020-08-08 01:11:45 +02:00
raysan5
2c7dc70878 Reset close status for next frame #1339 2020-08-06 11:47:46 +02:00
Ray
2d866d5118 Added raylib-jai 2020-08-05 12:19:13 +02:00
Rfaile313
9e75f870bb Update Makefile for web (#1332)
When you install emsdk out of the box, the directory is no longer `$(EMSDK_PATH)/python/33.7.4_64bit` but rather `$(EMSDK_PATH)/python/3.7.4-pywin32_64bit` noting the `3.7.4-pywin32_64bit` change on the last file.

Thus, without adjusting this in the raylib Makefile it will throw an error:

```
PS C:\raylib\raylib\src> make PLATFORM=PLATFORM_WEB -B                                                                  emcc -c core.c -Wall -D_DEFAULT_SOURCE -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing -std=gnu99 -Os -s USE_GLFW=3 -I. -Iexternal/glfw/include -Iexternal/glfw/deps/mingw -DPLATFORM_WEB -DGRAPHICS_API_OPENGL_ES2              '"python"' is not recognized as an internal or external command,                                                        operable program or batch file.  
```

However, changing this line in the Makefile compiles raylib for web as expected

`"raylib library generated (libraylib.bc)!"`
2020-08-02 20:21:59 +02:00
raysan5
168948d91d Update raudio_standalone.c 2020-07-31 12:31:40 +02:00
raysan5
7eb6cb470b Update raudio_standalone.c 2020-07-31 12:13:10 +02:00
raysan5
6e9e7bd6bc LoadSound(): Use memory loading (WAV, OGG, MP3, FLAC) #1312 2020-07-31 12:13:04 +02:00
Adrie
3c095f9d34 Fix color of ambient light (#1330) 2020-07-30 12:51:58 +02:00
seanpringle
1d895616f7 rlCheckErrors (#1321)
* rlglCheckErrors

* rlglCheckErrors LOG_WARNING

* rename to rlCheckErrors; improve messages; revert core.c
2020-07-30 12:50:20 +02:00
raysan5
9c2ff464b0 Support pthreads on PLATFORM_WEB compilation 2020-07-28 20:36:10 +02:00
raysan5
20301d1e5d Corrected issue with framebuffer size storage #1298 2020-07-28 11:44:45 +02:00
raysan5
488c60d139 Small shader fix on vec3 initialization #1298 2020-07-28 11:27:05 +02:00
Ray
b5eb104b08 Consider empty title for window #1323 2020-07-24 18:20:37 +02:00
Ray
14d37464ad DrawTriangleFan(): Add a comment about vertex order #1316 2020-07-22 11:12:04 +02:00
seanpringle
cebcdea80f [wip] MeshNormalsSmooth() (#1317)
* MeshSmoothNormals() by average

* wrong comment

* spelling

* use correct function naming convention
2020-07-20 11:05:18 +02:00
raysan5
6ec847a93f Find a better mechanism to avoid FBO on OpenGL 2.1 if required #1290 2020-07-17 19:41:38 +02:00
raysan5
feedf332a8 Issue with render size assignment on RPI/Android #1314 2020-07-17 18:39:31 +02:00
raysan5
642f42bb4f Reviewed comment in LoadIQM() #1315 2020-07-17 18:22:09 +02:00
seanpringle
bdd253a66a clamp ray hit y position to ground plane height (#1311) 2020-07-15 11:13:03 +02:00
Random
7760575d3f fix emcc warning (-Wparentheses-equality) (#1310) 2020-07-14 21:25:21 +02:00
raysan5
6fb5207694 Update resources LICENSE 2020-07-14 19:17:08 +02:00
raysan5
67acb0f840 Update audio resources LICENSE 2020-07-14 19:11:09 +02:00
raysan5
dd5f448f25 Update Makefile Android 2020-07-14 19:09:58 +02:00
raysan5
0b52c57a24 Update Makefile emsdk paths 2020-07-14 19:07:51 +02:00
raysan5
d2d50bc60f Update miniaudio to v0.10.14 2020-07-14 18:59:00 +02:00
seanpringle
a9d676a5fd scale perspective top calc for near culing plane (#1309) 2020-07-14 10:36:22 +02:00
raysan5
bf429a0058 Remove conditional __EMSCRIPTEN__
Not required anymore
2020-07-13 18:57:46 +02:00
Random
4de362b405 Updated miniaudio to v0.10.13, fixes emscripten compilation error (#1306) 2020-07-13 18:56:17 +02:00
raysan5
0db0e6acd8 WARNING: REMOVED: LoadImageEx()
Reason for removal: This function forces a specific Image data format, it copies data internally (it could be confusing and lead to memory leaks), it's redundant, there is a simpler alternative and raylib promotes using structures directly
2020-07-10 19:18:29 +02:00
raysan5
7199dd570f REVIEW: Pointer lock emscripten API does not work #1241
It seems some internals change recently due to web security reasons and some emscripten HTML5 funtionalities like pointerLock or fullscreen modes behave very weird or just don't work as expected
2020-07-10 18:23:17 +02:00
raysan5
3f4c6fee11 Correct issue when not supporting GIF format 2020-07-10 17:24:37 +02:00
raysan5
c57323f29c ADDED: LoadImageAnim() to load animated sequence of images 2020-07-10 13:59:01 +02:00
raysan5
fa7799143e Update miniaudio to v0.10.12, solves #1288 2020-07-10 13:29:42 +02:00
raysan5
57dc8a91dd Disable FBO support on OpenGL 2.1 #1290 2020-07-10 13:14:56 +02:00
Random
86a8f1d5d5 Chromium needs a larger audio buffer (#1300)
* Chromium needs a larger audio buffer: https://github.com/dr-soft/miniaudio/issues/150

* changed PLATFORM_WEB to __EMSCRIPTEN__
2020-07-10 12:34:35 +02:00
raysan5
b4ff6fdde3 Review skybox shaders 2020-07-10 12:20:57 +02:00
raysan5
956f61cf14 Merge branch 'master' of https://github.com/raysan5/raylib 2020-07-10 12:20:40 +02:00
raysan5
0877019fb6 Review comment 2020-07-10 12:15:52 +02:00
Daniel Jour
2d4956feeb Fix format-security error in rlgl_standalone.c (#1305)
See #1304
2020-07-10 11:17:46 +02:00
Terry Nguyen
871cd1a76a Free leaked allocations from render objects (#1302) 2020-07-09 20:42:20 +02:00
Doyle
00fda3be65 Fix incorrect color transform to 255 space (#1297) 2020-07-05 20:02:32 +02:00
Ray
6832da5aa7 Update SPONSORS.md 2020-07-04 11:49:54 +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
Ray
00557df17f Update SPONSORS.md 2020-06-29 21:15:27 +02:00
Vlad Adrian
4d71e9b44f Added new function DrawTextureTiled() (#1291)
* Implemented DrawTextureTiled()

* Example added
2020-06-27 23:59:14 +02:00
Ray
eae6e6a828 Minor format tweak 2020-06-27 14:11:21 +02:00
Ray
5b294b7cff Corrected issue with OpenGL 1.1 support 2020-06-27 14:10:53 +02:00
Ray
03846342bb Update SPONSORS.md 2020-06-25 16:50:51 +02:00
Ray
ba39a1b304 ADDED: UpdateTextureRec() 2020-06-25 16:26:59 +02:00
Shylie
25fb24ba7d [add] GetMonitorRefreshRate(int monitor); (#1289) 2020-06-24 18:28:57 +02:00
Ray
be80708d41 REVIEWED: textures_raw_data #1286 2020-06-23 01:06:05 +02:00
Ray
38530ebf12 REVIEWED: ToggleFullscreen(), issue #1287 2020-06-23 00:39:06 +02:00
Ray
bd13d4a471 Add missing include 2020-06-23 00:33:51 +02:00
raysan5
e18c4c1158 REVIEWED: ColorAlphaBlend(), support tint color 2020-06-20 23:32:32 +02:00
Reece Mackie
6b94ce2204 [UWP] Fix time query precision (#1284) 2020-06-20 21:13:32 +02:00
raysan5
7ed7116e27 REVIEWED: ColorAlphaBlend(), integers-version, optimized #1218 2020-06-20 19:57:09 +02:00
raysan5
5a862bce29 REVIEWED: ImageDraw(), consider negative source offset properly #1283 2020-06-20 18:49:15 +02:00
raysan5
da582e2eec REVIEWED: ImageDraw() #1283 2020-06-20 18:10:21 +02:00
peppemas
0e26d514b8 Fix bug #1270 (#1282)
* Fix bug #1270

Added an argument to the shader in order to flip the texture

* Fix Bug #1270

* Fix bug #1270
2020-06-20 17:55:56 +02:00
Ray
c833644a0e Update SPONSORS.md 2020-06-19 13:42:23 +02:00
raysan5
c078640fa5 Commented Fade() macro 2020-06-16 10:37:31 +02:00
raysan5
afcc584fb6 RE-ADDED: Fade() function to avoid multiple breaking changes
Probably there is a better way to do this but this is a temporary solution for backward compatibility
2020-06-16 10:36:05 +02:00
raysan5
589d606000 REDESIGNED: ImageDraw(), optimized #1218
After multiple tests and lot of redesign, current implementation is the fastest one. It also considers several fast-paths for maximum speed!
2020-06-15 12:06:41 +02:00
raysan5
32c0a7a135 Small code optimization 2020-06-15 12:05:03 +02:00
raysan5
bfa6544030 REDESIGNED: ImageResize(), optimized #1218 2020-06-15 12:04:18 +02:00
raysan5
691c1f9391 REDESIGNED: ImageFromImage(), optimized #1218 2020-06-15 12:03:33 +02:00
raysan5
ad954dc7ab WARNING: BIG CHANGE: Move Color functions to texture module
WARNING: Some functions ADDED and some RENAMED:
- RENAMED: Fade() -> ColorAlpha() [Added #define for compatibility]
- ADDED: ColorAlphaBlend()
- ADDED: GetPixelColor()
- ADDED: SetPixelColor()
2020-06-15 12:02:50 +02:00
raysan5
ec09fea29a REDESIGNED: ImageDraw(), optimization #1218
Trying a new optimization approach, some additional functions added, they will be probably exposed soon.
2020-06-11 22:47:25 +02:00
raysan5
15bfe44e73 REVIEWED: ImageDraw(), optimizations test #1218
Despite all the effort put on function optimization, dealing with alpha blending is complex, considering src and dst could have different pixel format...
2020-06-11 12:47:47 +02:00
raysan5
a6e6a99cb6 REDESIGNED: ImageAlphaClear(), optimized #1218 2020-06-10 23:10:16 +02:00
raysan5
4745ebeed5 REVIEWED: ImageResizeCanvas(), optimization #1218
Optimized to avoid ImageCrop() calls, now we define the source image rectangle and we just copy that data over the new canvas.
2020-06-10 21:21:37 +02:00
raysan5
dea0279a74 REVIEWED: ExportImage(), optimized 2020-06-09 19:52:10 +02:00
raysan5
7ef0fb4192 REVERTED: ExportImage() changes
Always using RGBA for now.
2020-06-08 21:18:42 +02:00
raysan5
82f7dd017e REVIEWED: ImageAlphaPremultiply(), optimization 2020-06-08 18:24:53 +02:00
raysan5
40bc6afdbd REVIEWED: ImageAlphaClear(), minor optimization 2020-06-08 18:23:59 +02:00
Chang Si Yuan
6264c4901b Fix wrong height used when using scissor mode with render texture of different height from window (#1272) 2020-06-08 10:32:23 +02:00
Chang Si Yuan
73cc33b493 Fix extra memory allocated when updating color buffer in mesh (#1271) 2020-06-08 10:31:39 +02:00
raysan5
87592e2625 Update textures.c 2020-06-07 20:32:43 +02:00
raysan5
d0e9228660 REDESIGNED: ImageResizeCanvas(), optimized #1218 2020-06-07 18:33:30 +02:00
raysan5
a9fb0aa207 ImageToPOT() renamed parameter 2020-06-07 18:32:20 +02:00
raysan5
b5174a9990 REVIEWED: ImageCrop() #1218
Further optimization, moving data line-by-line
Old optimization left for reference
2020-06-07 12:57:57 +02:00
raysan5
b7d53ce314 REVIEWED: ImageToPOT() #1218
Using ImageResizeCanvas()
2020-06-07 12:56:47 +02:00
raysan5
78c3d619f9 REVIEWED: ImageAlphaCrop() #1218
Now uses GetImageAlphaBorder()
2020-06-07 12:33:42 +02:00
raysan5
02ff68e1a3 REDESIGNED: ImageCrop(), optimized #1218 2020-06-07 12:16:27 +02:00
raysan5
7cf1e76d53 REVIEWED: ExportImage(), optimized #1218
Avoid GetImageData() retrieval and free
2020-06-07 11:57:22 +02:00
raysan5
776e4a37ef REDESIGNED: ImageRotateCCW(), optimized #1218 2020-06-07 11:53:13 +02:00
raysan5
79e2fbe0c6 REDESIGNED: ImageRotateCW(), optimized #1218 2020-06-07 11:52:55 +02:00
raysan5
d278eae4a3 REDESIGNED: ImageFlipHorizontal(), optimized #1218
Added several optimized options for future reference (if required)
2020-06-07 11:52:21 +02:00
raysan5
93d6dd3023 REDESIGNED: ImageFlipVertical(), optimized #1218 2020-06-07 11:51:26 +02:00
raysan5
5d0b2c796e Remove warning from GetDirectoryPath() 2020-06-07 11:50:03 +02:00
raysan5
992fefa823 Merge branch 'master' of https://github.com/raysan5/raylib 2020-06-07 11:49:24 +02:00
raysan5
0fda4b1183 Update raysan.png 2020-06-07 11:49:10 +02:00
frithrah
e07512e213 Fixed buffer overflow in GenMeshPoly (#1269)
Co-authored-by: frithrah <simon@frithrah.com>
2020-06-05 19:13:31 +02:00
raysan5
00af1c0607 Update explosion.png 2020-06-03 01:30:07 +02:00
raysan5
9ce838806b [examples] Review/change audio resources 2020-06-03 01:29:24 +02:00
raysan5
6b9e49e965 [example] Update textures_sprite_explosion 2020-06-03 00:07:13 +02:00
raysan5
5867a63068 Update textures_sprite_button.png 2020-06-03 00:06:52 +02:00
raysan5
d8e079dad3 [example] Update textures_particles_blending 2020-06-03 00:06:47 +02:00
raysan5
3792951023 REVIEWED: GetPixelDataSize() to consider compressed data properly 2020-06-02 23:08:34 +02:00
raysan5
a4333035c7 Use TRACELOG() macro instead of TraceLog() function 2020-06-02 23:07:42 +02:00
raysan5
b00ab118c6 [examples] text_font_sdf - Corrected bug 2020-06-02 23:07:11 +02:00
raysan5
8a501ef06d Review some png images 2020-06-02 12:58:46 +02:00
raysan5
82fca43406 Replaced some resources for better licensing
Some resources used in examples have not a clear license, so, I'm replacing some of them for clearly licensed versions or resources created by me under CC0. License file to be added.
2020-05-31 23:31:43 +02:00
branlix3000
0e1d7d6430 Fixing Android build from Linux. Letting ANDROID_NDK to be modified at compile time. Default path to the ANDROID_TOOLCHAIN have changed in the latest Android command-line tools release. (#1264)
Co-authored-by: Branlix 3000 <branlix@3000.3k>
2020-05-31 21:18:33 +02:00
raysan5
fed4716c3b resources PNG chunks cleaning 2020-05-28 21:18:58 +02:00
raysan5
15e1e9ba24 Added resources license 2020-05-28 21:17:40 +02:00
raysan5
64747478fe Renamed some resources for naming consistency 2020-05-28 21:17:16 +02:00
raysan5
36a15a745c Remove unused font 2020-05-28 21:16:13 +02:00
jvocaturo
6e84120b89 fix bug in QuaternionFromVector3ToVector3 (#1263) 2020-05-27 17:52:23 +02:00
raysan5
c43e889e39 Corrected bug on TextJoin() 2020-05-27 13:45:11 +02:00
ChrisDill
aff47d1564 Added bool IsCursorOnScreen(void). (#1262)
- The Mouse struct already stores cursorOnScreen. This function simply exposes it to the usage code.
2020-05-26 11:59:25 +02:00
Ray
ae334e9a6e Update SPONSORS.md 2020-05-25 23:56:22 +02:00
raysan5
1c5df677e1 REDESIGNED: ExportWaveAsCode() to use memory buffer 2020-05-24 15:48:07 +02:00
raysan5
b0f245d8c5 Review ExportImageAsCode() comment 2020-05-24 15:47:15 +02:00
raysan5
8120547639 Added LoadWAV()/SaveWAV() memory buffer sample code
It could be useful in a future...
2020-05-24 00:20:32 +02:00
raysan5
a6fcd32339 Support WAV music streaming #1198
Switched custom WAV laoding/saving funtionality to drwav library, it also provides the required mechanisms to stream wav data.
2020-05-23 23:19:59 +02:00
raysan5
427e543d84 Corrected issue
Compression API requires functions provided by stbi_image_write (DEFLATE compression)
2020-05-23 23:17:34 +02:00
raysan5
fe5fe230b9 Update dr_wav.h 2020-05-23 23:16:40 +02:00
raysan5
394bf00ba5 REDESIGNED: ExportMesh() to use memory buffer #1232
This change could introduce an issue on dataSize precalculation...
2020-05-23 19:48:40 +02:00
raysan5
4e8e90b6df Add note comment on ExportImageAsCode() 2020-05-23 19:46:58 +02:00
raysan5
0bcb892975 REDESIGNED: LoadIQM(), LoadModelAnimations() to use mem buffers 2020-05-23 19:24:15 +02:00
raysan5
94789dd24a Review usage of sizeof(), unify conventions
All functions requiring sizeof() now follow the same convention:

NUM_ELEMENTS*NUM_SUBELEMENTS*sizeof()
2020-05-23 19:23:40 +02:00
raysan5
b95673f701 Use RL_FREE() instead of free() 2020-05-23 19:21:46 +02:00
raysan5
d3dece3343 REDESIGNED: ExportImageAsCode() to use memory buffer #1232 2020-05-23 18:24:53 +02:00
raysan5
c1e0978555 Replaced strncat() by memcpy() in some functions 2020-05-23 18:05:41 +02:00
raysan5
795c079c55 Corrected issues on LoadPKM() 2020-05-23 18:04:58 +02:00
Karlo Licudine
a33dd87c99 Added Blend Modes example. (#1261) 2020-05-22 02:30:23 +02:00
raysan5
c1bb051e61 Avoid some warnings 2020-05-22 02:26:47 +02:00
raysan5
76f8e84901 Reviewed LoadBMFont() to load data from memory #1232 2020-05-22 02:19:45 +02:00
raysan5
70cd2f1edf Tweak 2020-05-22 02:18:50 +02:00
raysan5
0e56bc2929 Replace file accesses by memory accesses
Several functions used to load external files have been reviewed to just load the full file with LoadFileData() and load data from memory from there. This way all file access functionality is centralized in utils module.

Functions reviewed: LoadDDS(), LoadPKM(), LoadKTX(), LoadPVR(), LoadASTC(), SaveKTX()
2020-05-22 01:47:30 +02:00
raysan5
a2955bc5b3 Corrected issue with multichannel on CloseAudioDevice() 2020-05-22 00:32:23 +02:00
raysan5
cdbe1b6190 Review buffer limits on rectangle drawing 2020-05-21 18:57:45 +02:00
raysan5
b3eea3d322 Avoid loading texcoords and normasl from model if not existent 2020-05-18 18:35:47 +02:00
raysan5
6acb7bcfe4 Avoid glGetStringi() on OpenGL 2.1 2020-05-18 13:24:21 +02:00
Random
d9a96c4ca0 added BLEND_SET (#1251)
* added BLEND_SET

* renamed BLEND_SET to BLEND_ADD_COLORS
2020-05-16 13:39:38 +02:00
Noor Wachid
abb94bd2ff Adding Normalize and Remap functions (#1247)
* Adding Norm and Remap functions

// Normalize input value within input range
// Remap input value within input range to output range

* Rename Norm to Normalize

To make it uniforms with Raylib's functions

* Calculate Remap without other functions
2020-05-15 13:08:28 +02:00
raysan5
b897ae092a ADDED: Ecample: embedded files loading 2020-05-14 23:58:36 +02:00
ThePituLegend
d14c51aa2a Introduced Vector2 and Vector3 Square Lenght. (#1248)
* Introduced Vector2 and Vector3 Square Lenght.

* Square length functions renamed
2020-05-14 22:31:58 +02:00
raysan5
7b001164ef Review formatting GetPRevDirectoryPath() 2020-05-14 17:37:54 +02:00
raysan5
64d44d131d Emscripten fullscreen -WIP- 2020-05-14 17:35:26 +02:00
ivn
730375faf7 fix bug in GetPrevDirectoryPath on Unix-like systems (#1246) 2020-05-14 17:30:32 +02:00
raysan5
257f232d41 WARNING: BREAKING CHANGE: Review audio looping system
Current looping system was broken, `loopCount` has been converted to `bool looping` and user can enable/disable with `music.looping = false`. `SetMusicLoopCount()` has been removed.
2020-05-14 14:00:37 +02:00
raysan5
3a33fe0fd9 Avoid LoadImageEx() usage internally
At this point LoadImageEx() could be removed from raylib... still thinking about it...
2020-05-14 13:37:52 +02:00
raysan5
65b7047111 Remove some [textures] function dependencies
- LoadFontDefault() -> Some code simplifications
 - LoadFontFromImage() -> Avoid LoadImageEx()
 - LoadFontData() -> Avoid GenImageColor(), ImageFormat()
 - LoadBMFont() -> Avoid ImageCopy(), ImageFormat()
2020-05-14 13:36:22 +02:00
raysan5
ca6016cc71 TextToInteger() always exposed 2020-05-14 13:32:57 +02:00
raysan5
4ec40e720c GenMeshCubicmap() added comments and simplification 2020-05-11 17:54:23 +02:00
Ray
45450db45a Update BINDINGS.md 2020-05-11 13:58:28 +02:00
Ray
d7b0422769 Update BINDINGS.md 2020-05-11 13:43:58 +02:00
GoldenThumbs
763aa5b8a2 Fixed Generated Normals for GenMeshCubicmap (#1244)
Just flipped the signs of `n5` and `n6` at lines `2021` and `2022`.
2020-05-11 11:41:21 +02:00
raysan5
4e3ab8f27d Update config.h.in 2020-05-09 17:37:02 +02:00
raysan5
3a4e3d8747 Update CMakeOptions.txt 2020-05-09 17:36:16 +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
913ef1d56f Misc code reviews 2020-05-09 13:05:54 +02:00
Mickaël Malécot
0bd64b7975 Gamepad axis bug fixes and improvement (#1228)
* Fix gamepad axis count

* Fix Xbox axis drawing

* Ignore low axis values

* Revert "Fix gamepad axis count"

This reverts commit f08ae4bf

* Fix GamepadAxis API

* Fix conflict with master

* Revert Gamepad MAX definitions

* Revert MAX_GAMEPAD_AXIS update
2020-05-09 12:39:41 +02:00
raysan5
7efed56b66 Added [text] flag: SUPPORT_TEXT_MANIPULATION 2020-05-09 12:38:33 +02:00
raysan5
7a1d3d807f WARNING: RENAMED: ImageExtractPalette() -> GetImagePalette() 2020-05-09 12:07:18 +02:00
raysan5
cb3bdf09c6 Merge branch 'master' of https://github.com/raysan5/raylib 2020-05-09 12:05:08 +02:00
raysan5
959447d8ed Reorganized texture functions
Removed ImageAlphaMask() dependency on [text] LoadBMFont()
2020-05-09 12:05:00 +02:00
Ray
2d1cbe3cb3 Update .gitignore 2020-05-08 22:48:10 +02:00
sikor666
db4a618c6f Fix materials loading for IQM models (#1227) 2020-05-08 20:27:10 +02:00
armageddon421
df5c522049 Update CMakeLists.txt to fix CMake build for Raspberry Pi (#1229) 2020-05-07 22:22:09 +02:00
Ray
4e29294caa Update BINDINGS.md 2020-05-07 19:22:43 +02:00
Ray
a813c40abf Update BINDINGS.md 2020-05-07 19:19:13 +02:00
Ray
37dccd98a6 Added bindings: raylib-purebasic, clj-raylib 2020-05-07 18:37:55 +02:00
raysan5
d357b116fe Reviewed missing check for JPG 2020-05-07 18:08:35 +02:00
raysan5
6fa6757a8b Comment tweak 2020-05-07 13:39:41 +02:00
raysan5
f6ca045735 ADDED: DrawTriangle3D() and DrawTriangleStrip3D()
Those functions could be very useful for custom triangle data drawing, using internal batch system.
2020-05-07 12:46:45 +02:00
raysan5
2e8299742b Comments review 2020-05-07 12:45:44 +02:00
raysan5
67d8b43b0e Review first person movement Y waving
Some comments added
2020-05-07 12:45:23 +02:00
raysan5
fdad1f023b Avoid all MSVC compile warnings
Most warning were related to types conversion (casting required) and unsigned/signed types comparisons.

Added preprocessor directives (_CRT_SECURE_NO_DEPRECATE; _CRT_NONSTDC_NO_DEPRECATE) to avoid warnings about unsafe functions, those functions are safe while used properly and recommended alternatives are MS only.

Some external libraries still generate warnings.
2020-05-06 19:12:09 +02:00
Ray
9a1e934621 Added raylib D bindings! 2020-05-06 11:38:21 +02:00
raysan5
526c85773f Replace deprectared usleep() calls 2020-05-06 11:33:08 +02:00
Rfaile313
845596c30a No need for "LOGO_RECS_SIDE" maybe an artifact? (#1236)
Game will not compile with those four lines of code.
2020-05-06 11:27:55 +02:00
Ray
72443f8f25 Removed RaylibSharp (dead link) 2020-05-02 11:56:24 +02:00
Ray
695e937102 Added binding raylib-Forever 2020-05-02 11:48:07 +02:00
raysan5
b8055925bf Update raymath.h 2020-05-01 18:19:54 +02:00
raysan5
6a8e4795da Update core_input_multitouch.c 2020-05-01 18:16:04 +02:00
raysan5
af744b07c3 Review latest PR formatting 2020-05-01 18:04:47 +02:00
Anata
4583987fb9 Add Vector2MoveTowards function (#1233) 2020-05-01 17:50:41 +02:00
raysan5
c83477ffca WARNING: Big internal redesign!
Created RenderBatch type and related functions to allow rlgl users creating custom and separate render batches and not only rely on one internal render batch.

This feature has not been exposed on raylib yet because it implies some breaking changes. Right now a custom RenderBatch is just used internally in rlgl.
2020-05-01 17:34:43 +02:00
raysan5
51c3bef497 Review exposed #defines and allow user re-defining
There are multiple #define values around raylib, usually not exposed for redefinition, just reviewed all of them to allow users redefining them on compile time if required.

Also, multiple #define have been renamed and commented.
2020-05-01 17:31:44 +02:00
raysan5
1c15dc7292 Reviewed UWP update
Mostly code formatting tweaks
2020-04-30 21:00:09 +02:00
raysan5
0981dde9d4 Remove strcmp() requirement 2020-04-30 20:17:16 +02:00
raysan5
4ca4326bf9 Review LoadGLTF() to read from memory buffer 2020-04-30 19:51:57 +02:00
Reece Mackie
4b03860810 UWP rework (#1231)
* First draft of UWP rework.

* Read desc

- Moved UWP specific functions to uwp_events.h
- Removed BaseApp.
- Implemented example UWP lifecycle.

* Added GIF recording and screenshot support.

* Character inputs and filesystem stuff

* Fix game closing on Xbox when B is pressed.

* Fix the gamepad binding hack

* Add as many keys as I believe are possible.

* Implemented mouse locking of a sort.

* Remove rogue todo, the rest are for a game dev using this example.

* Implemented touch how I "think" it should work. I cant test this.

* Review.
2020-04-30 19:48:39 +02:00
Ray
2f454aa4b0 Added latest SPONSORS to list! Thank you very much! 2020-04-29 22:54:40 +02:00
Ray
b1a0f9873b Added raylib-beef to list 2020-04-29 21:10:11 +02:00
raysan5
ac8f436c3b Init CORE.Window.focused 2020-04-29 20:55:17 +02:00
raysan5
e65d15f6ad Merge branch 'master' of https://github.com/raysan5/raylib 2020-04-27 18:03:05 +02:00
raysan5
94ab5e2aab Review issue with vertex batch overflow #1223 2020-04-27 18:02:54 +02:00
Ray
06f6497181 Update README.md 2020-04-27 17:49:57 +02:00
raysan5
6e2d39c51b ADDED: IsWindowFocused() 2020-04-27 17:41:29 +02:00
Ray
ce2e48af52 Update to use latest emscripten and android ndk
- To support ASYNCIFY instead of EMTERPRETER
 - No need to generate a standalone toolchain for Android NDK
2020-04-26 13:46:15 +02:00
raysan5
72cc3e0530 Corrected issue #1203 2020-04-26 13:23:03 +02:00
raysan5
8e59ecb50c ADDED: GetWindowScaleDPI() 2020-04-24 23:17:32 +02:00
ivn
b73e7372d8 Fix for building examples with latest emsk (LLVM): remove EMTERPRETIFY, add ASYNCIFY (#1215) 2020-04-23 15:45:26 +02:00
Kevin Yonan
dd7dd1ac8b Mempool and other Allocators Optimization (#1211)
Optimizations of allocators.
Renamed 'Stack' to 'Arena'.
Replaced certain define constants with an anonymous enum.
Refactored MemPool to no longer require active or deferred defragging.
2020-04-22 13:11:45 +02:00
Dani Martin
0570e49d14 [android] Extend validity of the certificate (#1212)
For uploading a apk to Google Play a minimun of 25 years (9125 days) is needed for the validity of the key.

More info:
https://developer.android.com/studio/publish/app-signing
2020-04-22 13:09:41 +02:00
Ray
3494a29603 Update README.md 2020-04-21 21:19:20 +02:00
flashback-fx
596499416f Update easings.h (#1210)
Make easings.h use powf and sqrtf instead of pow and sqrt.
2020-04-21 21:17:58 +02:00
raysan5
00b3199859 Added raymath to examples 2020-04-16 13:49:19 +02:00
raysan5
c8309327f8 Merge branch 'master' of https://github.com/raysan5/raylib 2020-04-16 13:49:05 +02:00
raysan5
baf5e02f43 Remove comment 2020-04-16 13:48:47 +02:00
Ray
2f044acb4e Update new-issue-template.md 2020-04-15 20:05:19 +02:00
Ray
ff58f7e846 Update new-issue-template.md 2020-04-15 20:04:14 +02:00
Ray
736c6761a2 Create config.yml 2020-04-15 20:02:51 +02:00
Ray
c30d394efe Update new-issue-template.md 2020-04-15 19:58:51 +02:00
Stefan E. Mayer
6582084e9b Set the correct version of make on macos (#1202) 2020-04-14 19:50:53 +02:00
Ray
3f1029c281 Added binding: jaylib (Java) 2020-04-14 13:04:51 +02:00
raysan5
8d51ad567f Review UWP project -WIP- 2020-04-13 16:40:04 +02:00
G3bE
32387317bf Make raymath more consistent (#1197)
* Make raymath naming and functions more consistent

* Minor fixes

* Fix examples

* Fix Physac

* New naming rules

* Apply naming to Quaternion functions

* Apply to models.c

* Remove *MulitplyValue / *DivideValue
2020-04-13 16:32:45 +02:00
raysan5
f0fe03087a Remove tshirt design
It makes no sense to have this here...
2020-04-13 15:35:56 +02:00
raysan5
26f39e41a9 Remove games from building 2020-04-13 15:10:42 +02:00
raysan5
fd5d1dfcb6 WARNING: REMOVED raylib/games - Moved to raysan5/raylib-games
Move raylib games to another repo. It will reduce repo size for new clones.

I considered also removing the related history with [`git filter-repo`](https://github.com/newren/git-filter-repo) (the current sane alternative to the deprecated `filter-branch`) but it has some implications: It would had made a new repository with distinct history and checksums. If the repo was previously published,
the history of the new one won't have been compatible with the history others have pulled.
2020-04-13 13:31:45 +02:00
raysan5
eb04be8141 Review VSCode tasks 2020-04-13 12:07:05 +02:00
Stefan E. Mayer
c21e9a721b Fix VSCode (#1193)
* Executable is called game, not main

* Use make not mingw32-make on macOS
2020-04-13 11:51:40 +02:00
pah arif
b4af1b2cc0 add makefile to support multiple C files (#1195)
* tcc-based vscode project for windows

Signed-off-by: misterpah <misterpah@gmail.com>

* add makefile to support multiple C files
2020-04-11 20:01:28 +02:00
raysan5
5ff5be388f Merge branch 'master' of https://github.com/raysan5/raylib 2020-04-11 12:03:59 +02:00
raysan5
a7311af8c3 Corrected examples after API change: ImageDrawText*() 2020-04-11 11:26:16 +02:00
pah arif
17ee57c458 tcc-based vscode project for windows (#1191)
Signed-off-by: misterpah <misterpah@gmail.com>
2020-04-11 11:23:00 +02:00
raysan5
cc816345bf WARNING: API BREAK: Removed LoadImagePro()
Actually this function is useless and potentially dangerous, internally, a shallow copy of data was done. Same could be accomplished accesing image.data directly.
2020-04-10 19:26:36 +02:00
raysan5
b132da0ac2 WARNING: API BREAK: Reviewed ImageDrawText*() params order
To unify with DrawText*() equivalent functions
2020-04-10 19:10:15 +02:00
raysan5
d419602c99 Review display size init for RPI 2020-04-09 23:50:00 +02:00
raysan5
926651b708 Optimized ImageDrawPixel()
Now it's blazing fast. It modifies image.data directly.

Previous version could take up to 3-4 seconds to draw a line... now it takes some nanoseconds...
2020-04-09 22:44:10 +02:00
raysan5
0abe557af1 Fixed issue with ImageDrawLine() 2020-04-08 12:37:52 +02:00
Ahmad Fatoum
6c9f6cf084 Revert "CMake: Don't create symlinks on unsupporting file systems (#539)"
As noted in #539, the symlink check was to support compiling raylib on
VirtualBox vboxfs as no symlinks are supported there.

With me using Linux as daily driver outside VirtualBox now, this 'feature'
is most likely unused by anyone, but still annoys other users (#791).
Just revert it and be done with it. If there are really others building
raylib on vboxfs or a similarly crippled file system under Linux, they
should now step forward when their build breaks.

This reverts commit b8ca51fd01.
2020-04-08 11:01:26 +02:00
Shy
81c44e32c3 ignore symlink creation failure error 2020-04-08 07:05:43 +02:00
raysan5
2b5188c4b3 Updated VS2017.UWP output folders 2020-04-07 21:19:43 +02:00
raysan5
a25d3b7ff4 Update raylib.vcxproj 2020-04-07 21:14:36 +02:00
raysan5
42f09eb2b8 Delete .gitignore 2020-04-07 18:52:07 +02:00
raysan5
ef9e9bfa7d Review Android piepline
- Removed generate_android_toolchain, since version r21 AndroidNDK it's the toolchain
 - Removed external lib native_app_glue, provided by AndroidNDK
2020-04-07 17:54:08 +02:00
raysan5
f31b87fae8 Remove ANGLE project
Actually, project just adds 50MB of ANGLE libraries not related to raylib.
Also reviewed UWP project to consume ANGLE from the NuGet package.
2020-04-07 17:43:21 +02:00
raysan5
3b174876b3 Update launch.json 2020-04-07 16:43:40 +02:00
raysan5
62b7064e90 Corrected issue with depth initialization #1179 2020-04-06 19:58:28 +02:00
Ray
0a25b9d39b Update README.md 2020-04-06 13:30:32 +02:00
raysan5
5fb6155eea Removed unused Duck model. 2020-04-06 11:37:47 +02:00
Louis Johnson
4f40f8bc47 added log warning for unsupported file extension for music stream (#1176)
* added log warning for unsupported file extension for music stream

* updated error log message for music stream when file format isn't supported
2020-04-06 11:26:09 +02:00
Ray
8d0888afef Update SPONSORS.md 2020-04-05 23:26:32 +02:00
Benjamin Stigsen
2d6303e9fe Allow for empty replacement string (#1178) 2020-04-05 22:42:59 +02:00
raysan5
90fb53bccc Review android_fopen() to support SDCard access 2020-04-05 17:51:27 +02:00
raysan5
4ceb4d3bf3 Some code tweaks, comments and defines 2020-04-05 17:50:37 +02:00
Benjamin Stigsen
9c280bc7af TextReplace changes (#1172)
- Added NULL return if the replacement string (`by`) is empty
- Reordered sanity checks since there's no need to initialize variables if the strings are invalid.
2020-04-04 14:25:57 +02:00
SasLuca
8444c3f705 Fixed offset check in GenImageFontAtlas (#1171)
* Fixed offset check in GenImageFontAtlas

* Fixed code formatting to follow raylib notation rules
2020-04-02 23:53:29 +02:00
Ray
7ef114d1da Set build type to Release only #1164 2020-04-01 11:07:01 +02:00
raysan5
adb20569be Review shared library building 2020-04-01 11:06:05 +02:00
Ray
07f3a65a96 Update ROADMAP.md 2020-03-31 23:00:48 +02:00
Ray
6a8b1079c1 Update project version for release 2020-03-30 23:42:17 +02:00
Ray
703850b341 Update README.md 2020-03-30 23:28:38 +02:00
raysan5
8da6307456 Get icons back on shell.html
It seems there is some related issue on emscripten side... but I'll keep the icons here despite not displayed properly for the moment.
2020-03-30 21:34:45 +02:00
raysan5
e469f4ebf7 Update config.h, enable some file-formats by default 2020-03-30 17:42:42 +02:00
raysan5
8941cf3e66 Update textures.c 2020-03-30 17:42:19 +02:00
raysan5
68cad30646 Remove useless files 2020-03-30 17:27:03 +02:00
raysan5
fc7ec5e907 Update raylib.h 2020-03-30 17:11:35 +02:00
Dani Martin
1a948849f3 [cppcheck] Fix minor warnings in models.c and raudio.c (#1162)
Errores fixes:
models.c,2843 Either the condition 'fileData!=NULL' is redundant or there is possible null pointer dereference: fileData.
raudio.c,805, 806, 807, 808, %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
2020-03-30 17:08:01 +02:00
Ray
bba10504e2 Update HISTORY.md 2020-03-30 16:30:34 +02:00
Ray
ff11a6fbe8 Update CHANGELOG 2020-03-30 16:25:59 +02:00
Ray
27ebe78313 Update CHANGELOG 2020-03-30 16:23:37 +02:00
raysan5
44961d1975 Update core_basic_window.c 2020-03-30 16:09:09 +02:00
raysan5
e8a8d544c5 Review formating and signegness issues 2020-03-30 14:38:16 +02:00
Dani Martin
62cdb2299b [cppcheck] Improvements in SaveStorageValue() in core.c (#1160)
* [cppcheck] Improvements in SaveStorageValue() in core.c

in file core.c cppcheck shows errors only in function SaveStorageValue():

* Common realloc mistake: 'fileData' nulled but not freed upon failure
* Memory pointed to by 'fileData' is freed twice.

Validation:
* Tested examples/core/core_storage_values.c
* Launched Unit Test for this function
* Rerun CPPCHECK afer fix

* [cppcheck] Change functions header to accept only positive position in files

Changes:
* Functions SaveStorageValue(), LoadStorageValue() (core.c)
* Functions LoadFileData(), SaveFileData() (utils.c)
* Headers in raylib.h

Validation:
* Tested examples/core/core_storage_values.c
* Launched Unit Test for these functions
* Rerun CPPCHECK afer fix
2020-03-30 13:51:36 +02:00
Ray
9b66883e0b Update README.md 2020-03-30 13:29:05 +02:00
Ray
d1b0d6a6dc Update README.md 2020-03-30 13:28:30 +02:00
Ray
c47ba58494 Update README.md 2020-03-30 13:23:20 +02:00
Valentin Lemière
41582f0448 Fix "variable is reassigned before use" linter warning on raymath.h (#1158) 2020-03-29 22:03:10 +02:00
raysan5
3e76d3a3d3 Added example: shaders_spotlight 2020-03-29 14:25:09 +02:00
raysan5
733ed972f7 Reorganize image functions 2020-03-29 13:37:33 +02:00
raysan5
5d7050bdf9 Reorganize image/texture functions for consistency 2020-03-29 13:31:12 +02:00
Rob Loach
a025636fa1 Update ImageDraw*() functions to match arguments of Draw*() (#1156)
* Update ImageDraw*() functions to match arguments of Draw*()

Updated draw functions:
ImageDrawPixel()
ImageDrawPixelV()
ImageDrawCircle()
ImageDrawCircleV()
ImageDrawLine()
ImageDrawLineV()
ImageDrawRectangle()
ImageDrawRectangleV()
ImageDrawRectangleRec()

* [nodepadpp] Update Notepad++ ImageDraw defintions

This updates the Notepad++ definitions with the updated ImageDraw methods.

* [examples] Add ImageDraw calls to textures_image_drawing

* Update ImageDraw*() methods
2020-03-29 12:43:34 +02:00
Ray
3c3dfde3f9 Added binding: raylib-zig 2020-03-28 19:35:20 +01:00
Ray
5829fdb73e Added binding: raylib-ats2 2020-03-28 19:30:00 +01:00
Ray
9b74c40fc2 Update HISTORY.md 2020-03-28 19:17:51 +01:00
raysan5
66e0d774bd Revert "Update compilation warning flags (#1151)"
This reverts commit 2528854664.
2020-03-28 18:39:56 +01:00
raysan5
a5e1aff99b [example] Integrate virtual mouse in main example 2020-03-28 18:36:30 +01:00
raysan5
e333eb415b Update window rc 2020-03-28 18:27:56 +01:00
Ray
02df366a7a Update HISTORY.md 2020-03-27 20:40:00 +01:00
Ray
976a10c891 Update CHANGELOG 2020-03-27 20:31:20 +01:00
raysan5
d28e73849b Review TRACELOG() messages 2020-03-27 18:49:21 +01:00
raysan5
d7b15ac1cf Review TRACELOG() categories 2020-03-27 18:45:37 +01:00
raysan5
c0c775e45d [rlgl] Review TRACELOG() messages, categorized 2020-03-27 18:31:36 +01:00
raysan5
b5842434c2 Corrected missing semicolon 2020-03-27 18:31:16 +01:00
raysan5
c7e9951795 [core] Review TRACELOG() messages, categorized 2020-03-27 18:06:09 +01:00
raysan5
70ed975b99 [models] Review TRACELOG() messages, categorized 2020-03-27 17:43:51 +01:00
raysan5
7e2b1b4ff0 [textures] Review TRACELOG() messages 2020-03-27 17:43:38 +01:00
raysan5
915b5f370b [raudio] Review TRACELOG() messages, categorized 2020-03-27 17:43:24 +01:00
raysan5
0c6c421508 [raudio] Review TRACELOG() messages, categorized 2020-03-27 17:16:30 +01:00
raysan5
bc2c6251f8 [text] Review TRACELOG() messages, categorized 2020-03-27 17:16:07 +01:00
raysan5
b9dd459d5a [textures] Review TRACELOG() messages, categorized 2020-03-27 17:15:44 +01:00
raysan5
28da2522fe [utils] Review TRACELOG() messages, categorized 2020-03-27 17:15:26 +01:00
Dani Martin
2528854664 Update compilation warning flags (#1151)
* Update compilation warning flags

Removed the -Wall flag that allow many warnings and added manually all the warning flags that don't generate warnings in the src/external folder.
Specifically, these are some of the flags reporting errors in src/external:

-Wmissing-prototypes
-Wunused-variable
-Wunused-value
-Wunused-parameter
-Wunused-function

* Uptade compilation flags in examples with missing -std=c99
2020-03-26 18:48:34 +01:00
raysan5
7ae7a87f8a Remove trail spaces 2020-03-25 19:41:51 +01:00
raysan5
3d41c1b6cd Minor tweaks 2020-03-25 19:38:55 +01:00
raysan5
96005f2566 ADDED: IsWindowFullscreen() 2020-03-25 18:52:38 +01: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
raysan5
74339b9fdc [example] Review shaders_spotlight to work on GLSL 100 2020-03-25 18:39:21 +01:00
chriscamacho
2dbcef218c spotlight example, each spot has own radius, mouse countrol (#1148)
NB glsl100 shader needs testing on "bare metal"

Co-authored-by: codifies <nospam@antispam.com>
2020-03-25 10:28:16 +01:00
Random
e07281f8bd Fixed DrawTextRecEx() selection when wordwrap is ON (again) (#1149) 2020-03-25 10:27:43 +01:00
raysan5
5e670be239 REVIEWED: shaders_spotlight example
It seems something is not working properly...
2020-03-24 19:49:09 +01:00
raysan5
05abaee0e0 Update core_window_letterbox_virtual_mouse.c 2020-03-24 19:10:50 +01:00
raysan5
d657537821 Support mtl loading by tinyobj_parse_obj() #1134
I don't like this solution but well... let's use it for the moment...
2020-03-24 18:42:57 +01:00
Ray
5fe0db347c Update HISTORY.md 2020-03-24 15:03:55 +01:00
Ray
649665eac9 Update CHANGELOG 2020-03-24 15:01:09 +01:00
chriscamacho
efe359d613 as per request spotlight example (#1146)
Co-authored-by: codifies <nospam@antispam.com>
2020-03-24 14:27:14 +01:00
Anata
c45fe62abc Add files via upload (#1147)
Virtual mouse with window letterbox, and Clamp
2020-03-24 14:25:44 +01:00
Ádám Dóda
584e2d664c GenMeshHeightmap flat shading normals (#1140) 2020-03-24 13:27:49 +01:00
raysan5
51a8e1d692 Remove define not required 2020-03-24 13:26:34 +01:00
Doyle
da836a732c Android: Better track touch input returned from IsMouse*() (#1144)
* Android: Better track touch input returned from IsMouse*()

Switch to actually tracking touch input to use for "mouse" input rather
than the gestures system. The gesture system as an abstraction ontop of
raw touch input loses some information needed to map to "mouse"
input.

Before,
- IsMouseButtonReleased() triggers immediately after the initial touch
(because GESTURE_TAP activates immediately on touch) instead of waiting for the
touch to be released.
- IsMouseButtonUp() returns false, when it should just be the opposite
of IsMouseButtonDown().
- IsMouseButtonDown() returns true only after GESTURE_HOLD (which
activates after some period of time after GESTURE_TAP), when instead it
should just be true whenever there is touch input i.e. gesture !=
GESTURE_NONE or alternatively when any input is received on the screen.

After this PR, touches map closer to mouse input.
- IsMouseButtonReleased() triggers when touch is released (last frame
was touched, this frame not touched).
- IsMouseButtonUp() returns the opposite of IsMouseButtonDown()
- IsMouseButtonDown() is true when
(AMOTION_EVENT_ACTION_DOWN || AMOTION_EVENT_ACTION_MOVE) and false when
(AMOTION_EVENT_ACTION_UP)

* RPI: Include index check for RPI in GetTouchPosition()
2020-03-24 13:23:34 +01:00
raysan5
6bab884d1d Added note on examples not supporting GLSL100 2020-03-24 12:39:05 +01:00
Ahmad Fatoum
4e6db307e4 appveyor: configure for Release with Debug Info
We build the library as debug with AppVeyor and package it this way,
which is unfortunate, because on Windows it's linked against debug
variants of the C runtime. Fix this by build RelWithDebInfo instead

Fixes #1128.
2020-03-24 06:37:22 +01:00
Ahmad Fatoum
0229f9b1a4 CMakeLists.txt: report generated CMAKE_CONFIGURATION_TYPES
We might want to customize this in feature for multi-config builds (e.g.
a Visual studio build with both Debug and Release configurations).

Output the variable value for user awareness.
2020-03-24 06:37:22 +01:00
chriscamacho
6bbaca118f ended up using the 100 version shaders as off the top of my (#1142)
head can't think of any improvement I could use on the shaders for
version 120
This has been tested on Linux (Desktop) requires testing on a Rpi

Co-authored-by: codifies <nospam@antispam.com>
2020-03-23 23:07:42 +01:00
Ray
ba3b4b2d08 Set a release date for raylib 3.0! 2020-03-23 20:56:31 +01:00
raysan5
fcdb120935 Comment tweaks 2020-03-23 20:24:20 +01:00
raysan5
8f45370073 Comment tweaks 2020-03-23 20:24:09 +01:00
Ray
502bc61931 Update HISTORY.md 2020-03-23 14:30:19 +01:00
Ray
5a39b22521 Update CHANGELOG 2020-03-23 14:22:06 +01:00
Ray
6c44c9d730 Update HISTORY.md 2020-03-21 21:14:26 +01:00
Ray
a523c64718 Update CHANGELOG 2020-03-21 20:33:46 +01:00
raysan5
5aebd2a16c Review formating from PR #1138 2020-03-21 20:30:40 +01:00
Sourav Gupta
574c689ff7 Added draw functions to ImageDraw*() (#1138)
Added draw functions:
ImageClearBackground()
ImageDrawPixel()
ImageDrawLineEx()
ImageDrawCircle()
2020-03-21 20:23:50 +01:00
Ray
b178c992a1 Update README.md 2020-03-21 20:21:08 +01:00
Ray
a4d31e1dad Added raylib 3.0 notes -WIP- 2020-03-21 20:20:37 +01:00
Ray
e151487fde Review history introduction 2020-03-21 19:13:16 +01:00
Ray
061848cd0c Updated badges links 2020-03-21 18:48:04 +01:00
Ray
ab1c12c449 Update Travis/AppVeyor badges 2020-03-21 15:05:02 +01:00
Ray
8db8401bc1 Review Travis/AppVeyor badges 2020-03-21 13:50:24 +01:00
Ray
58a81dd760 Update README.md 2020-03-21 13:48:53 +01:00
Ray
a5838e40d9 Update CONTRIBUTING.md 2020-03-21 13:37:48 +01:00
Ray
78e8fd1c31 Update CHANGELOG 2020-03-21 13:32:53 +01:00
Ray
2d07d29a1c Update README.md 2020-03-21 13:29:03 +01:00
Ray
19bbcbb486 Update badges 2020-03-21 13:26:19 +01:00
Ray
b6ba3dacb9 Playing with badges 2020-03-21 13:23:20 +01:00
Ray
65d9d0aac1 Testing badges 2020-03-21 13:22:06 +01:00
Ray
b9c966f902 Playing with badges... 2020-03-21 13:01:50 +01:00
Ray
d62368f133 Update README.md 2020-03-21 12:43:27 +01:00
Ray
3d66a6c93f Added: new binding to Carp 2020-03-21 11:28:18 +01:00
Doyle
01e035e28b Android: Track touch motion across screen (#1137)
This was working in 2.6 but no longer does in current git tree.
It appears touch position is only tracked on
AMOTION_EVENT_ACTION_[DOWN|UP], which only registers the initial touch
on the screen. Subsequent movement is not tracked into CORE.

Touch position and the Gesture System appears to be updated twice in
AndroidInputCallback in what looks like perhaps a copy paste error (code
is identical) with the exception of tracking AMOTION_EVENT_ACTION_UP in
the 2nd copy of the code (but this is not necessary to track).

If you need to track the first touch or release touch position, you can
do so with checking IsMouseButton[Pressed|Released] on the same frame.

This patch makes it so the touch position is always updated, and merges the
duplicated code into 1 singular code path.
2020-03-19 16:56:48 +01:00
raysan5
4af4483f5f Added security check in case init fails #1135 2020-03-17 20:57:01 +01:00
raysan5
2344941974 Replace external libraries custom allocators by raylib ones #1074
NOTE: Two libraries still use custom allocators: glfw and stb_vorbis
2020-03-17 13:40:07 +01:00
Ray
6f41b9594a Update README.md 2020-03-16 20:46:28 +01:00
Ray
3e049c09d5 ADDED: XD Pascal bindings 2020-03-16 19:11:06 +01:00
Henrique de Lima
92e1205f40 Adding the option to change the target platform(x86/x64), Generating the .pdb file on debug builds, and correcting comments that called the script 'windows-build.bat' instead of 'build-windows.bat' (#1133) 2020-03-16 10:32:39 +01:00
raysan5
71b06caed4 Corrected typo 2020-03-15 17:06:08 +01:00
raysan5
4611406c68 REVIEWED: ImageTextEx() to support line breaks #1131
NOTE: This functionality has an important issue, line space is fixed to 1.5 font.baseSize pixels, depending on the font and how it has been generated that spacing could be too wide or too narrow...
2020-03-15 16:18:48 +01:00
Doyle
427be604b9 Android: Set display.[width, height] before screen size check (#1132)
In `InitGraphicsDevice(...)`, the Android section has a screen security check
like other platforms- but CORE.display.width, CORE.display.height are
not set yet, so the security check sets it to 0. So ensure we query the
device's screen width and height before the screen size security check.

This also gives you the ability to run a proper full-screen application
on Android without any scaling and guess work on the target device by
setting screen width and height to 0 in `InitWindow(...)` and using
`GetScreen[Width|Height]()` to get the actual values.
2020-03-15 15:56:43 +01:00
Ray
d57b5ac89a Added note on transparent framebuffer w/o X11 on RPI 2020-03-12 17:47:35 +01:00
Ray
82937e1564 Update .gitignore 2020-03-12 13:02:18 +01:00
Ray
7fa12844ed [text] TextToUpper(): Added note on diacritics 2020-03-12 13:02:09 +01:00
Ray
af011bc952 ADDED Binding: FreeBasic 2020-03-09 18:52:41 +01:00
Ray
4c728f0b54 Minor tweaks 2020-03-09 18:45:37 +01:00
Ray
5895fb6adc Address issue #1125 2020-03-09 13:01:10 +01:00
Ahmad Fatoum
eb6f8bd0ba Revert "Always use latest raylib version for cmake (#1123)" (#1126)
We didn't use the latest version, but a compatible version, which is established by raylib-config-version.cmake.

It's ok to have a minimal version, so revert b7c0d5b6dd.
2020-03-09 08:29:47 +01:00
G3bE
b7c0d5b6dd Always use latest raylib version for cmake (#1123)
* Always use latest raylib version

* Always use latest raylib version

* Always use latest raylib version
2020-03-08 18:04:29 +01:00
SasLuca
680f9d5772 Changed if to else if. (#1122) 2020-03-08 18:03:23 +01:00
Astie Teddy
20d8889a03 ADDED Bindings: raylua-lua (raylua) (#1124) 2020-03-08 18:02:37 +01:00
Ray
c67bc02dd1 Reviewed missing include 2020-03-07 21:54:54 +01:00
Ray
1b56f7917e Update raylib version 2020-03-05 19:33:54 +01:00
Ray
7639726193 ADDED Bindings: raylib-luamore, raylib-nelua, raylib-mosaic 2020-03-05 18:58:10 +01:00
Ray
fb2ed693e4 Android: Support file saving to internal data storage 2020-03-05 18:12:41 +01:00
Ray
966e8adcf9 Reviewed and Updated Android compilation scripts 2020-03-05 12:25:39 +01:00
Ray
c3386300d3 Remove comment 2020-03-04 18:23:31 +01:00
Ray
cb4c676f5d Added BlitzMax binding 2020-03-04 13:12:16 +01:00
Ray
74c486201d ADDED: LoadFileText() and SaveFileText()
Improved file access checks
2020-03-04 00:21:46 +01:00
Ray
6b8f30964d WARNING: Corrected issue with IsKeyDown() #1119 2020-03-03 16:43:15 +01:00
Ray
dc2e5c1751 Update core.c 2020-03-03 16:10:31 +01:00
Ray
645a5b2507 Avoid icons in shell
Very weird... lately icons are not properly displayed on browser!
2020-03-03 15:53:13 +01:00
Ray
3a073db029 REVIEWED: Mouse/Touch input system
After several reviews, now it seems everything works as expected.
2020-03-03 14:58:54 +01:00
Ray
a6297a2be1 Some code tweaks 2020-03-03 01:21:06 +01:00
Ray
8724cf2ea5 Support any mouse button for gesture detection 2020-03-02 13:29:36 +01:00
Ray
485787059a Review shader exaples to work on web (GLSL 100) 2020-03-02 13:27:54 +01:00
Ray
08615d3247 Review some comment 2020-03-02 12:22:57 +01:00
Ray
a1b2d96d9c Support touch drawing on web 2020-03-02 12:22:38 +01:00
i-right-i
3c2ee1cc75 Update raymath.h (#1118)
* Update raymath.h

Added Vector2Rotate Function.

* Update raymath.h
2020-03-02 10:22:08 +01:00
Ray
117696a893 Update textures_mouse_painting.c 2020-03-02 00:09:05 +01:00
Ray
2f5a7ddcc6 Added comment on IsMouseButtonDown() issue
IsMouseButtonDown() does not process touch state down properly, state is reseted every frame...
2020-03-02 00:07:06 +01:00
Ray
18a9982126 Reviewed IsMouseButtonDown() 2020-03-01 01:29:34 +01:00
Ray
41d3c47ffe Update Makefile 2020-03-01 01:28:49 +01:00
Ray
7428747ef0 REDESIGNED input system for better mouse/touch support 2020-02-29 22:10:23 +01:00
Ray
1ee6290fcf Replaced fabs() by fabsf() when required 2020-02-28 12:54:39 +01:00
brankoku
572969d8b7 LoadText() tweak (#1113)
Guarantee string is zero-terminated
2020-02-28 08:23:05 +01:00
Ray
f2247c6f0a REVIEWED: LoadText() 2020-02-28 00:32:46 +01:00
Ray
05992a6fce Tweaks 2020-02-27 16:37:32 +01:00
Ray
c8464bc731 Corrected return value 2020-02-27 16:22:34 +01:00
Ray
b2098a2d60 REDESIGN: ExportImage()
Use new file I/O ABI
2020-02-27 16:15:58 +01:00
Ray
ac73e3b5e2 REDESIGN: ExportWave()
Use new file I/O ABI
2020-02-27 16:15:20 +01:00
Ray
1be68d8cfe Tweak on variable init 2020-02-27 16:14:50 +01:00
Ray
eb86d69a38 Review default config flags 2020-02-27 16:14:31 +01:00
Ray
acfa967e89 Corrected issue with variable name 2020-02-27 13:56:27 +01:00
Ray
5ff0776235 Remove trail spaces and some tweaks 2020-02-27 13:33:09 +01:00
Ray
2a408d789c REDESIGNED: LoadImage() -WIP-
Using new file I/O ABI
2020-02-27 13:21:51 +01:00
Ray
5100cb3e7f REDESIGNED: LoadImageRaw(), LoadAnimatedGIF()
Using new file I/O ABI
2020-02-27 13:21:21 +01:00
Ray
b029fb6d31 REDESIGNED: LoadFontEx()
Using new file I/O ABI
2020-02-27 13:19:58 +01:00
Ray
245ba2a152 LoadText(): Added comment 2020-02-27 13:19:13 +01:00
Ray
89ecad1e29 Review macros 2020-02-27 13:18:55 +01:00
Ray
23bde477e5 REDESIGN: LoadStorageValue()/SaveStorageValue()
Using new file I/O ABI
2020-02-27 13:18:15 +01:00
Ray
2294947660 Update core_storage_values.c 2020-02-26 23:42:41 +01:00
Ray
5aed36e76d Tweaks on fullsccreen detection... 2020-02-26 23:42:06 +01:00
Ray
e5b5aea998 WARNING: RENAMED: Storage functions
Renamed functions for consistency:

 - StorageLoadValue() > LoadStorageValue()
 - StorageSaveValue() > SaveStorageValue()
2020-02-26 23:40:53 +01:00
Ray
fadd74358b Security check 2020-02-26 23:38:12 +01:00
Ray
7912fac815 Correct typo 2020-02-26 23:19:29 +01:00
Ray
fa4e0c1a26 Reviewed example 2020-02-26 20:47:08 +01:00
Ray
1046449339 ADDED: LoadFileData(), SaveFileData() 2020-02-26 20:29:33 +01:00
Ray
c5d5d19443 Remove trail spaces 2020-02-26 20:23:55 +01:00
Ray
0f783aab34 Remove TraceLog() dependency on standalone mode 2020-02-26 20:23:36 +01:00
Ray
7849db65e0 Remove TraceLog() dependency on standalone mode 2020-02-26 20:23:06 +01:00
Ray
9b5a796213 Use float math functions 2020-02-26 20:20:52 +01:00
Ray
32e374d941 [core] SetWindowSize() try to support PLATFORM_WEB -WIP- 2020-02-24 12:35:53 +01:00
Ray
113a580021 [rlgl] LoadText() variable scope improvement 2020-02-24 12:05:54 +01:00
Ray
a77273d8d8 Make sure current text buffer is empty #1109 2020-02-24 11:15:02 +01:00
Ray
310fd9b147 Update to latest emscripten toolchain
Corrected issue on web compilation
2020-02-22 17:21:10 +01:00
Ray
01d8642520 Merge branch 'master' of https://github.com/raysan5/raylib 2020-02-22 10:38:37 +01:00
Ray
30f3e49f3d Improve inputs on Android 2020-02-22 10:38:32 +01:00
Ray
0b8aded399 Support ToggleFullscreen() on web 2020-02-22 10:37:43 +01:00
Ray
d2aeafcf1e Update Makefile 2020-02-22 10:36:34 +01:00
Ray
81881a120c Comment tweak 2020-02-22 10:36:20 +01:00
Tyler Jessilynn Bezera
e7fdf8a13d Expand GLTF Model support (#1108)
* Update GLTF support to include loading color for albdeo (saved in the color value of the materialmap), support occlussion and emmission maps.. as well as some quality of life updates.

* clean up to use single image
2020-02-22 10:17:30 +01:00
Ray
a750bcceec Support links on WebAssembly 2020-02-21 01:13:41 +01:00
Ray
67d0bf75a7 Update Makefile paths to use emscripten upstream
Note that emscripten upstream branch implements the new asyncify implementation, expected to be faster than emterpreter one.
2020-02-20 23:00:29 +01:00
Ray
a8a21312e1 Removed TABS 2020-02-20 13:46:49 +01:00
Ray
42dad5df95 [rnet] Renamed some functions 2020-02-20 13:46:33 +01:00
Ray
e176a476c0 [rnet] Review network examples formatting 2020-02-20 12:42:37 +01:00
Ray
19390eaf09 [rnet] Examples review -WIP- 2020-02-19 18:16:20 +01:00
Ray
faff512140 [rnet] Convert to header-only
Some functions renamed
2020-02-19 18:15:59 +01:00
Ray
946a6cb280 Review mouse inputs 2020-02-19 12:44:57 +01:00
Ray
7d789763d6 Update API version 2020-02-19 12:35:30 +01:00
Ray
d62a2f793f Improved GetFPS() calculation for average 2020-02-19 12:20:15 +01:00
Ray
9eefcb7939 Update miniaudio.h 2020-02-19 12:19:41 +01:00
o3o
36bf8a60d8 Fix #1103 (#1104)
Fix 1102
2020-02-18 23:19:30 +01:00
Ray
6d1cdf25a7 [rnet] Review module formating
Align formating with other raylib modules coding style.
2020-02-18 18:15:22 +01:00
Ray
51db3b589d Review function name on RAUDIO_STANDALONE 2020-02-18 18:14:22 +01:00
Ray
b18940d3c6 Remove spaces 2020-02-18 18:03:28 +01:00
Ray
3f25c52a29 Some security checks in case music is not properly loaded 2020-02-18 16:30:52 +01:00
Ray
39e73ccc4d [text] TextLength() security check 2020-02-17 00:47:05 +01:00
Ray
df4b55d657 Comment fprintf() calls 2020-02-17 00:46:41 +01:00
Ray
80dbbef0f5 Update Notepad++ intellisense 2020-02-14 23:48:40 +01:00
Ray
23b75281ad Add function prototype 2020-02-14 23:10:02 +01:00
Ray
91b2dc2aa9 [raudio] ADDED: SetAudioStreamBufferSizeDefault()
There could be some cases where we need to define the internal audio buffer size, now it's possible.

RENAMED: InitAudioBuffer() to LoadAudioBuffer()
RENAMED: CloseAudioBuffer() to UnloadAudioBuffer()

Renamed some defines and reviewed some comments.
2020-02-14 17:13:37 +01:00
Ray
7459a5c6ef Remove "No Audio Buffer" traces 2020-02-14 11:44:50 +01:00
Ray
8820baf5cc Update miniaudio.h 2020-02-13 11:41:33 +01:00
Ray
3b3e163c48 [raudio] Corrected issue with OGG sound loading 2020-02-13 11:41:28 +01:00
Ray
83fb4613c1 Review some RPI issues 2020-02-13 00:13:56 +01:00
Ray
1b20182d33 Updated periodSize reference 2020-02-12 14:45:02 +01:00
Ray
7dfe42d6d0 Trace log comment review 2020-02-12 13:49:08 +01:00
Ray
55f0647213 [core] Avoid pixel bleeding issue on MSAA 2020-02-12 13:48:50 +01:00
Ray
484c6b360f Reviewed Cppcheck issues #1098 2020-02-12 13:16:18 +01:00
SasLuca
dec85f741a Fixed memory leaks in textures.c (#1097) 2020-02-11 22:25:27 +01:00
Ray
87d5b51256 REVIEWED: GetDirectoryPath()
Check if provided path is a full path containing system root letter: C:\
2020-02-11 19:12:49 +01:00
Ray
aa3b413390 SUPPORT_HALFBUSY_WAIT_LOOP 2020-02-11 19:01:29 +01:00
Ray
ee43a14f19 Update CHANGELOG 2020-02-11 16:52:52 +01:00
raysan5
64c23f8477 REVIEWED: VS2017.UWP project
It seems there is some problem on drawing... :(
2020-02-10 17:45:50 +01:00
raysan5
49145e90a2 Remove spacing 2020-02-10 13:16:34 +01:00
raysan5
28e12a6c6a [raudio] Update to latest miniaudio 0.10 2020-02-10 12:42:40 +01:00
raysan5
131132f17d Minor tweaks 2020-02-10 10:56:48 +01:00
raysan5
884e868e92 Review DEBUG trace log and custom allocators
Not exposing some data structures
2020-02-10 10:56:39 +01:00
raysan5
eb2483338f REVIEWED: Makefile, examples clean target #1087 2020-02-09 21:06:51 +01:00
raysan5
becd3c3831 REVIEWED: GenMeshCylinder(), solved issue #1088 2020-02-09 21:04:03 +01:00
raysan5
34fafb733f Corrected issue with toupper() usage 2020-02-09 16:11:32 +01:00
raysan5
90c129fd61 Review some libc dependency comments 2020-02-09 16:11:11 +01:00
raysan5
9922160ab4 Minor tweaks 2020-02-09 13:23:12 +01:00
Ray
1d324d5496 Update CHANGELOG 2020-02-07 18:02:09 +01:00
Ray
03c38396f3 Update CHANGELOG 2020-02-07 17:55:10 +01:00
Ray
85cecb2aae Update CHANGELOG for raylib 3.0 -WIP- 2020-02-07 17:39:29 +01:00
Ray
d15b93839b Update ROADMAP.md 2020-02-07 16:32:57 +01:00
Ray
b06497cad6 Update BINDINGS.md 2020-02-07 12:09:54 +01:00
Ray
f632e32100 Corrected typo 2020-02-07 12:09:34 +01:00
Ray
52a6d756f4 Added raylib-chibi binding 2020-02-07 12:09:05 +01:00
Ray
f4ca5b378a Review missing include 2020-02-06 18:10:52 +01:00
Ray
97054e4e0f Review ALL games to raylib 3.0 2020-02-06 18:07:25 +01:00
Ray
86bdf60887 Corrected issue with TextToUpper() and TextToLower()
This issue was breaking multiple things...
2020-02-06 17:52:33 +01:00
Ray
4b4f052fea Review game templates 2020-02-06 16:56:01 +01:00
Ray
2de92e3c07 Minor format tweaks 2020-02-06 16:44:04 +01:00
Ray
85e7856989 Update resource files 2020-02-06 16:37:38 +01:00
Ray
b4293edd70 Update GLFW to latest master 2020-02-06 16:30:48 +01:00
Ray
6c7685da3f Update external libraries 2020-02-06 16:29:57 +01:00
Ray
ea40bda88c Added func used in comments 2020-02-04 17:52:40 +01:00
Ray
1184db83f7 Review GetCurrentTime() 2020-02-04 17:06:08 +01:00
Ray
ca600b44a0 Update gestures.h 2020-02-04 17:02:06 +01:00
Ray
b5fe41f41a Review libc dependencies and remove when possible
Just for clarification, no plans to remove libc dependency, just did some code analysis to see how much raylib depend on stardard C library. My conclusions:

 - stdlib.h: primary dependency is for malloc() and free()
 - stdio.h: primary dependency is for FILE access, maybe it could go through a custom ABI?
 - string.h: just around 8 functions required
 - math.h: just around 8 functions required
 - others: 1-2 functions required for some other headers
2020-02-04 16:55:24 +01:00
Ray
3cd9e3896a tweak 2020-02-04 15:43:14 +01:00
David Reid
7024628c65 Update to miniaudio 0.10 (#1092)
* Update to miniaudio 0.10

This replaces the old ma_pcm_converter with ma_data_converter.

At this time of this commit, miniaudio 0.10 is still in the testing
phase. To make it easier to update miniaudio.h during this period, I've
temporarily moved the @raysan5 Win32 customizations to raudio.c because
there may be quite a few updates to miniaudio.h during this time.

* Use miniaudio's built-in volume control.
2020-02-04 13:43:31 +01:00
Ray
d2bb6185f1 Review issue with RLGL TraceLog() 2020-02-03 20:20:00 +01:00
Ray
c3f06b7470 Remove all trail spaces 2020-02-03 19:26:28 +01:00
Ray
a7afd8de99 Update rlgl.h 2020-02-03 19:25:05 +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
702 changed files with 97613 additions and 81502 deletions

1
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1 @@
blank_issues_enabled: false

View File

@@ -7,6 +7,16 @@ assignees: ''
---
**WARNING: Please, read this note carefully before submitting a new issue:**
It is important to realise that **this is NOT A SUPPORT FORUM**, this is for reproducible BUGS with raylib ONLY.
There are lots of generous and helpful people ready to help you out on [raylib Discord forum](https://discord.gg/VkzNHUE) or [raylib reddit](https://www.reddit.com/r/raylib/).
Remember that asking for support questions here actively takes developer time away from improving raylib.
---
Please, before submitting a new issue verify and check:
- [ ] I tested it on latest raylib version from master branch

72
.github/workflows/android.yml vendored Normal file
View File

@@ -0,0 +1,72 @@
name: Android
on:
push:
pull_request:
release:
types: [published]
jobs:
build:
runs-on: windows-latest
strategy:
fail-fast: false
max-parallel: 1
matrix:
ARCH: ["arm64", "x86_64"]
env:
RELEASE_NAME: raylib-dev_android_api29_${{ matrix.ARCH }}
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup Release Version
run: |
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_android_api29_${{ matrix.ARCH }}" >> $GITHUB_ENV
shell: bash
if: github.event_name == 'release' && github.event.action == 'published'
- name: Setup Environment
run: |
mkdir build
cd build
mkdir ${{ env.RELEASE_NAME }}
cd ${{ env.RELEASE_NAME }}
mkdir include
mkdir lib
cd ../..
# Generating static + shared library for 64bit arquitectures and API version 29
- name: Build Library
run: |
cd src
make PLATFORM=PLATFORM_ANDROID ANDROID_ARCH=${{ matrix.ARCH }} ANDROID_API_VERSION=29 ANDROID_NDK="C:\PROGRA~2\Android\android-sdk\ndk-bundle" RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib"
make PLATFORM=PLATFORM_ANDROID ANDROID_ARCH=${{ matrix.ARCH }} ANDROID_API_VERSION=29 ANDROID_NDK="C:\PROGRA~2\Android\android-sdk\ndk-bundle" RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
cd ..
shell: cmd
- name: Generate Artifacts
run: |
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
cd build
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ env.RELEASE_NAME }}.tar.gz
path: ./build/${{ env.RELEASE_NAME }}.tar.gz
- name: Upload Artifact to Release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/${{ env.RELEASE_NAME }}.tar.gz
asset_name: ${{ env.RELEASE_NAME }}.tar.gz
asset_content_type: application/gzip
if: github.event_name == 'release' && github.event.action == 'published'

View File

@@ -1,30 +0,0 @@
name: CD - Source Build & Release - Linux
# Trigger the workflow on release publish
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
# TODO: Build project and zip generated files
- name: Build project
id: build_project
run: |
zip raylib.zip README.md
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./raylib.zip
asset_name: raylib.zip
asset_content_type: application/zip

View File

@@ -1,18 +0,0 @@
name: CI - Source & Examples - Linux
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: apt-update
run: sudo apt-get update -qq
- name: apt get glfw
run: sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev
- name: make src
run: cd src && make PLATFORM=PLATFORM_DESKTOP
- name: make examples
run: cd examples && make PLATFORM=PLATFORM_DESKTOP

View File

@@ -1,13 +0,0 @@
name: CI - Source & Examples - macOS
on: [push, pull_request]
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: make src
run: cd src && make PLATFORM=PLATFORM_DESKTOP
- name: make examples
run: cd examples && make PLATFORM=PLATFORM_DESKTOP

View File

@@ -1,64 +0,0 @@
name: CI - Source & Examples - Windows
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
strategy:
fail-fast: false
max-parallel: 1
matrix:
compiler: [mingw, msvc16]
bits: [32, 64]
include:
- compiler: mingw
bits: 32
CFLAGS: -m32
GENERATOR: "MinGW Makefiles"
- compiler: mingw
bits: 64
CFLAGS: -m64
GENERATOR: "MinGW Makefiles"
- compiler: msvc16
bits: 32
GENERATOR: "Visual Studio 16 2019"
ARCH: "-A Win32"
- compiler: msvc16
bits: 64
GENERATOR: "Visual Studio 16 2019"
ARCH: "-A x64"
env:
CFLAGS: ${{ matrix.CFLAGS }}
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup Environment
run: |
mkdir build
cd build
# Trying to solve an issue with CMake and Chocolatey for MinGW
- run: cmake -E remove c:\ProgramData\chocolatey\bin\cpack.exe
if: matrix.compiler == 'mingw'
# Setup MSBuild.exe path if required
- uses: warrenbuckley/Setup-MSBuild@v1
if: matrix.compiler == 'msvc16'
- name: Build MinGW Project
run: |
cd ../raylib/src
make PLATFORM=PLATFORM_DESKTOP CC=gcc
if: matrix.compiler == 'mingw'
- name: Setup CMake Project
run: cmake -G "${{ matrix.GENERATOR }}" ${{ matrix.ARCH }} -DCMAKE_SH="CMAKE_SH-NOTFOUND" -DSTATIC=ON -DSHARED=ON -DBUILD_EXAMPLES=ON -DBUILD_GAMES=OFF -DINCLUDE_EVERYTHING=ON ../raylib
if: matrix.compiler == 'msvc16'
- name: Build raylib Source & Examples
run: cmake --build . --target install
if: matrix.compiler == 'msvc16'

92
.github/workflows/linux.yml vendored Normal file
View File

@@ -0,0 +1,92 @@
name: Linux
on:
push:
pull_request:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 1
matrix:
bits: [32, 64]
include:
- bits: 32
ARCH: "i386"
ARCH_NAME: "i386"
COMPILER_PATH: "/user/bin"
- bits: 64
ARCH: "x86_64"
ARCH_NAME: "amd64"
COMPILER_PATH: "/user/bin"
env:
RELEASE_NAME: raylib-dev_linux_${{ matrix.ARCH_NAME }}
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Setup Release Version
run: |
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_linux_${{ matrix.ARCH_NAME }}" >> $GITHUB_ENV
shell: bash
if: github.event_name == 'release' && github.event.action == 'published'
- name: Setup Environment
run: |
sudo apt-get update -qq
sudo apt-get install gcc-multilib
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev
mkdir build
cd build
mkdir ${{ env.RELEASE_NAME }}
cd ${{ env.RELEASE_NAME }}
mkdir include
mkdir lib
cd ../../../raylib
# ${{ matrix.ARCH }}-linux-gnu-gcc -v
# TODO: Support 32bit (i386) shared library building
- name: Build Library
run: |
cd src
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" CFLAGS="-m32"
# make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
cd ..
if: matrix.bits == 32
- name: Build Library
run: |
cd src
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib"
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
cd ..
if: matrix.bits == 64
- name: Generate Artifacts
run: |
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
cd build
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ env.RELEASE_NAME }}.tar.gz
path: ./build/${{ env.RELEASE_NAME }}.tar.gz
- name: Upload Artifact to Release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/${{ env.RELEASE_NAME }}.tar.gz
asset_name: ${{ env.RELEASE_NAME }}.tar.gz
asset_content_type: application/gzip
if: github.event_name == 'release' && github.event.action == 'published'

77
.github/workflows/macos.yml vendored Normal file
View File

@@ -0,0 +1,77 @@
name: macOS
on:
push:
pull_request:
release:
types: [published]
jobs:
build:
runs-on: macos-latest
env:
RELEASE_NAME: raylib-dev_macos
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup Release Version
run: |
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_macos" >> $GITHUB_ENV
shell: bash
if: github.event_name == 'release' && github.event.action == 'published'
- name: Setup Environment
run: |
mkdir build
cd build
mkdir ${{ env.RELEASE_NAME }}
cd ${{ env.RELEASE_NAME }}
mkdir include
mkdir lib
cd ../..
# Generating static + shared library, note that i386 architecture is deprecated
# Defining GL_SILENCE_DEPRECATION because OpenGL is deprecated on macOS
# TODO: Support Universal ARCH libraries (build arm64 + x86_64 and merge)
- name: Build Library
run: |
cd src
clang --version
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION"
# make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC RAYLIB_LIB_NAME=raylib_x86_64 CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION"
# make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC RAYLIB_LIB_NAME=raylib_arm64 CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" -B
# lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.a libraylib_x86_64.a libraylib_arm64.a
make clean
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION"
# make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED RAYLIB_LIB_NAME=raylib_x86_64 CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION" -B
# make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED RAYLIB_LIB_NAME=raylib_arm64 CFLAGS="-target i686-apple-macos -DGL_SILENCE_DEPRECATION" -B
# lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.3.1.0.dylib libraylib_x86_64.3.1.0.dylib libraylib_arm64.3.1.0.dylib
# cp -v ./libraylib_arm64.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.dylib
# cp -v ./libraylib_arm64.310.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.310.dylib
cd ..
- name: Generate Artifacts
run: |
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
cd build
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ env.RELEASE_NAME }}.tar.gz
path: ./build/${{ env.RELEASE_NAME }}.tar.gz
- name: Upload Artifact to Release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/${{ env.RELEASE_NAME }}.tar.gz
asset_name: ${{ env.RELEASE_NAME }}.tar.gz
asset_content_type: application/gzip
if: github.event_name == 'release' && github.event.action == 'published'

72
.github/workflows/webassembly.yml vendored Normal file
View File

@@ -0,0 +1,72 @@
name: WebAssembly
on:
push:
pull_request:
release:
types: [published]
jobs:
build:
runs-on: windows-latest
env:
RELEASE_NAME: raylib-dev_webassembly
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v7
with:
version: 2.0.0
actions-cache-folder: 'emsdk-cache'
- name: Setup Release Version
run: |
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_webassembly" >> $GITHUB_ENV
shell: bash
if: github.event_name == 'release' && github.event.action == 'published'
- name: Setup Environment
run: |
mkdir build
cd build
mkdir ${{ env.RELEASE_NAME }}
cd ${{ env.RELEASE_NAME }}
mkdir include
mkdir lib
cd ../..
- name: Build Library
run: |
cd src
emcc -v
make PLATFORM=PLATFORM_WEB EMSDK_PATH="D:/a/raylib/raylib/emsdk-cache/emsdk-master" RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib"
cd ..
- name: Generate Artifacts
run: |
copy /Y .\src\raylib.h .\build\${{ env.RELEASE_NAME }}\include\raylib.h
cd build
7z a ./${{ env.RELEASE_NAME }}.zip ./${{ env.RELEASE_NAME }}
dir
shell: cmd
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ env.RELEASE_NAME }}.zip
path: ./build/${{ env.RELEASE_NAME }}.zip
- name: Upload Artifact to Release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/${{ env.RELEASE_NAME }}.zip
asset_name: ${{ env.RELEASE_NAME }}.zip
asset_content_type: application/zip
if: github.event_name == 'release' && github.event.action == 'published'

116
.github/workflows/windows.yml vendored Normal file
View File

@@ -0,0 +1,116 @@
name: Windows
on:
push:
pull_request:
release:
types: [published]
jobs:
build:
runs-on: windows-latest
strategy:
fail-fast: false
max-parallel: 1
matrix:
compiler: [mingw-w64, msvc16]
bits: [32, 64]
include:
- compiler: mingw-w64
bits: 32
ARCH: "i686"
COMPILER_PATH: "C:\\msys64\\mingw32\\bin"
WINDRES_ARCH: pe-i386
- compiler: mingw-w64
bits: 64
ARCH: "x86_64"
COMPILER_PATH: "C:\\msys64\\mingw64\\bin"
WINDRES_ARCH: pe-x86-64
- compiler: msvc16
bits: 32
ARCH: "x86"
VSBINPATH: "Win32"
- compiler: msvc16
bits: 64
ARCH: "x64"
VSBINPATH: "x64"
env:
RELEASE_NAME: raylib-dev_win${{ matrix.bits }}_${{ matrix.compiler }}
GNUTARGET: default
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup Release Version
run: |
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_win${{ matrix.bits }}_${{ matrix.compiler }}" >> $GITHUB_ENV
shell: bash
if: github.event_name == 'release' && github.event.action == 'published'
- name: Setup Environment
run: |
dir
mkdir build
cd build
mkdir ${{ env.RELEASE_NAME }}
cd ${{ env.RELEASE_NAME }}
mkdir include
mkdir lib
cd ../../../raylib
# Setup MSBuild.exe path if required
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.0.2
if: matrix.compiler == 'msvc16'
- name: Build Library (MinGW-w64)
run: |
cd src
set PATH=%PATH%;${{ matrix.COMPILER_PATH }}
${{ matrix.ARCH }}-w64-mingw32-gcc.exe --version
${{ matrix.COMPILER_PATH }}/windres.exe --version
make PLATFORM=PLATFORM_DESKTOP CC=${{ matrix.ARCH }}-w64-mingw32-gcc.exe RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib"
${{ matrix.COMPILER_PATH }}/windres.exe -i raylib.dll.rc -o raylib.dll.rc.data -O coff --target=${{ matrix.WINDRES_ARCH }}
make PLATFORM=PLATFORM_DESKTOP CC=${{ matrix.ARCH }}-w64-mingw32-gcc.exe RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
cd ..
shell: cmd
if: matrix.compiler == 'mingw-w64'
- name: Build Library (MSVC16)
run: |
cd projects/VS2017
msbuild.exe raylib.sln /target:raylib /property:Configuration=Release /property:Platform=${{ matrix.ARCH }}
copy /Y .\bin\${{ matrix.VSBINPATH }}\Release\raylib.lib .\..\..\build\${{ env.RELEASE_NAME }}\lib\raylib.lib
msbuild.exe raylib.sln /target:raylib /property:Configuration=Release.DLL /property:Platform=${{ matrix.ARCH }}
copy /Y .\bin\${{ matrix.VSBINPATH }}\Release.DLL\raylib.dll .\..\..\build\${{ env.RELEASE_NAME }}\lib\raylib.dll
copy /Y .\bin\${{ matrix.VSBINPATH }}\Release.DLL\raylib.lib .\..\..\build\${{ env.RELEASE_NAME }}\lib\raylibdll.lib
cd ../..
shell: cmd
if: matrix.compiler == 'msvc16'
- name: Generate Artifacts
run: |
copy /Y .\src\raylib.h .\build\${{ env.RELEASE_NAME }}\include\raylib.h
cd build
7z a ./${{ env.RELEASE_NAME }}.zip ./${{ env.RELEASE_NAME }}
dir
shell: cmd
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ env.RELEASE_NAME }}.zip
path: ./build/${{ env.RELEASE_NAME }}.zip
- name: Upload Artifact to Release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/${{ env.RELEASE_NAME }}.zip
asset_name: ${{ env.RELEASE_NAME }}.zip
asset_content_type: application/zip
if: github.event_name == 'release' && github.event.action == 'published'

44
.gitignore vendored
View File

@@ -30,16 +30,14 @@ Thumbs.db
*.cache
*.ilk
*.log
.vs
[Bb]in
[Dd]ebug/
[Dd]ebug.win32/
[Dd]ebug.DLL/
*.sbr
*.sdf
obj/
[R]elease/
[Rr]elease.win32/
_ReSharper*/
[Tt]est[Rr]esult*
ipch/
@@ -54,7 +52,6 @@ packages/
*.a
*.bc
*.so
!raylib.rc.o
# Ignore all examples files
examples/*
@@ -62,7 +59,6 @@ examples/*
!examples/*/
# Unignore all examples files with extension
!examples/*.c
!examples/*.lua
!examples/*.png
# Unignore examples Makefile
!examples/Makefile
@@ -70,18 +66,6 @@ examples/*
!examples/raylib_compile_execute.bat
!examples/raylib_makefile_example.bat
# Ignore all games files
games/*
# Unignore all games dirs
!games/*/
# Unignore all games files with extension
!games/*.c
!games/*.lua
!games/*.png
# Unignore games makefile
!games/Makefile
!games/Makefile.Android
# Ignore files build by xcode
*.mode*v*
*.pbxuser
@@ -96,45 +80,25 @@ xcschememanagement.plist
xcuserdata/
DerivedData/
# Visual Studio project
project/VS2015.UWP/packages
project/VS2017/packages
# Web examples
docs/examples/web/*.html
docs/examples/web/*/*.html
!docs/examples/web/loader.html
!docs/examples/web/core/loader.html
!docs/examples/web/shapes/loader.html
!docs/examples/web/text/loader.html
!docs/examples/web/textures/loader.html
!docs/examples/web/audio/loader.html
!docs/examples/web/physac/loader.html
!docs/examples/web/shaders/loader.html
!docs/examples/web/models/loader.html
# Jetbrains project
.idea/
cmake-build-debug/
# CMake stuff
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
TestingIfSymlinkWorks
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
build
!templates/android_project/Makefile
# Unignore These makefiles...
!examples/CMakeLists.txt
!games/CMakeLists.txt
# Ignore Android generated files and folders
templates/android_project/output
# Ignore GNU global tags
GPATH
GRTAGS
GTAGS
.vs

View File

@@ -1,166 +0,0 @@
language: c
dist: trusty
git:
depth: 3
# TODO we could use a 32 bit Docker container for running true 32-bit tests
services:
- docker
matrix:
include:
- os: linux
env: ARCH=i386
sudo: required
- os: linux
env: ARCH=amd64 INSTALL_GLFW=YES USE_EXTERNAL_GLFW=OFF
sudo: required
- os: linux
env: ARCH=amd64 INSTALL_GLFW=YES STATIC=OFF RELEASE=NO
sudo: required
- os: linux
env: WAYLAND=ON ARCH=amd64 RELEASE=NO
sudo: required
addons:
apt:
packages:
- libwayland-dev
- libxkbcommon-dev
- libegl1-mesa-dev
- os: osx
env: ARCH=universal
- os: osx
osx_image: xcode9.4
env: ARCH=universal SHARED=OFF RELEASE=NO
- os: linux
env: ARCH=arm64-android RELEASE=NO
sudo: required
- os: linux
env: ARCH=arm32-android RELEASE=NO
sudo: required
- os: linux
env: ARCH=html5 RELEASE=NO
sudo: required
- os: windows
compiler: gcc
env: ARCH=i386 SHARED=OFF RELEASE=NO
before_script:
before_install:
- if [ -z "$USE_EXTERNAL_GLFW" ]; then export USE_EXTERNAL_GLFW=IF_POSSIBLE; fi
- if [ -z "$SHARED" ]; then export SHARED=ON ; fi
- if [ -z "$STATIC" ]; then export STATIC=ON ; fi
- if [[ "$INSTALL_GLFW" == "YES" && "$USE_EXTERNAL_GLFW" != "OFF" ]]; then
export DONT_TEST=1;
fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
if [[ "$ARCH" == *-android ]]; then
export DONT_TEST=1;
export RAYLIB_PACKAGE_SUFFIX="-Android-arm64";
wget https://dl.google.com/android/repository/android-ndk-r17-linux-x86_64.zip;
unzip -qq android-ndk*.zip;
if [[ "$ARCH" == arm64-* ]]; then
export RAYLIB_PACKAGE_SUFFIX="-Android-arm64";
TOOLCHAIN_ARCH=arm64;
PREFIX=aarch64-linux-android-;
else
export RAYLIB_PACKAGE_SUFFIX="-Android-arm32";
TOOLCHAIN_ARCH=arm;
PREFIX=arm-linux-androideabi-;
fi;
android-ndk*/build/tools/make_standalone_toolchain.py --arch $TOOLCHAIN_ARCH --api 21 --install-dir /tmp/android-toolchain;
export PATH=/tmp/android-toolchain/bin:$PATH;
export CC=${PREFIX}clang;
export CXX=${PREFIX}clang++;
export CMAKE_ARCH_ARGS='-DPLATFORM=Android';
elif [ "$ARCH" == "html5" ]; then
export DONT_TEST=1;
export RAYLIB_PACKAGE_SUFFIX="-html5";
docker run --privileged=true -dit --name emscripten -v $(pwd):/src trzeci/emscripten:sdk-incoming-64bit bash;
export CMAKE_ARCH_ARGS='-DPLATFORM=Web -DCMAKE_TOOLCHAIN_FILE=../cmake/emscripten.cmake';
RUNNER='docker exec -it emscripten cmake -E chdir build';
else
sudo apt-get install -y gcc-multilib
libasound2-dev:$ARCH
libxcursor-dev:$ARCH libxinerama-dev:$ARCH mesa-common-dev:$ARCH
libx11-dev:$ARCH libxrandr-dev:$ARCH libxrandr2:$ARCH libxi-dev:$ARCH
libgl1-mesa-dev:$ARCH libglu1-mesa-dev:$ARCH;
if [ "$OPENAL" == "ON" ]; then sudo apt-get install -y libopenal-dev; fi;
if [ "$ARCH" == "i386" ]; then export CMAKE_ARCH_ARGS='-DCMAKE_C_FLAGS=-m32 -DCMAKE_SYSTEM_LIBRARY_PATH=/usr/lib/i386-linux-gnu -DSUPPORT_FILEFORMAT_FLAC=OFF'; fi;
export RAYLIB_PACKAGE_SUFFIX="-Linux-$ARCH";
if [ "$INSTALL_GLFW" == "YES" ]; then
pushd src/external/glfw;
cmake . -DGLFW_BUILD_DOCS=OFF
-DGLFW_BUILD_TESTS=OFF
-DGLFW_BUILD_EXAMPLES=OFF
-DGLFW_INSTALL=ON
-DBUILD_SHARED_LIBS=ON
-DGLFW_USE_WAYLAND=$WAYLAND;
make;
sudo make install;
popd;
fi;
fi;
fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
export RAYLIB_PACKAGE_SUFFIX="-macOS";
if [ "$INSTALL_GLFW" == "YES" ]; then brew update; brew install glfw; fi;
fi
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then
export DONT_TEST=1;
export RAYLIB_PACKAGE_SUFFIX="-windows";
export CMAKE_ARCH_ARGS='-DPLATFORM=Desktop';
fi
- mkdir build
- $RUNNER $CC --version
script:
- cd build
- if test -n "$WAYLAND"; then
wget https://mirrors.edge.kernel.org/ubuntu/pool/universe/e/extra-cmake-modules/extra-cmake-modules_5.44.0-0ubuntu1_amd64.deb;
sudo apt-get clean;
sudo apt-get update;
sudo apt-get install dpkg;
sudo dpkg -i extra-cmake-modules_5.44.0-0ubuntu1_amd64.deb;
git clone git://anongit.freedesktop.org/wayland/wayland-protocols;
pushd wayland-protocols;
git checkout 1.15 && ./autogen.sh --prefix=/usr && make && sudo make install;
popd;
fi
- $RUNNER cmake $CMAKE_ARCH_ARGS
-DMACOS_FATLIB=ON
-DSTATIC=$STATIC -DSHARED=$SHARED
-DBUILD_EXAMPLES=ON -DBUILD_GAMES=ON
-DUSE_EXTERNAL_GLFW=$USE_EXTERNAL_GLFW
-DUSE_WAYLAND=$WAYLAND
-DINCLUDE_EVERYTHING=ON
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
..
- $RUNNER cmake --build . --target
- if [ "$RELEASE" != "NO" ]; then $RUNNER cmake --build . --target package; fi
- if [ -n "$RUNNER" ]; then
sudo $RUNNER cmake --build . --target install;
else
$(which sudo) $RUNNER "$(which cmake)" --build . --target install;
fi
- if [ ! "$DONT_TEST" ]; then
pkg-config --static --libs raylib;
nm -g release/libraylib.a | grep glfwGetProcAddress || (echo "libraylib.a doesn't contain GLFW symbols! Aborting..." && false);
ctest --output-on-failure;
fi
deploy:
provider: releases
api_key:
secure: LvqUIAN/3dJul+Ra2iK3tSaNG5IwsNMmGIwVMy0DK5IBCxiQPBc9pWGiE30RTBPt6Z+N4BhMEE8DtUl+vnISlMoHWNIIhF2zwC66hs/F7zY7qEITMRSmfiLcqxQysknFOnJB06CATgXcFqlEo9j+t4abrG/f3qcb92J4O2uNz336Au2myTx93Q5MxbyA7KiUuEutFnb2dWiPCY4d+sGeXEfsiD2R7aj/8MaWOkoGdZVrTkI9juMgvpImkjQBArvqdjUMeT3MsRrwgOIq5v2GFV9dOl8k1WzPeT8B2JHh00ed/o1/wuFq/cLLOxtYo2+Pv3+xatOrlexoX0WkDm7C9/L1W5U4rLexU3CQ9mMBmHPnp6k/WXZ5QXEE4uUF0+LpN3XlIXzFpdZmZiVV8VLxg2WvyncMmivYiu7/MTkyfZxyKkzwl7sZZslzHA9kOGedGaN7b7/2B77OFHoQK8lKfdFml7jJnarh+89nenNZYMab0E8qkOJOyb2bYlDTa0/2nyxGiyymYgq6YHLNrDbhqB/1LzdgzjMliQ8ri5q9Ux2vjfcqOzhfAmcwFwnY/D6yXJWYi0DWpHZdpKl3du6dYDrypW91/yDWbwiJ/YhrE7ZunzrcB6GH/QkbuzWxdCth39rQAHih8DG01co/K3Gvi4yGjvIH5tFUpyEolMnpMiA=
file_glob: true
file: raylib-*.tar.gz
skip_cleanup: true
on:
repo: raysan5/raylib
branch: master
tags: true

View File

@@ -1,64 +1,98 @@
### raylib bindings
## raylib bindings
Some people ported raylib to other languages in form of bindings or wrappers to the library, here is a list with the ones I'm aware of:
Some people ported raylib to other languages in form of bindings or wrappers to the library.
| name | language | repo |
|:------------------:|:--------------:|----------------------------------------------------------------------|
| raylib | C | https://github.com/raysan5/raylib |
| raylib-cpp | C++ | https://github.com/robloach/raylib-cpp |
| Raylib-cs | C# | https://github.com/ChrisDill/Raylib-cs |
| RaylibSharp | C# | https://github.com/TheLumaio/RaylibSharp |
| RaylibFS | F# | https://github.com/dallinbeutler/RaylibFS |
| raylib_d | D | https://github.com/0xFireball/raylib_d |
| raylib-d | D | https://github.com/onroundit/raylib-d |
| raylib-go | Go | https://github.com/gen2brain/raylib-go |
| raylib-goplus | Go | https://github.com/Lachee/raylib-goplus |
| raylib-rs | Rust | https://github.com/deltaphc/raylib-rs |
| raylib-lua | Lua | https://github.com/raysan5/raylib-lua |
| raylib-lua-ffi | Lua | https://github.com/raysan5/raylib/issues/693 |
| raylib-lua-sol | Lua | https://github.com/RobLoach/raylib-lua-sol |
| raylib-Nim | Nim | https://gitlab.com/define-private-public/raylib-Nim |
| raylib-nim | Nim | https://github.com/Skrylar/raylib-nim |
| raylib-haskell | Haskell | https://github.com/DevJac/raylib-haskell |
| raylib-cr | Crystal | https://github.com/AregevDev/raylib-cr |
| cray | Crystal | https://gitlab.com/Zatherz/cray |
| cray | Crystal | https://github.com/tapgg/cray |
| raylib-pascal | Pascal | https://github.com/drezgames/raylib-pascal |
| raylib-pas | Pascal | https://github.com/tazdij/raylib-pas |
| Graphics-Raylib | Perl | https://github.com/athreef/Graphics-Raylib |
| raylib-ruby-ffi | Ruby | https://github.com/D3nX/raylib-ruby-ffi |
| raylib-ruby | Ruby | https://github.com/a0/raylib-ruby |
| raylib-mruby | mruby | https://github.com/lihaochen910/raylib-mruby |
| raylib-py | Python | https://github.com/overdev/raylib-py |
| raylib-python-cffi | Python | https://github.com/electronstudio/raylib-python-cffi |
| raylib-java | Java | https://github.com/XoanaIO/raylib-java |
| node-raylib | Node.js | https://github.com/RobLoach/node-raylib |
| QuickJS-raylib | QuickJS | https://github.com/sntg-p/QuickJS-raylib |
| raylib-js | JavaScript | https://github.com/RobLoach/raylib-js |
| raylib-chaiscript | ChaiScript | https://github.com/RobLoach/raylib-chaiscript |
| raylib-squirrel | Squirrel | https://github.com/RobLoach/raylib-squirrel |
| racket-raylib-2d | Racket | https://github.com/arvyy/racket-raylib-2d |
| raylib-php | PHP | https://github.com/joseph-montanez/raylib-php |
| raylib-php-ffi | PHP | https://github.com/oraoto/raylib-php-ffi |
| raylib-phpcpp | PHP | https://github.com/oraoto/raylib-phpcpp |
| raylib-factor | Factor | https://github.com/Silverbeard00/raylib-factor |
| raylib-haxe | Haxe | https://github.com/ibilon/raylib-haxe |
| ringraylib | Ring | https://github.com/ringpackages/ringraylib |
| cl-raylib | Common Lisp | https://github.com/longlene/cl-raylib |
| raylib-scm | Chicken Scheme | https://github.com/yashrk/raylib-scm |
| Euraylib | Euphoria | https://github.com/gAndy50/Euraylib |
| raylib-wren | Wren | https://github.com/TSnake41/raylib-wren |
| raylib-odin | Odin | https://github.com/kevinw/raylib-odin |
| ray.zig | Zig | https://github.com/BitPuffin/zig-raylib-experiments |
| raylib-Ada | Ada | https://github.com/mimo/raylib-Ada |
| jaylib | Janet | https://github.com/janet-lang/jaylib |
| raykit | Kit | https://github.com/Gamerfiend/raykit |
| vraylib | V | https://github.com/MajorHard/vraylib |
| raylib.cbl | COBOL | *[code examples](https://github.com/Martinfx/Cobol/tree/master/OpenCobol/Games/raylib)* |
Here it is a list with the ones I'm aware of:
Missing some language? Check the [bindings not yet in this list](https://gist.github.com/raysan5/5764cc5b885183f523fce47f098f3d9b#bindings-not-yet-in-the-official-list) or create a new binding! :)
| name | raylib version | language | repo |
|:------------------:|:-------------: | :--------:|----------------------------------------------------------------------|
| raylib | **3.1-dev** | [C](https://en.wikipedia.org/wiki/C_(programming_language)) | https://github.com/raysan5/raylib |
| raylib-cpp | 3.1-dev | [C++](https://en.wikipedia.org/wiki/C%2B%2B) | https://github.com/robloach/raylib-cpp |
| Raylib-cs | 3.0 | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | https://github.com/ChrisDill/Raylib-cs |
| raylib-cppsharp | 2.5 | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | https://github.com/phxvyper/raylib-cppsharp |
| raylib-boo | 3.0 | [Boo](http://boo-language.github.io/) | https://github.com/Rabios/raylib-boo |
| RaylibFS | 2.5 | [F#](https://fsharp.org/) | https://github.com/dallinbeutler/RaylibFS |
| raylib_d | 2.5 | [D](https://dlang.org/) | https://github.com/Sepheus/raylib_d |
| raylib-d | 3.0 | [D](https://dlang.org/) | https://github.com/onroundit/raylib-d |
| bindbc-raylib | 3.0 | [D](https://dlang.org/) | https://github.com/o3o/bindbc-raylib |
| dray | 3.0 | [D](https://dlang.org/) | https://github.com/xdrie/dray |
| raylib-go | 3.0 | [Go](https://golang.org/) | https://github.com/gen2brain/raylib-go |
| raylib-goplus | 2.6-dev | [Go](https://golang.org/) | https://github.com/Lachee/raylib-goplus |
| ray-go | 2.6-dev | [Go](https://golang.org/) | https://github.com/hecate-tech/ray-go |
| go-raylib | 3.1-dev | [Go](https://golang.org/) | https://github.com/chunqian/go-raylib |
| raylib-rs | 3.0 | [Rust](https://www.rust-lang.org/) | https://github.com/deltaphc/raylib-rs |
| raylib-lua | 1.7 | [Lua](http://www.lua.org/) | https://github.com/raysan5/raylib-lua |
| raylib-lua-ffi | 2.0 | [Lua](http://www.lua.org/) | https://github.com/raysan5/raylib/issues/693 |
| raylib-lua-sol | 2.5 | [Lua](http://www.lua.org/) | https://github.com/RobLoach/raylib-lua-sol |
| raylib-lua | 3.0 | [Lua](http://www.lua.org/) | https://github.com/TSnake41/raylib-lua |
| raylib-luamore | 3.0 | [Lua](http://www.lua.org/) | https://github.com/HDPLocust/raylib-luamore |
| raylua | 3.0 | [Lua](http://www.lua.org/) | https://github.com/Rabios/raylua |
| LuaJIT-Raylib | 2.6 | [Lua](http://www.lua.org/) | https://github.com/Bambofy/LuaJIT-Raylib |
| raylib-nelua | 3.0 | [Nelua](https://nelua.io/) | https://github.com/Andre-LA/raylib-nelua |
| raylib-Nim | ? | [Nim](https://nim-lang.org/) | https://gitlab.com/define-private-public/raylib-Nim |
| raylib-nim | 2.0 | [Nim](https://nim-lang.org/) | https://github.com/Skrylar/raylib-nim |
| raylib-Forever | 3.1-dev | [Nim](https://nim-lang.org/) | https://github.com/Guevara-chan/Raylib-Forever |
| nim-raylib | 3.1-dev | [Nim](https://nim-lang.org/) | https://github.com/tomc1998/nim-raylib |
| raylib-haskell | 2.0 | [Haskell](https://www.haskell.org/) | https://github.com/DevJac/raylib-haskell |
| raylib-cr | ? | [Crystal](https://crystal-lang.org/) | https://github.com/AregevDev/raylib-cr |
| cray | 1.8 | [Crystal](https://crystal-lang.org/) | https://gitlab.com/Zatherz/cray |
| raylib.cr | ? | [Crystal](https://crystal-lang.org/) | https://github.com/sam0x17/raylib.cr |
| raylib-pascal | 2.0 | [Pascal](https://en.wikipedia.org/wiki/Pascal_(programming_language)) | https://github.com/drezgames/raylib-pascal |
| raylib-pas | 3.0 | [Pascal](https://en.wikipedia.org/wiki/Pascal_(programming_language)) | https://github.com/tazdij/raylib-pas |
| Graphics-Raylib | ? | [Perl](https://www.perl.org/) | https://github.com/athreef/Graphics-Raylib |
| raylib-ruby-ffi | ? | [Ruby](https://www.ruby-lang.org/en/) | https://github.com/D3nX/raylib-ruby-ffi |
| raylib-ruby | 2.6 | [Ruby](https://www.ruby-lang.org/en/) | https://github.com/a0/raylib-ruby |
| raylib-mruby | ? | [mruby](https://github.com/mruby/mruby) | https://github.com/lihaochen910/raylib-mruby |
| raylib-py | 2.0 | [Python](https://www.python.org/) | https://github.com/overdev/raylib-py |
| raylib-python-cffi | 3.1-dev | [Python](https://www.python.org/) | https://github.com/electronstudio/raylib-python-cffi |
| raylib-py-ctbg | 2.6 | [Python](https://www.python.org/) | https://github.com/overdev/raylib-py-ctbg |
| jaylib | 3.0 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | https://github.com/electronstudio/jaylib/ |
| raylib-java | 2.0 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | https://github.com/XoanaIO/raylib-java |
| clj-raylib | ? | [Clojure](https://clojure.org/) | https://github.com/lsevero/clj-raylib |
| node-raylib | 3.0 | [Node.js](https://nodejs.org/en/) | https://github.com/RobLoach/node-raylib |
| QuickJS-raylib | 3.0 | [QuickJS](https://bellard.org/quickjs/) | https://github.com/sntg-p/QuickJS-raylib |
| raylib-js | 2.6 | [JavaScript](https://en.wikipedia.org/wiki/JavaScript) | https://github.com/RobLoach/raylib-js |
| raylib-chaiscript | 2.6 | [ChaiScript](http://chaiscript.com/) | https://github.com/RobLoach/raylib-chaiscript |
| raylib-squirrel | 2.5 | [Squirrel](http://www.squirrel-lang.org/) | https://github.com/RobLoach/raylib-squirrel |
| racket-raylib-2d | 2.5 | [Racket](https://racket-lang.org/) | https://github.com/arvyy/racket-raylib-2d |
| raylib-php | 3.0 | [PHP](https://en.wikipedia.org/wiki/PHP) | https://github.com/joseph-montanez/raylib-php |
| raylib-php-ffi | 2.4-dev | [PHP](https://en.wikipedia.org/wiki/PHP) | https://github.com/oraoto/raylib-php-ffi |
| raylib-phpcpp | 3.0 | [PHP](https://en.wikipedia.org/wiki/PHP) | https://github.com/oraoto/raylib-phpcpp |
| raylib-factor | 2.5 | [Factor](https://factorcode.org/) | https://github.com/ArnautDaniel/raylib-factor |
| gforth-raylib | 3.0 | [Gforth](https://gforth.org/) | https://github.com/ArnautDaniel/gforth-raylib |
| raylib-haxe | 2.4 | [Haxe](https://haxe.org/) | https://github.com/ibilon/raylib-haxe |
| ringraylib | 2.6 | [Ring](http://ring-lang.sourceforge.net/) | https://github.com/ringpackages/ringraylib |
| cl-raylib | 3.0 | [Common Lisp](https://common-lisp.net/) | https://github.com/longlene/cl-raylib |
| raylib-scm | 2.5 | [Chicken Scheme](https://www.call-cc.org/) | https://github.com/yashrk/raylib-scm |
| raylib-chibi | ? | [Chibi-Scheme](https://github.com/ashinn/chibi-scheme) | https://github.com/VincentToups/raylib-chibi |
| raylib-gambit-scheme | 3.1-dev | [Gambit Scheme](https://github.com/gambit/gambit) | https://github.com/georgjz/raylib-gambit-scheme |
| Euraylib | 3.0 | [Euphoria](https://openeuphoria.org/) | https://github.com/gAndy50/Euraylib |
| raylib-wren | 3.0 | [Wren](http://wren.io/) | https://github.com/TSnake41/raylib-wren |
| raylib-odin | 3.0 | [Odin](https://odin-lang.org/) | https://github.com/kevinw/raylib-odin |
| raylib-zig | 3.0 | [Zig](https://ziglang.org/) | https://github.com/Not-Nik/raylib-zig |
| raylib-jai | 3.1-dev | [Jai](https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md) | https://github.com/kevinw/raylib-jai |
| ray.zig | 2.5 | [Zig](https://ziglang.org/) | https://github.com/BitPuffin/zig-raylib-experiments |
| raylib-Ada | 3.0 | [Ada](https://www.adacore.com/about-ada) | https://github.com/mimo/raylib-Ada |
| jaylib | 3.0 | [Janet](https://janet-lang.org/) | https://github.com/janet-lang/jaylib |
| raykit | ? | [Kit](https://www.kitlang.org/) | https://github.com/Gamerfiend/raykit |
| vraylib | 2.5 | [V](https://vlang.io/) | https://github.com/MajorHard/vraylib |
| hb-raylib | 3.0 | [Harbour](https://harbour.github.io/) | https://github.com/rjopek/hb-raylib |
| ray.mod | 3.0 | [BlitzMax](https://blitzmax.org/) | https://github.com/bmx-ng/ray.mod |
| ray-ocaml | 3.0 | [OCaml](https://ocaml.org/) | https://github.com/tjammer/raylib-ocaml |
| raylib-mosaic | 3.0 | [Mosaic](https://github.com/sal55/langs/tree/master/Mosaic) | https://github.com/pluckyporcupine/raylib-mosaic |
| raylib-xdpw | 2.6 | [XD Pascal](https://github.com/vtereshkov/xdpw) | https://github.com/vtereshkov/raylib-xdpw |
| raylib-carp | 3.0 | [Carp](https://github.com/carp-lang/Carp) | https://github.com/pluckyporcupine/raylib-carp |
| raylib-fb | 3.0 | [FreeBasic](https://www.freebasic.net/) | https://github.com/IchMagBier/raylib-fb |
| raylib-purebasic | 3.0 | [PureBasic](https://www.purebasic.com/) | https://github.com/D-a-n-i-l-o/raylib-purebasic |
| raylib-smallBasic | 3.1-dev | [SmallBASIC](https://github.com/smallbasic/SmallBASIC) | https://github.com/smallbasic/smallbasic.plugins/tree/master/raylib |
| raylib-ats2 | ? | [ATS2](http://www.ats-lang.org/) | https://github.com/mephistopheles-8/raylib-ats2 |
| raylib-beef | 3.0 | [Beef](https://www.beeflang.org/) | https://github.com/M0n7y5/raylib-beef |
| raylib-never | 3.0 | [Never](https://github.com/never-lang/never) | https://github.com/never-lang/raylib-never |
| raylib.cbl | ? | [COBOL](https://en.wikipedia.org/wiki/COBOL) | *[code examples](https://github.com/Martinfx/Cobol/tree/master/OpenCobol/Games/raylib)* |
Missing some language? Feel free to create a new binding! :)
Usually, raylib bindings follow the convention: `raylib-{language}`
Let me know if you're writing a new binding for raylib, I will list it here and I usually
provide the icon/logo for that new language binding.
Let me know if you're writing a new binding for raylib, I will list it here!

350
CHANGELOG
View File

@@ -1,7 +1,355 @@
changelog
---------
Current Release: raylib 2.5.0 (31 May 2019)
Current Release: raylib 3.5.0 (25 December 2020)
-------------------------------------------------------------------------
Release: raylib 3.5 - 7th Anniversary Edition (25 December 2020)
-------------------------------------------------------------------------
KEY CHANGES:
- [core] ADDED: PLATFORM_DRM to support RPI4 and other devices (#1388) by @kernelkinetic
- [core] REDESIGNED: Window states management system through FLAGS
- [rlgl] ADDED: RenderBatch type and related functions to allow custom batching (internal only)
- [rlgl] REDESIGNED: Framebuffers API to support multiple attachment types (#721)
- [textures] REDESIGNED: Image*() functions, big performance improvements (software rendering)
- [*] REVIEWED: Multiple functions to replace file accesses by memory accesses
- [*] ADDED: GitHub Actions CI to support multiple raylib build configurations
Detailed changes:
[core] ADDED: SetWindowState() / ClearWindowState() -> New flags added!
[core] ADDED: IsWindowFocused()
[core] ADDED: GetWindowScaleDPI()
[core] ADDED: GetMonitorRefreshRate() (#1289) by @Shylie
[core] ADDED: IsCursorOnScreen() (#1262) by @ChrisDill
[core] ADDED: SetMouseCursor() and GetMouseCursor() for standard Desktop cursors (#1407) by @chances
[core] REMOVED: struct RenderTexture2D: depthTexture variable
[core] REMOVED: HideWindow() / UnhideWindow() -> Use SetWindowState()
[core] REMOVED: DecorateWindow() / UndecorateWindow() -> Use SetWindowState()
[core] RENAMED: GetExtension() to GetFileExtension()
[core] REVIEWED: Several structs to reduce size and padding
[core] REVIEWED: struct Texture maps to Texture2D and TextureCubemap
[core] REVIEWED: ToggleFullscreen() (#1287)
[core] REVIEWED: InitWindow(), support empty title for window (#1323)
[core] REVIEWED: RPI: Mouse movements are bound to the screen resolution (#1392) (#1410) by @kernelkinetic
[core] REVIEWED: GetPrevDirectoryPath() fixes on Unix-like systems (#1246) by @ivan-cx
[core] REPLACED: rgif.h by msf_gif.h for automatic gif recording
[core] REDESIGNED: GetMouseWheelMove() to return float movement for precise scrolling (#1397) by @Doy-lee
[core] REDESIGNED: GetKeyPressed(), and added GetCharPressed() (#1336)
[core] UWP rework with improvements (#1231) by @Rover656
[core] Gamepad axis bug fixes and improvement (#1228) by @mmalecot
[core] Updated joystick mappings with latest version of gamecontrollerdb (#1381) by @coderoth
[rlgl] Corrected issue with OpenGL 1.1 support
[rlgl] ADDED: rlDrawMeshInstanced() (#1318) by @seanpringle
[rlgl] ADDED: rlCheckErrors (#1321) by @seanpringle
[rlgl] ADDED: BLEND_SET blending mode (#1251) by @RandomErrorMessage
[rlgl] ADDED: rlSetLineWidth(), rlGetLineWidth(), rlEnableSmoothLines(), rlDisableSmoothLines() (#1457) by @JeffM2501
[rlgl] RENAMED: rlUnproject() to Vector3Unproject() [raymath]
[rlgl] REVIEWED: Replace rlglDraw() calls by DrawRenderBatch() internal calls
[rlgl] REVIEWED: GenTextureCubemap(), use rlgl functionality only
[rlgl] REVIEWED: rlFramebufferAttach() to support texture layers
[rlgl] REVIEWED: GenDrawCube() and GenDrawQuad()
[rlgl] REVIEWED: Issues with vertex batch overflow (#1223)
[rlgl] REVIEWED: rlUpdateTexture(), issue with offsets
[rlgl] REDESIGNED: GenTexture*() to use the new fbo API (#721)
[raymath] ADDED: Normalize() and Remap() functions (#1247) by @NoorWachid
[raymath] ADDED: Vector2Reflect() (#1400) by @daniel-junior-dube
[raymath] ADDED: Vector2LengthSqr() and Vector3LengthSqr() (#1248) by @ThePituLegend
[raymath] ADDED: Vector2MoveTowards() function (#1233) by @anatagawa
[raymath] REVIEWED: Some functions consistency (#1197) by @Not-Nik
[raymath] REVIEWED: QuaternionFromVector3ToVector3() (#1263) by @jvocaturo
[raymath] REVIEWED: MatrixLookAt(), optimized (#1442) by @RandomErrorMessage
[shapes] ADDED: CheckCollisionLines(), by @Elkantor
[text] Avoid [textures] functions dependencies
[text] ADDED: Config flag: SUPPORT_TEXT_MANIPULATION
[text] ADDED: LoadFontFromMemory() (TTF only) (#1327)
[text] ADDED: UnloadFontData()
[text] RENAMED: FormatText() -> TextFormat()
[text] REVIEWED: Font struct, added charsPadding (#1432)
[text] REVIEWED: TextJoin()
[text] REVIEWED: TextReplace() (#1172)
[text] REVIEWED: LoadBMFont() to load data from memory (#1232)
[text] REVIEWED: GenImageFontAtlas(), fixed offset (#1171)
[text] REDESIGNED: LoadFontData(), reviewed input parameters
[text] REDESIGNED: LoadFontDefault(), some code simplifications
[text] REDESIGNED: LoadFontFromImage(), avoid LoadImageEx()
[text] REDESIGNED: LoadFontData(), avoid GenImageColor(), ImageFormat()
[text] REDESIGNED: LoadBMFont(), avoid ImageCopy(), ImageFormat(), ImageAlphaMask()
[textures] Move Color functions from [core] to [textures] module
[textures] ADDED: ColorAlphaBlend()
[textures] ADDED: GetPixelColor()
[textures] ADDED: SetPixelColor()
[textures] ADDED: LoadImageFromMemory() (#1327)
[textures] ADDED: LoadImageAnim() to load animated sequence of images
[textures] ADDED: DrawTextureTiled() (#1291) - @Demizdor
[textures] ADDED: UpdateTextureRec()
[textures] ADDED: UnloadImageColors(), UnloadImagePalette(), UnloadWaveSamples()
[textures] REMOVED: Config flag: SUPPORT_IMAGE_DRAWING
[textures] REMOVED: LoadImageEx()
[textures] REMOVED: LoadImagePro()
[textures] REMOVED: GetImageDataNormalized(), not exposed in the API
[textures] RENAMED: ImageExtractPalette() to GetImagePalette()
[textures] RENAMED: Fade() to ColorAlpha(), added #define for compatibility
[textures] RENAMED: GetImageData() -> LoadImageColors()
[textures] RENAMED: GetImagePalette() -> LoadImagePalette()
[textures] RENAMED: GetWaveData() -> LoadWaveSamples()
[textures] REVIEWED: GetPixelDataSize() to consider compressed data properly
[textures] REVIEWED: GetTextureData(), allow retrieving 32bit float data
[textures] REVIEWED: ImageDrawText*() params order
[textures] REVIEWED: ColorAlphaBlend(), support tint color
[textures] REVIEWED: ColorAlphaBlend(), integers-version, optimized (#1218)
[textures] REVIEWED: ImageDraw(), consider negative source offset properly (#1283)
[textures] REVIEWED: ImageDraw(), optimizations test (#1218)
[textures] REVIEWED: ImageResizeCanvas(), optimization (#1218)
[textures] REVIEWED: ExportImage(), optimized
[textures] REVIEWED: ImageAlphaPremultiply(), optimization
[textures] REVIEWED: ImageAlphaClear(), minor optimization
[textures] REVIEWED: ImageToPOT(), renamed parameter
[textures] REVIEWED: ImageCrop() (#1218)
[textures] REVIEWED: ImageToPOT() (#1218)
[textures] REVIEWED: ImageAlphaCrop() (#1218)
[textures] REVIEWED: ExportImage(), optimized (#1218)
[textures] REDESIGNED: ImageCrop(), optimized (#1218)
[textures] REDESIGNED: ImageRotateCCW(), optimized (#1218)
[textures] REDESIGNED: ImageRotateCW(), optimized (#1218)
[textures] REDESIGNED: ImageFlipHorizontal(), optimized (#1218)
[textures] REDESIGNED: ImageFlipVertical(), optimized (#1218)
[textures] REDESIGNED: ImageResizeCanvas(), optimized (#1218)
[textures] REDESIGNED: ImageDrawPixel(), optimized
[textures] REDESIGNED: ImageDrawLine(), optimized
[textures] REDESIGNED: ImageDraw(), optimized (#1218)
[textures] REDESIGNED: ImageResize(), optimized (#1218)
[textures] REDESIGNED: ImageFromImage(), optimized (#1218)
[textures] REDESIGNED: ImageDraw(), optimization (#1218)
[textures] REDESIGNED: ImageAlphaClear(), optimized (#1218)
[textures] REDESIGNED: ExportImageAsCode() to use memory buffer (#1232)
[textures] REDESIGNED: ColorFromHSV()
[models] ADDED: DrawTriangle3D() and DrawTriangleStrip3D()
[models] ADDED: UnloadModelKeepMeshes()
[models] REVIEWED: LoadModel(), avoid loading texcoords and normals from model if not existent
[models] REVIEWED: GenMeshCubicmap(), added comments and simplification
[models] REVIEWED: GenMeshCubicmap(), fixed generated normals (#1244) by @GoldenThumbs
[models] REVIEWED: GenMeshPoly(), fixed buffer overflow (#1269) by @frithrah
[models] REVIEWED: LoadOBJ(): Allow for multiple materials in obj files (#1408) by @chriscamacho and @codifies
[models] REVIEWED: LoadIQM() materials loading (#1227) by @sikor666
[models] REVIEWED: LoadGLTF() to read from memory buffer
[models] REVIEWED: UpdateMesh(), fix extra memory allocated when updating color buffer (#1271) by @4yn
[models] REVIEWED: MeshNormalsSmooth() (#1317) by @seanpringle
[models] REVIEWED: DrawGrid() (#1417)
[models] REDESIGNED: ExportMesh() to use memory buffer (#1232)
[models] REDESIGNED: LoadIQM() and LoadModelAnimations() to use memory buffers
[audio] ADDED: LoadWaveFromMemory() (#1327)
[audio] REMOVED: SetMusicLoopCount()
[audio] REVIEWED: Several functions, sampleCount vs frameCount (#1423)
[audio] REVIEWED: SaveWAV() to use memory write insted of file
[audio] REVIEWED: LoadMusicStream(), support WAV music streaming (#1198)
[audio] REVIEWED: Support multiple WAV sampleSize for MusicStream (#1340)
[audio] REVIEWED: SetAudioBufferPitch()
[audio] REDESIGNED: Audio looping system
[audio] REDESIGNED: LoadSound(): Use memory loading (WAV, OGG, MP3, FLAC) (#1312)
[audio] REDESIGNED: ExportWaveAsCode() to use memory buffers
[utils] ADDED: MemAlloc() / MemFree() (#1440)
[utils] ADDED: UnloadFileData() / UnloadFileText()
[utils] REVIEWED: android_fopen() to support SDCard access
[utils] REDESIGNED: SaveFile*() functions to expose file access results (#1420)
[rmem] REVIEWED: MemPool and other allocators optimization (#1211) by @assyrianic
[examples] ADDED: core/core_window_flags
[examples] ADDED: core/core_quat_conversion by @chriscamacho and @codifies
[examples] ADDED: textures/textures_blend_modes (#1261) by @accidentalrebel
[examples] ADDED: textures/textures_draw_tiled (#1291) by @Demizdor
[examples] ADDED: shaders/shaders_hot_reloading (#1198)
[examples] ADDED: shaders/shaders_rlgl_mesh_instanced (#1318) by @seanpringle
[examples] ADDED: shaders/shaders_multi_sampler2d
[examples] ADDED: others/embedded_files_loading
[examples] REVIEWED: textures/textures_raw_data (#1286)
[examples] REVIEWED: textures/textures_sprite_explosion, replace resources
[examples] REVIEWED: textures/textures_particles_blending, replace resources
[examples] REVIEWED: textures/textures_image_processing, support mouse
[examples] REVIEWED: models/models_skybox to work on OpenGL ES 2.0
[examples] REVIEWED: audio/resources, use open license resources
[examples] REVIEWED: others/raudio_standalone.c
[build] ADDED: New config.h configuration options exposing multiple #define values
[build] REMOVED: ANGLE VS2017 template project
[build] REVIEWED: All MSVC compile warnings
[build] Updated Makefile for web (#1332) by @rfaile313
[build] Updated build pipelines to use latest emscripten and Android NDK
[build] Updated emscriptem build script to generate .a on WebAssembly
[build] Updated Android build for Linux, supporting ANDROID_NDK at compile time by @branlix3000
[build] Updated VSCode project template tasks
[build] Updated VS2017.UWP project template by @Rover656
[build] Updated Android build pipeline
[build] REMOVED: AppVeyor and Travis CI build systems
[*] Moved raysan5/raylib/games to independent repo: raysan5/raylib-games
[*] Replaced several examples resources with more open licensed alternatives
[*] Updated BINDINGS.md with NEW bindings and added raylib version binding!
[*] Updated all external libraries to latest versions
[*] Multiple code improvements and small fixes
-----------------------------------------------
Release: raylib 3.0 (01 April 2020)
-----------------------------------------------
KEY CHANGES:
- Global context states used on all modules.
- Custom memory allocators for all modules and dependencies.
- Centralized file access system and memory data loading.
- Structures reviewed to reduce size and always be used as pass-by-value.
- Tracelog messages completely reviewed and categorized.
- raudio module reviewed to accomodate new Music struct and new miniaudio.
- text module reviewed to improve fonts generation and text management functions.
- Multiple new examples added and categorized examples table.
- GitHub Actions CI implemented for Windows, Linux and macOS.
Detailed changes:
[build] ADDED: VS2017.ANGLE project, by @msmshazan
[build] ADDED: VS2017 project support for x64 platform configuration
[build] ADDED: Makefile for Android building on macOS, by @Yunoinsky
[build] ADDED: Makefile for Android building on Linux, by @pamarcos
[build] REMOVED: VS2015 project
[build] REVIEWED: VSCode project
[build] REVIEWED: Makefile build system
[build] REVIEWED: Android building, by @NimbusFox
[build] REVIEWED: Compilation with CLion IDE, by @Rover656
[build] REVIEWED: Generation of web examples, by @pamarcos
[build] REVIEWED: Makefiles path to 'shell.html', by @niorad
[build] REVIEWED: VS2017 64bit compilation issues, by @spec-chum
[build] REVIEWED: Multiple fixes on projects building, by @ChrisDill, @JuDelCo, @electronstudio
[core] ADDED: Support touch/mouse indistinctly
[core] ADDED: FLAG_WINDOW_ALWAYS_RUN to avoid pause on minimize
[core] ADDED: Config flag SUPPORT_HALFBUSY_WAIT_LOOP
[core] ADDED: RPI mouse cursor point support on native mode
[core] ADDED: GetWorldToScreen2D()- Get screen space position for a 2d camera world space position, by @arvyy
[core] ADDED: GetScreenToWorld2D() - Get world space position for a 2d camera screen space position, by @arvyy
[core] ADDED: GetWorldToScreenEx() - Get size position for a 3d world space position
[core] ADDED: DirectoryExists() - Check if a directory path exists
[core] ADDED: GetPrevDirectoryPath() - Get previous directory path for a given path
[core] ADDED: CompressData() - Compress data (DEFLATE algorythm)
[core] ADDED: DecompressData() - Decompress data (DEFLATE algorythm)
[core] ADDED: GetWindowPosition() - Get window position XY on monitor
[core] ADDED: LoadFileData() - Load file data as byte array (read)
[core] ADDED: SaveFileData() - Save data to file from byte array (write)
[core] ADDED: LoadFileText() - Load text data from file (read), returns a '\0' terminated string
[core] ADDED: SaveFileText() - Save text data to file (write), string must be '\0' terminated
[core] REMOVED: Show raylib logo at initialization
[core] REVIEWED: GetFileName(), security checks
[core] REVIEWED: LoadStorageValue(), by @danimartin82
[core] REVIEWED: SaveStorageValue(), by @danimartin82
[core] REVIEWED: IsMouseButtonReleased(), when press/release events come too fast, by @oswjk
[core] REVIEWED: SetWindowMonitor(), by @DropsOfSerenity
[core] REVIEWED: IsFileExtension() to be case-insensitive
[core] REVIEWED: IsFileExtension() when checking no-extension files
[core] REVIEWED: Default font scale filter for HighDPI mode
[core] REVIEWED: Touch input scaling for PLATFORM_WEB
[core] REVIEWED: RPI input system, by @DarkElvenAngel
[core] REVIEWED: RPI input threads issues
[core] REVIEWED: OpenGL extensions loading and freeing
[core] REVIEWED: GetDirectoryPath()
[core] REVIEWED: Camera2D behavior, by @arvyy
[core] REVIEWED: OpenGL ES 2.0 extensions check
[rlgl] ADDED: Flags to allow frustrum culling near/far distance configuration at compile time
[rlgl] ADDED: Flags to sllow MAX_BATCH_BUFFERING config at compile time
[rlgl] ADDED: GetMatrixProjection(), by @chriscamacho
[rlgl] ADDED: rlUpdateMeshAt() - Update vertex or index data on GPU, at index, by @brankoku
[rlgl] REVIEWED: Vertex padding not zeroed for quads, by @kawa-yoiko
[rlgl] REVIEWED: Read texture data as RGBA from FBO on GLES 2.0
[rlgl] REVIEWED: LoadShaderCode() for const correctness, by @heretique
[rlgl] REVIEWED: rlLoadTexture()
[rlgl] REVIEWED: rlReadTexturePixels()
[rlgl] REVIEWED: rlUpdateMesh() to supports updating indices, by @brankoku
[rlgl] REVIEWED: GenTextureCubemap(), renamed parameters for consistency
[rlgl] REVIEWED: HDR pixels loading
[raymath] ADDED: MatrixRotateXYZ(), by @chriscamacho
[raymath] RENAMED: Vector3Multiply() to Vector3Scale()
[camera] REVIEWED: Free camera pitch, by @chriscamacho
[camera] REVIEWED: Camera not working properly at z-align, by @Ushio
[shapes] ADDED: DrawTriangleStrip() - Draw a triangle strip defined by points
[shapes] ADDED: DrawEllipse() - Draw ellipse
[shapes] ADDED: DrawEllipseLines() - Draw ellipse outline
[shapes] ADDED: DrawPolyLines() - Draw a polygon outline of n sides
[shapes] REVIEWED: DrawPoly() shape rendering, by @AlexHCC
[textures] ADDED: LoadAnimatedGIF() - Load animated GIF file
[textures] ADDED: GetImageAlphaBorder() - Get image alpha border rectangle
[textures] ADDED: ImageFromImage() - Create an image from another image piece
[textures] ADDED: ImageClearBackground(), by @iamsouravgupta
[textures] ADDED: ImageDrawPixel(), by @iamsouravgupta
[textures] ADDED: ImageDrawCircle(), by @iamsouravgupta
[textures] ADDED: ImageDrawLineEx(), by @iamsouravgupta
[textures] ADDED: ImageDrawPixelV(), by @RobLoach
[textures] ADDED: ImageDrawCircleV(), by @RobLoach
[textures] ADDED: ImageDrawLineV(), by @RobLoach
[textures] ADDED: ImageDrawRectangleV(), by @RobLoach
[textures] ADDED: ImageDrawRectangleRec(), by @RobLoach
[textures] REVIEWED: ImageDrawPixel(), by @RobLoach
[textures] REVIEWED: ImageDrawLine(), by @RobLoach
[textures] REVIEWED: ImageDrawCircle(), by @RobLoach
[textures] REVIEWED: ImageDrawRectangle(), by @RobLoach
[textures] REVIEWED: ImageDraw(), now it supports color tint parameter
[textures] REVIEWED: ImageResizeCanvas()
[textures] REVIEWED: ImageCrop() with security checks
[textures] REVIEWED: ImageAlphaMask()
[textures] REVIEWED: ImageDrawRectangleLines()
[textures] REVIEWED: GetImageData()
[text] ADDED: TextCopy() - Copy one string to another, returns bytes copied
[text] ADDED: GetCodepoints() - Get all codepoints in a string
[text] ADDED: CodepointToUtf8() - Encode codepoint into utf8 text
[text] ADDED: DrawTextCodepoint() - Draw one character (codepoint)
[text] RENAMED: LoadDefaultFont() -> LoadFontDefault()
[text] RENAMED: TextCountCodepoints() -> GetCodepointsCount()
[text] REVIEWED: TextFormat(), to support caching, by @brankoku
[text] REVIEWED: LoadFontData(), generate empty image for space character
[text] REVIEWED: TextSplit()
[text] REVIEWED: TextToInteger()
[text] REVIEWED: GetNextCodepoint(), renamed parameters for clarity
[text] REVIEWED: GenImageFontAtlas(), improved atlas size computing
[text] REDESIGNED: struct Font, character rectangles have been moved out from CharInfo to Font
[text] REDESIGNED: struct CharInfo, now includes directly an Image of the glyph
[text] REDESIGNED: GenImageFontAtlas(), additional recs parameter added
[text] REDESIGNED: ImageTextEx(), to avoid font retrieval from GPU
[models] ADDED: Support rlPushMatrix() and rlPopMatrix() on mesh drawing
[models] ADDED: DrawPoint3D() - Draw a point in 3D space, actually a small line, by @ProfJski
[models] ADDED: Multi texture support for materials in GLTF format, by @Gamerfiend, @chriscamacho
[models] REVIEWED: LoadGLTF(), fixed memory leak, by @jubalh
[models] REVIEWED: LoadIQM(), support multiple animations loading, by @culacant
[models] REVIEWED: GetCollisionRayModel(), to avoid pointers
[models] REVIEWED: CheckCollisionRay*(), parameters renamed
[models] REVIEWED: UnloadMesh(), to avoid pointers
[models] REVIEWED: LoadModel(), memory initialization
[models] REVIEWED: UpdateModelAnimation(), added security checks
[models] REVIEWED: Multiple fixes on models loading, by @jubalh
[models] REVIEWED: Normals updated when using animated meshes, by @@las3rlars
[models] REVIEWED: Compilation when the SUPPORT_MESH_GENERATION not set, by @@Elkantor
[raudio] ADDED: Multi-channel audio playing, by @chriscamacho
[raudio] REMOVED: LoadWaveEx()
[raudio] RENAMED: IsAudioBufferProcessed() to IsAudioStreamProcessed()
[raudio] REVIEWED: Ensure .xm playback starts in the right place, by @illegalinstruction
[raudio] REVIEWED: Fix short non-looping sounds, by @jbosh
[raudio] REVIEWED: Modules playing time to full length
[raudio] REDESIGNED: Replaced Music pointer by struct
[raudio] REDESIGNED: Removed sampleLeft from Music struct
[examples] ADDED: core_scissor_test, by @ChrisDill
[examples] ADDED: core_2d_camera_platformer, by @arvyy
[examples] ADDED: textures_mouse_painting, by @ChrisDill
[examples] ADDED: models_waving_cubes, by @codecat
[examples] ADDED: models_solar_system, by @aldrinmartoq
[examples] ADDED: shaders_fog, by @chriscamacho
[examples] ADDED: shaders_texture_waves, by @Anata
[examples] ADDED: shaders_basic_lighting, by @chriscamacho
[examples] ADDED: shaders_simple_mask, by @chriscamacho
[examples] ADDED: audio_multichannel_sound, by @chriscamacho
[examples] ADDED: shaders_spotlight, by @chriscamacho
[examples] RENAMED: text_sprite_font > text_font_spritefont
[examples] RENAMED: text_ttf_loading > text_font_filters
[examples] RENAMED: text_bmfont_ttf > text_font_loading
[examples] REMOVED: models_obj_viewer
[examples] REMOVED: models_solar_system
[examples] REVIEWED: models_obj_loading > models_loading
[examples] REVIEWED: models_materials_pbr, shader issues
[examples] REVIEWED: core_window_letterbox, detailed explanation, by @jotac0
[examples] REVIEWED: core_window_letterbox, virtual mouse, by @anatagawa
[games] ADDED: GGJ2020 game - RE-PAIR
[*] Misc fixes and tweaks, by @yaram, @oraoto, @zatherz, @piecedigital, @Shylie
[*] Update ALL supported projects (Notepad++, VS2017)
[*] Update ALL external libraries to latest versions (29.Jan.2020)
[*] Update ALL examples and games
[*] Update BINDINGS list
-----------------------------------------------
Release: raylib 2.5 (May 2019)

23
CMakeLists.txt Normal file → Executable file
View File

@@ -1,13 +1,25 @@
cmake_minimum_required(VERSION 3.0)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
set(RAYLIB_IS_MAIN TRUE)
else()
set(RAYLIB_IS_MAIN FALSE)
endif()
# Config options
option(BUILD_EXAMPLES "Build the examples." ON)
option(BUILD_GAMES "Build the example games." ON)
option(BUILD_EXAMPLES "Build the examples." ${RAYLIB_IS_MAIN})
option(ENABLE_ASAN "Enable AddressSanitizer (ASAN) for debugging (degrades performance)" 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)
# This helps support the case where emsdk toolchain file is used
# either by setting it with -DCMAKE_TOOLCHAIN_FILE=<path_to_emsdk>/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
# or by using "emcmake cmake -B build -S ." as described in https://emscripten.org/docs/compiling/Building-Projects.html
if(EMSCRIPTEN)
SET(PLATFORM Web CACHE STRING "Forcing PLATFORM_WEB because EMSCRIPTEN was detected")
endif()
if(CMAKE_VERSION VERSION_LESS "3.1")
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
set(CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
@@ -22,8 +34,6 @@ add_if_flag_compiles(-Werror=implicit-function-declaration CMAKE_C_FLAGS)
# src/external/jar_xm.h does shady stuff
add_if_flag_compiles(-fno-strict-aliasing CMAKE_C_FLAGS)
include(CheckFileSystemSymlinkSupport)
if (ENABLE_ASAN)
add_if_flag_compiles(-fno-omit-frame-pointer CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
add_if_flag_compiles(-fsanitize=address CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
@@ -44,11 +54,8 @@ endif()
add_subdirectory(src)
if (${BUILD_EXAMPLES})
MESSAGE(STATUS "Building examples is enabled")
add_subdirectory(examples)
endif()
if (${BUILD_GAMES})
add_subdirectory(games)
endif()
enable_testing()

View File

@@ -6,8 +6,8 @@ Do you enjoy raylib and want to contribute? Nice! You can help with the followin
- C programming - Can you write/review/test/improve the code?
- Documentation/Tutorials/Example - Can you write some tutorial/example?
- Web Development - Can you help [with the website](https://github.com/raysan5/raylib.com)?
- Porting to other platforms - Can you port and compile raylib on other systems?
- Web Development - Can you help [with the website](https://github.com/raysan5/raylib.com)?
- Testing - Can you find some bugs in raylib?
This document contains a set of guidelines to contribute to the project. These are mostly guidelines, not rules.
@@ -16,10 +16,10 @@ Use your best judgement, and feel free to propose changes to this document in a
### raylib philosophy
- raylib is a tool to enjoy videogames programming, every single function in raylib should be a tutorial on itself.
- raylib is SIMPLE and EASY-TO-USE, I tried to keep it compact with a small set of functions, if a function is too complex or is not clearly useful, better not to include it.
- raylib is open source and free; educators and institutions can use this tool to TEACH videogames programming completely by free.
- raylib is **SIMPLE** and **EASY-TO-USE**, I tried to keep it compact with a small set of functions, if a function is too complex or is not clearly useful, better not including it.
- raylib is open source and free; educators and institutions can use this tool to **TEACH** videogames programming completely for free.
- raylib is collaborative; contribution of tutorials / code examples / bug fixes / code comments are highly appreciated.
- raylib's license (and its external libs respective licenses) allow using it for commercial products.
- raylib's license (and its external libs respective licenses) allow using it on commercial projects.
### Some interesting reads to start with
@@ -36,7 +36,7 @@ Feel free to review it if required, just take care not to break something.
Despite being written in C, raylib does not follow the standard Hungarian notation for C,
it [follows Pascal-case/camel-case notation](https://github.com/raysan5/raylib/wiki/raylib-coding-conventions),
more common on C# language. All code formatting decisions have been carefully taken
to make it easier for students to read, write and understand code.
to make it easier for students/users to read, write and understand code.
Source code is extensively commented for that purpose, raylib primary learning method is:
@@ -133,4 +133,4 @@ contributing (in some way or another) to make the raylib project better. Huge th
- [PompPenguin](https://github.com/PompPenguin) for reviewing 3rd person camera
- [Mohamed Shazan](https://github.com/msmshazan) for adding support for ANGLE graphics backend
Please, if I forget someone in this list, excuse me and send a PR!
Please, if I forget someone in this list, excuse me and send me a PR!

View File

@@ -1,19 +1,19 @@
![raylib logo](logo/raylib_256x256.png)
history
-------
introduction
------------
I've developed videogames since 2006 and in 2012 I started teaching videogames development to young people with artistic profile, most of them had never written a single line of code.
I started developing videogames in 2006 and some years later I started teaching videogames development to young people with artistic profile, most of students had never written a single line of code.
I started with C language basis and, after searching for the most simple and easy-to-use library to teach videogames programming, I found WinBGI; it was great and it worked very well with students, in just a couple of weeks that people that had never written a single line of code were able to program (and understand) a simple PONG and some of them even a BREAKOUT!
I decided to start with C language basis and, after searching for the most simple and easy-to-use library to teach videogames programming, I found [WinBGI](http://www.codecutter.net/tools/winbgim/); it was great and it worked very well with students, in just a couple of weeks, those students that had never written a single line of code were able to program (and understand) a simple PONG game, some of them even a BREAKOUT!
But WinBGI was not the clearer and most organized lib. There were a lot of things I found confusing and some function names were not clear enough for most of the students; not to mention points like no transparencies support or no hardware acceleration.
But WinBGI was not the clearer and most organized library for my taste. There were lots of things I found confusing and some function names were not clear enough for most of the students; not to mention the lack of transparencies support and no hardware acceleration.
So, I decided to create my own library, hardware accelerated, clear function names, quite organized, well structured, plain C coding and, the most important, primarily intended to learn videogames programming.
Most of my videogames coding experience was in C# and XNA and I really love it (in fact, my students learn C# after C), so, I decided to use C# language notation and XNA naming conventions. That way, students can jump from raylib to XNA, MonoGame or similar libs extremely easily.
My previous videogames development experience was mostly in C# and [XNA](https://en.wikipedia.org/wiki/Microsoft_XNA) and I really loved it, so, I decided to use C# language style notation and XNA naming conventions. That way, students were able to move from raylib to XNA, MonoGame or similar libs extremely easily.
raylib started as a weekend project and after three months of hard work, raylib 1.0 was published on November 2013.
raylib started as a weekend project and after three months of hard work, **raylib 1.0 was published on November 2013**.
Enjoy it.
@@ -22,9 +22,9 @@ notes on raylib 1.1
On April 2014, after 6 month of first raylib release, raylib 1.1 has been released. This new version presents a complete internal redesign of the library to support OpenGL 1.1, OpenGL 3.3+ and OpenGL ES 2.0.
A new module named [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) has been added to the library. This new module translates raylib-OpenGL-style immediate mode functions (i.e. rlVertex3f(), rlBegin(), ...) to different versions of OpenGL (1.1, 3.3+, ES2), selectable by one define.
- A new module named [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) has been added to the library. This new module translates raylib-OpenGL-style immediate mode functions (i.e. rlVertex3f(), rlBegin(), ...) to different versions of OpenGL (1.1, 3.3+, ES2), selectable by one define.
[rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) also comes with a second new module named [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h), which includes a bunch of useful functions for 3d-math with vectors, matrices and quaternions.
- [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) also comes with a second new module named [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h), which includes a bunch of useful functions for 3d-math with vectors, matrices and quaternions.
Some other big changes of this new version have been the support for OGG files loading and stream playing, and the support of DDS texture files (compressed and uncompressed) along with mipmaps support.
@@ -37,9 +37,9 @@ On September 2014, after 5 month of raylib 1.1 release, it comes raylib 1.2. Aga
It's been some month of really hard work to accomodate raylib to those new platforms while keeping it easy for the users. On Android, raylib manages internally the activity cicle, as well as the inputs; on Raspberry Pi, a complete raw input system has been written from scratch.
A new display initialization system has been created to support multiple resolutions, adding black bars if required; user only defines desired screen size and it gets properly displayed.
- A new display initialization system has been created to support multiple resolutions, adding black bars if required; user only defines desired screen size and it gets properly displayed.
Now raylib can easily deploy games to Android devices and Raspberry Pi (console mode).
- Now raylib can easily deploy games to Android devices and Raspberry Pi (console mode).
Lots of code changes and lot of testing have concluded in this amazing new raylib 1.2.
@@ -50,15 +50,15 @@ notes on raylib 1.3
On September 2015, after 1 year of raylib 1.2 release, arrives raylib 1.3. This version adds shaders functionality, improves tremendously textures module and also provides some new modules (camera system, gestures system, immediate-mode gui).
Shaders support is the biggest addition to raylib 1.3, with support for easy shaders loading and use. Loaded shaders can be attached to 3d models or used as fullscreen postrocessing effects. A bunch of postprocessing shaders are also included in this release, check raylib/shaders folder.
- Shaders support is the biggest addition to raylib 1.3, with support for easy shaders loading and use. Loaded shaders can be attached to 3d models or used as fullscreen postrocessing effects. A bunch of postprocessing shaders are also included in this release, check raylib/shaders folder.
Textures module has grown to support most of the internal texture formats available in OpenGL (RGB565, RGB888, RGBA5551, RGBA4444, etc.), including compressed texture formats (DXT, ETC1, ETC2, ASTC, PVRT); raylib 1.3 can load .dds, .pkm, .ktx, .astc and .pvr files.
- Textures module has grown to support most of the internal texture formats available in OpenGL (RGB565, RGB888, RGBA5551, RGBA4444, etc.), including compressed texture formats (DXT, ETC1, ETC2, ASTC, PVRT); raylib 1.3 can load .dds, .pkm, .ktx, .astc and .pvr files.
A brand new [camera](https://github.com/raysan5/raylib/blob/master/src/camera.c) module offers to the user multiple preconfigured ready-to-use camera systems (free camera, 1st person, 3rd person). Camera modes are very easy to use, just check examples: [core_3d_camera_free.c](https://github.com/raysan5/raylib/blob/master/examples/core_3d_camera_free.c) and [core_3d_camera_first_person.c](https://github.com/raysan5/raylib/blob/master/examples/core_3d_camera_first_person.c).
- A brand new [camera](https://github.com/raysan5/raylib/blob/master/src/camera.c) module offers to the user multiple preconfigured ready-to-use camera systems (free camera, 1st person, 3rd person). Camera modes are very easy to use, just check examples: [core_3d_camera_free.c](https://github.com/raysan5/raylib/blob/master/examples/core_3d_camera_free.c) and [core_3d_camera_first_person.c](https://github.com/raysan5/raylib/blob/master/examples/core_3d_camera_first_person.c).
New [gestures](https://github.com/raysan5/raylib/blob/master/src/gestures.h) module simplifies gestures detection on Android and HTML5 programs.
- New [gestures](https://github.com/raysan5/raylib/blob/master/src/gestures.h) module simplifies gestures detection on Android and HTML5 programs.
[raygui](https://github.com/raysan5/raylib/blob/master/src/raygui.h), the new immediate-mode GUI module offers a set of functions to create simple user interfaces, primary intended for tools development. It's still in experimental state but already fully functional.
- [raygui](https://github.com/raysan5/raylib/blob/master/src/raygui.h), the new immediate-mode GUI module offers a set of functions to create simple user interfaces, primary intended for tools development. It's still in experimental state but already fully functional.
Most of the examples have been completely rewritten and +10 new examples have been added to show the new raylib features.
@@ -69,17 +69,17 @@ notes on raylib 1.4
On February 2016, after 4 months of raylib 1.3 release, it comes raylib 1.4. For this new version, lots of parts of the library have been reviewed, lots of bugs have been solved and some interesting features have been added.
First big addition is a set of [Image manipulation functions](https://github.com/raysan5/raylib/blob/master/src/raylib.h#L673) have been added to crop, resize, colorize, flip, dither and even draw image-to-image or text-to-image. Now a basic image processing can be done before converting the image to texture for usage.
- First big addition is a set of [Image manipulation functions](https://github.com/raysan5/raylib/blob/master/src/raylib.h#L673) have been added to crop, resize, colorize, flip, dither and even draw image-to-image or text-to-image. Now a basic image processing can be done before converting the image to texture for usage.
SpriteFonts system has been improved, adding support for AngelCode fonts (.fnt) and TrueType Fonts (using [stb_truetype](https://github.com/nothings/stb/blob/master/stb_truetype.h) helper library). Now raylib can read standard .fnt font data and also generate at loading a SpriteFont from a TTF file.
- SpriteFonts system has been improved, adding support for AngelCode fonts (.fnt) and TrueType Fonts (using [stb_truetype](https://github.com/nothings/stb/blob/master/stb_truetype.h) helper library). Now raylib can read standard .fnt font data and also generate at loading a SpriteFont from a TTF file.
New [physac](https://github.com/raysan5/raylib/blob/master/src/physac.h) physics module for basic 2D physics support. Still in development but already functional. Module comes with some usage examples for basic jump and level interaction and also force-based physic movements.
- New [physac](https://github.com/raysan5/raylib/blob/master/src/physac.h) physics module for basic 2D physics support. Still in development but already functional. Module comes with some usage examples for basic jump and level interaction and also force-based physic movements.
[raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h) module has been reviewed; some bugs have been solved and the module has been converted to a header-only file for easier portability, optionally, functions can also be used as inline.
- [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h) module has been reviewed; some bugs have been solved and the module has been converted to a header-only file for easier portability, optionally, functions can also be used as inline.
[gestures](https://github.com/raysan5/raylib/blob/master/src/gestures.c) module has redesigned and simplified, now it can process touch events from any source, including mouse. This way, gestures system can be used on any platform providing an unified way to work with inputs and allowing the user to create multiplatform games with only one source code.
- [gestures](https://github.com/raysan5/raylib/blob/master/src/gestures.c) module has redesigned and simplified, now it can process touch events from any source, including mouse. This way, gestures system can be used on any platform providing an unified way to work with inputs and allowing the user to create multiplatform games with only one source code.
Raspberry Pi input system has been redesigned to better read raw inputs using generic Linux event handlers (keyboard:`stdin`, mouse:`/dev/input/mouse0`, gamepad:`/dev/input/js0`). Gamepad support has also been added (experimental).
- Raspberry Pi input system has been redesigned to better read raw inputs using generic Linux event handlers (keyboard:`stdin`, mouse:`/dev/input/mouse0`, gamepad:`/dev/input/js0`). Gamepad support has also been added (experimental).
Other important improvements are the functional raycast system for 3D picking, including some ray collision-detection functions,
and the addition of two simple functions for persistent data storage. Now raylib user can save and load game data in a file (only some platforms supported). A simple [easings](https://github.com/raysan5/raylib/blob/master/src/easings.h) module has also been added for values animation.
@@ -94,17 +94,17 @@ notes on raylib 1.5
On July 2016, after 5 months of raylib 1.4 release, arrives raylib 1.5. This new version is the biggest boost of the library until now, lots of parts of the library have been redesigned, lots of bugs have been solved and some **AMAZING** new features have been added.
VR support: raylib supports **Oculus Rift CV1**, one of the most anticipated VR devices in the market. Additionally, raylib supports simulated VR stereo rendering, independent of the VR device; it means, raylib can generate stereo renders with custom head-mounted-display device parameteres, that way, any VR device in the market can be **simulated in any platform** just configuring device parameters (and consequently, lens distortion). To enable VR is [extremely easy](https://github.com/raysan5/raylib/blob/master/examples/core_oculus_rift.c).
- VR support: raylib supports **Oculus Rift CV1**, one of the most anticipated VR devices in the market. Additionally, raylib supports simulated VR stereo rendering, independent of the VR device; it means, raylib can generate stereo renders with custom head-mounted-display device parameteres, that way, any VR device in the market can be **simulated in any platform** just configuring device parameters (and consequently, lens distortion). To enable VR is [extremely easy](https://github.com/raysan5/raylib/blob/master/examples/core_oculus_rift.c).
New materials system: now raylib supports standard material properties for 3D models, including diffuse-ambient-specular colors and diffuse-normal-specular textures. Just assign values to standard material and everything is processed internally.
- New materials system: now raylib supports standard material properties for 3D models, including diffuse-ambient-specular colors and diffuse-normal-specular textures. Just assign values to standard material and everything is processed internally.
New lighting system: added support for up to 8 configurable lights and 3 light types: **point**, **directional** and **spot** lights. Just create a light, configure its parameters and raylib manages render internally for every 3d object using standard material.
- New lighting system: added support for up to 8 configurable lights and 3 light types: **point**, **directional** and **spot** lights. Just create a light, configure its parameters and raylib manages render internally for every 3d object using standard material.
Complete gamepad support on Raspberry Pi: Gamepad system has been completely redesigned. Now multiple gamepads can be easily configured and used; gamepad data is read and processed in raw mode in a second thread.
- Complete gamepad support on Raspberry Pi: Gamepad system has been completely redesigned. Now multiple gamepads can be easily configured and used; gamepad data is read and processed in raw mode in a second thread.
Redesigned physics module: [physac](https://github.com/raysan5/raylib/blob/master/src/physac.h) module has been converted to header only and usage [has been simplified](https://github.com/raysan5/raylib/blob/master/examples/physics_basic_rigidbody.c). Performance has also been singnificantly improved, now physic objects are managed internally in a second thread.
- Redesigned physics module: [physac](https://github.com/raysan5/raylib/blob/master/src/physac.h) module has been converted to header only and usage [has been simplified](https://github.com/raysan5/raylib/blob/master/examples/physics_basic_rigidbody.c). Performance has also been singnificantly improved, now physic objects are managed internally in a second thread.
Audio chiptunese support and mixing channels: Added support for module audio music (.xm, .mod) loading and playing. Multiple mixing channels are now also supported. All this features thanks to the amazing work of @kd7tck.
- Audio chiptunese support and mixing channels: Added support for module audio music (.xm, .mod) loading and playing. Multiple mixing channels are now also supported. All this features thanks to the amazing work of @kd7tck.
Other additions include a [2D camera system](https://github.com/raysan5/raylib/blob/master/examples/core_2d_camera.c), render textures for offline render (and most comprehensive [postprocessing](https://github.com/raysan5/raylib/blob/master/examples/shaders_postprocessing.c)) or support for legacy OpenGL 2.1 on desktop platforms.
@@ -119,17 +119,17 @@ notes on raylib 1.6
On November 2016, only 4 months after raylib 1.5, arrives raylib 1.6. This new version represents another big review of the library and includes some interesting additions. This version conmmemorates raylib 3rd anniversary (raylib 1.0 was published on November 2013) and it is a stepping stone for raylib future. raylib roadmap has been reviewed and redefined to focus on its primary objective: create a simple and easy-to-use library to learn videogames programming. Some of the new features:
Complete [raylib Lua binding](https://github.com/raysan5/raylib-lua). All raylib functions plus the +60 code examples have been ported to Lua, now Lua users can enjoy coding videogames in Lua while using all the internal power of raylib. This addition also open the doors to Lua scripting support for a future raylib-based engine, being able to move game logic (Init, Update, Draw, De-Init) to Lua scripts while keep using raylib functionality.
- Complete [raylib Lua binding](https://github.com/raysan5/raylib-lua). All raylib functions plus the +60 code examples have been ported to Lua, now Lua users can enjoy coding videogames in Lua while using all the internal power of raylib. This addition also open the doors to Lua scripting support for a future raylib-based engine, being able to move game logic (Init, Update, Draw, De-Init) to Lua scripts while keep using raylib functionality.
Completely redesigned [audio module](https://github.com/raysan5/raylib/blob/master/src/raudio.c). Based on the new direction taken in raylib 1.5, it has been further improved and more functionality added (+20 new functions) to allow raw audio processing and streaming. [FLAC file format support](https://github.com/raysan5/raylib/blob/master/src/external/dr_flac.h) has also been added. In the same line, [OpenAL Soft](https://github.com/kcat/openal-soft) backend is now provided as a static library in Windows to allow static linking and get ride of OpenAL32.dll. Now raylib Windows games are completey self-contained, no external libraries required any more!
- Completely redesigned [audio module](https://github.com/raysan5/raylib/blob/master/src/raudio.c). Based on the new direction taken in raylib 1.5, it has been further improved and more functionality added (+20 new functions) to allow raw audio processing and streaming. [FLAC file format support](https://github.com/raysan5/raylib/blob/master/src/external/dr_flac.h) has also been added. In the same line, [OpenAL Soft](https://github.com/kcat/openal-soft) backend is now provided as a static library in Windows to allow static linking and get ride of OpenAL32.dll. Now raylib Windows games are completey self-contained, no external libraries required any more!
[Physac](https://github.com/victorfisac/Physac) module has been moved to its own repository and it has been improved A LOT, actually, library has been completely rewritten from scratch by [@victorfisac](https://github.com/victorfisac), multiple samples have been added together with countless new features to match current standard 2D physic libraries. Results are amazing!
- [Physac](https://github.com/victorfisac/Physac) module has been moved to its own repository and it has been improved A LOT, actually, library has been completely rewritten from scratch by [@victorfisac](https://github.com/victorfisac), multiple samples have been added together with countless new features to match current standard 2D physic libraries. Results are amazing!
Camera and gestures modules have been reviewed, highly simplified and ported to single-file header-only libraries for easier portability and usage flexibility. Consequently, camera system usage has been simplified in all examples.
- Camera and gestures modules have been reviewed, highly simplified and ported to single-file header-only libraries for easier portability and usage flexibility. Consequently, camera system usage has been simplified in all examples.
Improved Gamepad support on Windows and Raspberry Pi with the addition of new functions for custom gamepad configurations but supporting by default PS3 and Xbox-based gamepads.
- Improved Gamepad support on Windows and Raspberry Pi with the addition of new functions for custom gamepad configurations but supporting by default PS3 and Xbox-based gamepads.
Improved textures and text functionality, adding new functions for texture filtering control and better TTF/AngelCode fonts loading and generation support.
- Improved textures and text functionality, adding new functions for texture filtering control and better TTF/AngelCode fonts loading and generation support.
Build system improvement. Added support for raylib dynamic library generation (raylib.dll) for users that prefer dynamic library linking. Also thinking on advance users, it has been added pre-configured [Visual Studio C++ 2015 solution](https://github.com/raysan5/raylib/tree/master/project/vs2015) with raylib project and C/C++ examples for users that prefer that professional IDE and compiler.
@@ -140,15 +140,15 @@ notes on raylib 1.7
On May 2017, around 6 month after raylib 1.6, comes another raylib instalment, raylib 1.7. This time library has been improved a lot in terms of consistency and cleanness. As stated in [this patreon article](https://www.patreon.com/posts/raylib-future-7501034), this new raylib version has focused efforts in becoming more simple and easy-to-use to learn videogames programming. Some highlights of this new version are:
More than 30 new functions added to the library, functions to control Window, utils to work with filenames and extensions, functions to draw lines with custom thick, mesh loading, functions for 3d ray collisions detailed detection, funtions for VR simulation and much more... Just check [CHANGELOG](CHANGELOG) for a detailed list of additions!
- More than 30 new functions added to the library, functions to control Window, utils to work with filenames and extensions, functions to draw lines with custom thick, mesh loading, functions for 3d ray collisions detailed detection, funtions for VR simulation and much more... Just check [CHANGELOG](CHANGELOG) for a detailed list of additions!
Support of [configuration flags](https://github.com/raysan5/raylib/issues/200) on every raylib module. Advance users can customize raylib just choosing desired features, defining some configuration flags on modules compilation. That way users can control library size and available functionality.
- Support of [configuration flags](https://github.com/raysan5/raylib/issues/200) on every raylib module. Advance users can customize raylib just choosing desired features, defining some configuration flags on modules compilation. That way users can control library size and available functionality.
Improved [build system](https://github.com/raysan5/raylib/blob/master/src/Makefile) for all supported platforms (Windows, Linux, OSX, RPI, Android, HTML5) with a unique Makefile to compile sources. Added support for Android compilation with a custom standalone toolchain and also multiple build compliation flags.
- Improved [build system](https://github.com/raysan5/raylib/blob/master/src/Makefile) for all supported platforms (Windows, Linux, OSX, RPI, Android, HTML5) with a unique Makefile to compile sources. Added support for Android compilation with a custom standalone toolchain and also multiple build compliation flags.
New [examples](http://www.raylib.com/examples.html) and [sample games](http://www.raylib.com/games.html) added. All samples material has been reviewed, removing useless examples and adding more comprehensive ones; all material has been ported to latest raylib version and tested in multiple platforms. Examples folder structure has been improved and also build systems.
- New [examples](http://www.raylib.com/examples.html) and [sample games](http://www.raylib.com/games.html) added. All samples material has been reviewed, removing useless examples and adding more comprehensive ones; all material has been ported to latest raylib version and tested in multiple platforms. Examples folder structure has been improved and also build systems.
Improved library consistency and organization in general. Functions and parameters have been renamed, some parts of the library have been cleaned and simplyfied, some functions has been moved to examples (lighting, Oculus Rift CV1 support) towards a more generic library implementation. Lots of hours have been invested in this process...
- Improved library consistency and organization in general. Functions and parameters have been renamed, some parts of the library have been cleaned and simplyfied, some functions has been moved to examples (lighting, Oculus Rift CV1 support) towards a more generic library implementation. Lots of hours have been invested in this process...
Some other features: Gamepad support on HTML5, RPI touch screen support, 32bit audio support, frames timing improvements, public log system, rres file format support, automatic GIF recording...
@@ -159,17 +159,17 @@ notes on raylib 1.8
October 2017, around 5 months after latest raylib version, another release is published: raylib 1.8. Again, several modules of the library have been reviewed and some new functionality added. Main changes of this new release are:
[Procedural image generation](https://github.com/raysan5/raylib/blob/master/examples/textures/textures_image_generation.c) function, a set of new functions have been added to generate gradients, checked, noise and cellular images from scratch. Image generation could be useful for certain textures or learning pourpouses.
- [Procedural image generation](https://github.com/raysan5/raylib/blob/master/examples/textures/textures_image_generation.c) function, a set of new functions have been added to generate gradients, checked, noise and cellular images from scratch. Image generation could be useful for certain textures or learning pourpouses.
[Parametric mesh generation](https://github.com/raysan5/raylib/blob/master/examples/models/models_mesh_generation.c) functions, create 3d meshes from scratch just defining a set of parameters, meshes like cube, sphere, cylinder, torus, knot and more can be very useful for prototyping or for lighting and texture testing.
- [Parametric mesh generation](https://github.com/raysan5/raylib/blob/master/examples/models/models_mesh_generation.c) functions, create 3d meshes from scratch just defining a set of parameters, meshes like cube, sphere, cylinder, torus, knot and more can be very useful for prototyping or for lighting and texture testing.
PBR Materials support, a completely redesigned shaders and material system allows advance materials definition and usage, with fully customizable shaders. Some new functions have been added to generate the environment textures required for PBR shading and a a new complete [PBR material example](https://github.com/raysan5/raylib/blob/master/examples/models/models_material_pbr.c) is also provided for reference.
- PBR Materials support, a completely redesigned shaders and material system allows advance materials definition and usage, with fully customizable shaders. Some new functions have been added to generate the environment textures required for PBR shading and a a new complete [PBR material example](https://github.com/raysan5/raylib/blob/master/examples/models/models_material_pbr.c) is also provided for reference.
Custom Android APK build pipeline with [simple Makefile](https://github.com/raysan5/raylib/blob/master/templates/simple_game/Makefile). Actually, full code building mechanism based on plain Makefile has been completely reviewed and Android building has been added for sources and also for examples and templates building into final APK package. This way, raylib Android building has been greatly simplified and integrated seamlessly into standard build scripts.
- Custom Android APK build pipeline with [simple Makefile](https://github.com/raysan5/raylib/blob/master/templates/simple_game/Makefile). Actually, full code building mechanism based on plain Makefile has been completely reviewed and Android building has been added for sources and also for examples and templates building into final APK package. This way, raylib Android building has been greatly simplified and integrated seamlessly into standard build scripts.
[rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) module has been completely reviewed and most of the functions renamed for consistency. This way, standalone usage of rlgl is promoted, with a [complete example provided](https://github.com/raysan5/raylib/blob/master/examples/others/rlgl_standalone.c). rlgl offers a pseudo-OpenGL 1.1 immediate-mode programming-style layer, with backends to multiple OpenGL versions.
- [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) module has been completely reviewed and most of the functions renamed for consistency. This way, standalone usage of rlgl is promoted, with a [complete example provided](https://github.com/raysan5/raylib/blob/master/examples/others/rlgl_standalone.c). rlgl offers a pseudo-OpenGL 1.1 immediate-mode programming-style layer, with backends to multiple OpenGL versions.
[raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h) library has been also reviewed to align with other advance math libraries like [GLM](https://github.com/g-truc/glm). Matrix math has been improved and simplified, some new Quaternion functions have been added and Vector3 functions have been renamed all around the library for consistency with new Vector2 functionality.
- [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h) library has been also reviewed to align with other advance math libraries like [GLM](https://github.com/g-truc/glm). Matrix math has been improved and simplified, some new Quaternion functions have been added and Vector3 functions have been renamed all around the library for consistency with new Vector2 functionality.
Additionally, as always, examples and templates have been reviewed to work with new version (some new examples have been added), all external libraries have been updated to latest stable version and latest Notepad++ and MinGW have been configured to work with new raylib. For a full list of changes, just check [CHANGELOG](CHANGELOG).
@@ -182,17 +182,17 @@ It's been 9 month since last raylib version was published, a lots of things have
In **raylib 2.0** the full API has been carefully reviewed for better consistency, some new functionality has been added and the overall raylib experience has been greatly improved... The key features of new version are:
**Complete removal of external dependencies.** Finally, raylib does not require external libraries to be installed and linked along with raylib, all required libraries are contained and compiled within raylib. Obviously some external libraries are required but only the strictly platform-dependant ones, the ones that come installed with the OS. So, raylib becomes a self-contained platform-independent games development library.
- **Complete removal of external dependencies.** Finally, raylib does not require external libraries to be installed and linked along with raylib, all required libraries are contained and compiled within raylib. Obviously some external libraries are required but only the strictly platform-dependant ones, the ones that come installed with the OS. So, raylib becomes a self-contained platform-independent games development library.
**Full redesign of audio module to use the amazing miniaudio library**, along with external dependencies removal, OpenAL library has been replaced by [miniaudio](https://github.com/dr-soft/miniaudio), this brand new library offers automatic dynamic linking with default OS audio systems. Undoubtly, the perfect low-level companion for raylib audio module!
- **Full redesign of audio module to use the amazing miniaudio library**, along with external dependencies removal, OpenAL library has been replaced by [miniaudio](https://github.com/dr-soft/miniaudio), this brand new library offers automatic dynamic linking with default OS audio systems. Undoubtly, the perfect low-level companion for raylib audio module!
**Support for continuous integration building*** through AppVeyor and Travis CI. Consequently, raylib GitHub develop branch has been removed, simplyfing the code-base to a single master branch, always stable. Every time a new commit is deployed, library is compiled for **up-to 12 different configurations**, including multiple platforms, 32bit/64bit and multiple compiler options! All those binaries are automatically attached to any new release!
- **Support for continuous integration building*** through AppVeyor and Travis CI. Consequently, raylib GitHub develop branch has been removed, simplyfing the code-base to a single master branch, always stable. Every time a new commit is deployed, library is compiled for **up-to 12 different configurations**, including multiple platforms, 32bit/64bit and multiple compiler options! All those binaries are automatically attached to any new release!
**More platforms supported and tested**, including BSD family (FreeBSD, openBSD, NetBSD, DragonFly) and Linux-based family platforms (openSUSE, Debian, Ubuntu, Arch, NixOS...). raylib has already been added to some package managers! Oh, and last but not less important, **Android 64bit** is already supported by raylib!
- **More platforms supported and tested**, including BSD family (FreeBSD, openBSD, NetBSD, DragonFly) and Linux-based family platforms (openSUSE, Debian, Ubuntu, Arch, NixOS...). raylib has already been added to some package managers! Oh, and last but not less important, **Android 64bit** is already supported by raylib!
**Support for TCC compiler!** Thanks to the lack of external dependencies, raylib can now be easily compiled with a **minimal toolchain**, like the one provide by Tiny C Compiler. It opens the door to an amazing future, allowing, for example, static linkage of libtcc for **runtime compilation of raylib-based code**... and the library itself if required! Moreover, TCC is blazing fast, it can compile all raylib in a couple of seconds!
- **Support for TCC compiler!** Thanks to the lack of external dependencies, raylib can now be easily compiled with a **minimal toolchain**, like the one provide by Tiny C Compiler. It opens the door to an amazing future, allowing, for example, static linkage of libtcc for **runtime compilation of raylib-based code**... and the library itself if required! Moreover, TCC is blazing fast, it can compile all raylib in a couple of seconds!
Refactored all raylib configuration #defines into a **centralized `config.h` header**, with more than **40 possible configuration options** to compile a totally customizable raylib version including only desired options like supported file-formats or specific functionality support. It allows generating a trully ligth-weight version of the library if desired!
- Refactored all raylib configuration #defines into a **centralized `config.h` header**, with more than **40 possible configuration options** to compile a totally customizable raylib version including only desired options like supported file-formats or specific functionality support. It allows generating a trully ligth-weight version of the library if desired!
A part of that, lots of new features, like a brand **new font rendering and packaging system** for TTF fonts with **SDF support** (thanks to the amazing STB headers), new functions for **CPU image data manipulation**, new orthographic 3d camera mode, a complete review of `raymath.h` single-file header-only library for better consistency and performance, new examples and way, [way more](https://github.com/raysan5/raylib/blob/master/CHANGELOG).
@@ -203,25 +203,91 @@ notes on raylib 2.5
After almost one years since latest raylib installment, here it is **raylib 2.5**. A lot of work has been put on this new version and consequently I decided to bump versioning several digits. The complete list of changes and additions is humungous, details can be found in the [CHANGELOG](CHANGELOG), and here it is a short recap with the highlight improvements.
New **window management and filesystem functions** to query monitor information, deal with clipboard, check directory files info and even launch a URL with default system web browser. Experimental **High-DPI monitor support** has also been added through a compile flag.
- New **window management and file system functions** to query monitor information, deal with clipboard, check directory files info and even launch a URL with default system web browser. Experimental **High-DPI monitor support** has also been added through a compile flag.
**Redesigned Gamepad mechanism**, now generic for all platforms and gamepads, no more specific gamepad configurations.
- **Redesigned Gamepad mechanism**, now generic for all platforms and gamepads, no more specific gamepad configurations.
**Redesigned UWP input system**, now raylib supports UWP seamlessly, previous implementation required a custom input system implemented in user code.
`rlgl` module has been redesigned to **support a unique buffer for shapes drawing batching**, including LINES, TRIANGLES, QUADS in the same indexed buffer, also added support for multi-buffering if required. Additionally, `rlPushMatrix()`/`rlPopMatrix()` functionality has been reviewed to behave exactly like OpenGL 1.1, `models_rlgl_solar_system` example has been added to illustrate this behaviour.
- `rlgl` module has been redesigned to **support a unique buffer for shapes drawing batching**, including LINES, TRIANGLES, QUADS in the same indexed buffer, also added support for multi-buffering if required. Additionally, `rlPushMatrix()`/`rlPopMatrix()` functionality has been reviewed to behave exactly like OpenGL 1.1, `models_rlgl_solar_system` example has been added to illustrate this behaviour.
**VR simulator** has been reviewed to **allow custom configuration of Head-Mounted-Device parameters and distortion shader**, `core_vr_simulator` has been properly adapted to showcase this new functionality, now the VR simulator is a generic configurable stereo rendering system that allows any VR device simulation with just a few lines of code or even dynamic tweaking of HMD parameters.
- **VR simulator** has been reviewed to **allow custom configuration of Head-Mounted-Device parameters and distortion shader**, `core_vr_simulator` has been properly adapted to showcase this new functionality, now the VR simulator is a generic configurable stereo rendering system that allows any VR device simulation with just a few lines of code or even dynamic tweaking of HMD parameters.
Support for **Unicode text drawing**; now raylib processes UTF8 strings on drawing, supporting Unicode codepoints, allowing rendering mostly any existent language (as long as the font with the glyphs is provided). An amazing example showing this feature has also been added: `text_unicode`.
- Support for **Unicode text drawing**; now raylib processes UTF8 strings on drawing, supporting Unicode codepoints, allowing rendering mostly any existent language (as long as the font with the glyphs is provided). An amazing example showing this feature has also been added: `text_unicode`.
Brand **new text management API**, with the addition of multiple functions to deal with string data, including functionality like replace, insert, join, split, append, to uppercase, to lower... Note that most of those functions are intended for text management on rendering, using pre-loaded internal buffers, avoiding new memory allocation that user should free manually.
- Brand **new text management API**, with the addition of multiple functions to deal with string data, including functionality like replace, insert, join, split, append, to uppercase, to lower... Note that most of those functions are intended for text management on rendering, using pre-loaded internal buffers, avoiding new memory allocation that user should free manually.
Multiple **new shapes and textures drawing functions** to support rings (`DrawRing()`, `DrawRingLines()`), circle sectors (`DrawCircleSector()`, `DrawCircleSectorLines()`), rounded rectangles (`DrawRectangleRounded()`, `DrawRectangleRoundedLines()`) and also n-patch textures (`DrawTextureNPatch()`), detailed examples have been added to illustrate all this new functionality.
- Multiple **new shapes and textures drawing functions** to support rings (`DrawRing()`, `DrawRingLines()`), circle sectors (`DrawCircleSector()`, `DrawCircleSectorLines()`), rounded rectangles (`DrawRectangleRounded()`, `DrawRectangleRoundedLines()`) and also n-patch textures (`DrawTextureNPatch()`), detailed examples have been added to illustrate all this new functionality.
Experimental **cubemap support**, to automatically load multiple cubemap layouts (`LoadTextureCubemap()`). It required some internal `rlgl` redesign to allow cubemap textures.
- Experimental **cubemap support**, to automatically load multiple cubemap layouts (`LoadTextureCubemap()`). It required some internal `rlgl` redesign to allow cubemap textures.
**Skeletal animation support for 3d models**, this addition implied a redesign of `Model` data structure to accomodate multiple mesh/multiple materials support and bones information. Multiple models functions have been reviewed and added on this process, also **glTF models loading support** has been added.
- **Skeletal animation support for 3d models**, this addition implied a redesign of `Model` data structure to accomodate multiple mesh/multiple materials support and bones information. Multiple models functions have been reviewed and added on this process, also **glTF models loading support** has been added.
This is a just a brief list with some of the changes of the new **raylib 2.5** but there is way more, about **70 new functions** have been added and several subsystems have been redesigned. More than **30 new examples** have been created to show the new functionalities and better illustrate already available ones.
It has been a long year of hard work to make raylib a solid technology to develop new products over it.
notes on raylib 3.0
-------------------
After **10 months of intense development**, new raylib version is ready. Despite primary intended as a minor release, the [CHANGELIST](CHANGELOG) has grown so big and the library has changed so much internally that it finally became a major release. Library **internal ABI** has reveived a big redesign and review, targeting portability, integration with other platforms and making it a perfect option for other progamming [language bindings](BINDINGS.md).
- All **global variables** from the multiple raylib modules have been moved to a **global context state**, it has several benefits, first, better code readability with more comprehensive variables naming and categorization (organized by types, i.e. `CORE.Window.display.width`, `CORE.Input.Keyboard.currentKeyState` or `RLGL.State.modelview`). Second, it allows better memory management to load global context state dynamically when required (not at the moment), making it easy to implement a **hot-reloading mechanism** if desired.
- All **memory allocations** on raylib and its dependencies now use `RL_MALLOC`, `RL_FREE` and similar macros. Now users can easely hook their own memory allocations mechanism if desired, having more control over memory allocated internally by the library. Additionally, it makes it easier to port the library to embedded devices where memory control is critical. For more info check raylib issue #1074.
- All **I/O file accesses** from raylib are being moved to **memory data access**, now all I/O file access is centralized into just four functions: `LoadFileData()`, `SaveFileData()`, `LoadFileText()`, `SaveFileText()`. Users can just update those functions to any I/O file system. This change makes it easier to integrate raylib with **Virtual File Systems** or custom I/O file implementations.
- All **raylib data structures** have been reviewed and optimized for pass-by-value usage. One of raylib distinctive design decisions is that most of its functions receive and return data by value. This design makes raylib really simple for newcomers, avoiding pointers and allowing complete access to all structures data in a simple way. The downside is that data is copied on stack every function call and that copy could be costly so, all raylib data structures have been optimized to **stay under 64 bytes** for fast copy and retrieve.
- All **raylib tracelog messages** have been reviewd and categorized for a more comprehensive output information when developing raylib applications, now all display, input, timer, platform, auxiliar libraries, file-accesses, data loading/unloading issues are properly reported with more detailed and visual messages.
- `raudio` module has been internally reviewed to accomodate the new `Music` structure (converted from previous pointer format) and the module has been adapted to the **highly improved** [`miniaudio v0.10`](https://github.com/dr-soft/miniaudio).
- `text` module reviewed to **improve fonts generation** and text management functions, `Font` structure has been redesigned to better accomodate characters data, decoupling individual characters as `Image` glyphs from the font atlas parameters. Several improvements have been made to better support Unicode strings with UTF-8 encoding.
- **Multiple new examples added** (most of them contributed by raylib users) and all examples reviewed for correct execution on most of the supported platforms, specially Web and Raspberry Pi. A detailed categorized table has been created on github for easy examples navigation and code access.
- New **GitHub Actions CI** system has been implemented for Windows, Linux and macOS code and examples compilation on every new commit or PR to make sure library keeps stable and usable with no breaking bugs.
Note that only key changes are listed here but there is way more! About **30 new functions**, multiple functions reviewed, bindings to [+40 programming languages](https://github.com/raysan5/raylib/blob/master/BINDINGS.md) and great samples/demos/tutorials [created by the community](https://discord.gg/VkzNHUE), including raylib integration with [Spine](https://github.com/WEREMSOFT/spine-raylib-runtimes), [Unity](https://unitycoder.com/blog/2019/12/09/using-raylib-dll-in-unity/), [Tiled](https://github.com/OnACoffeeBreak/raylib_tiled_import_with_tmx), [Nuklear](http://bedroomcoders.co.uk/implementing-a-3d-gui-with-raylib/), [enet](https://github.com/nxrighthere/NetDynamics) and [more](https://github.com/raysan5/raylib/issues/1079)!
It has been **10 months of improvements** to create the best raylib ever.
Welcome to **raylib 3.0**.
notes on raylib 3.5
-------------------
It's December 25th... this crazy 2020 is about to finish and finally the holidays gave me some time to put a new version of raylib. It's been **9 months since last release** and last November raylib become 7 years old... I was not able to release this new version back then but here it is. Many changes and improvements have happened in those months and, even, last August, raylib was awarded with an [Epic Megagrant](https://www.unrealengine.com/en-US/blog/epic-megagrants-fall-2020-update)! Bindings list kept growing to [+50 programming languages](BINDINGS.md) and some new platforms have been supported. Let's see this new version details:
First, some general numbers of this new update:
- **+650** commits since previous RELEASE
- **+30** functions ADDED (for a TOTAL of **475**!)
- **+90** functions REVIEWED/REDESIGNED
- **+30** contributors (for a TOTAL of **170**!)
- **+8** new examples (for a TOTAL of **+120**!)
Here the list with some highlights for `raylib 3.5`.
- NEW **Platform** supported: **Raspberry Pi 4 native mode** (no X11 windows) through [DRM](https://en.wikipedia.org/wiki/Direct_Rendering_Manager) subsystem and GBM API. Actually this is a really interesting improvement because it opens the door to raylib to support other embedded platforms (Odroid, GameShell, NanoPi...). Also worth mentioning the un-official homebrew ports of raylib for [PS4](https://github.com/orbisdev/orbisdev-orbisGl2) and PSVita.
- NEW **configuration options** exposed: For custom raylib builds, `config.h` now exposes **more than 150 flags and defines** to build raylib with only the desired features, for example, it allows to build a minimal raylib library in just some KB removing all external data filetypes supported, very useful to generate **small executables or embedded devices**.
- NEW **automatic GIF recording** feature: Actually, automatic GIF recording (**CTRL+F12**) for any raylib application has been available for some versions but this feature was really slow and low-performant using an old gif library with many file-accesses. It has been replaced by a **high-performant alternative** (`msf_gif.h`) that operates directly on memory... and actually works very well! Try it out!
- NEW **RenderBatch** system: `rlgl` module has been redesigned to support custom **render batches** to allow grouping draw calls as desired, previous implementation just had one default render batch. This feature has not been exposed to raylib API yet but it can be used by advance users dealing with `rlgl` directly. For example, multiple `RenderBatch` can be created for 2D sprites and 3D geometry independently.
- NEW **Framebuffer** system: `rlgl` module now exposes an API for custom **Framebuffer attachments** (including cubemaps!). raylib `RenderTexture` is a basic use-case, just allowing color and depth textures, but this new API allows the creation of more advance Framebuffers with multiple attachments, like the **G-Buffers**. `GenTexture*()` functions have been redesigned to use this new API.
- Improved **software rendering**: raylib `Image*()` API is intended for software rendering, for those cases when **no GPU or no Window is available**. Those functions operate directly with **multi-format** pixel data on RAM and they have been completely redesigned to be way faster, specially for small resolutions and retro-gaming. Low-end embedded devices like **microcontrollers with custom displays** could benefit of this raylib functionality!
- File **loading from memory**: Multiple functions have been redesigned to load data from memory buffers **instead of directly accessing the files**, now all raylib file loading/saving goes through a couple of functions that load data into memory. This feature allows **custom virtual-file-systems** and it gives more control to the user to access data already loaded in memory (i.e. images, fonts, sounds...).
- NEW **Window states** management system: raylib `core` module has been redesigned to support Window **state check and setup more easily** and also **before/after Window initialization**, `SetConfigFlags()` has been reviewed and `SetWindowState()` has been added to control Window minification, maximization, hidding, focusing, topmost and more.
- NEW **GitHub Actions** CI/CD system: Previous CI implementation has been reviewed and improved a lot to support **multiple build configurations** (platforms, compilers, static/shared build) and also an **automatic deploy system** has been implemented to automatically attach the diferent generated artifacts to every new release. As the system seems to work very good, previous CI platforms (AppVeyor/TravisCI) have been removed.
A part of those changes, many new functions have been added, some redundant functions removed and many functions have been reviewed for consistency with the full API (function name, parameters name and order, code formatting...). Again, this release represents is a **great improvement for raylib and marks the way forward** for the library. Make sure to check [CHANGELOG](CHANGELOG) for details! Hope you enjoy it!
Happy holidays! :)

View File

@@ -8,59 +8,100 @@ raylib is highly inspired by Borland BGI graphics lib and by XNA framework and i
Ready to learn? Jump to [code examples!](http://www.raylib.com/examples.html)
[![Build Status](https://travis-ci.org/raysan5/raylib.svg?branch=master)](https://travis-ci.org/raysan5/raylib)
[![https://ci.appveyor.com/api/projects/status/github/raysan5/raylib?svg=true](https://ci.appveyor.com/api/projects/status/github/raysan5/raylib?svg=true)](https://ci.appveyor.com/project/raysan5/raylib)
[![Chat on Discord](https://img.shields.io/discord/426912293134270465.svg?logo=discord)](https://discord.gg/VkzNHUE)
[![License](https://img.shields.io/badge/license-zlib%2Flibpng-blue.svg)](LICENSE)
[![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Follow)](https://twitter.com/raysan5)
<br>
[![Actions Status](https://github.com/raysan5/raylib/workflows/CI%20-%20Source%20&%20Examples%20-%20Windows/badge.svg)](https://github.com/raysan5/raylib/actions)
[![Actions Status](https://github.com/raysan5/raylib/workflows/CI%20-%20Source%20&%20Examples%20-%20Linux/badge.svg)](https://github.com/raysan5/raylib/actions)
[![Actions Status](https://github.com/raysan5/raylib/workflows/CI%20-%20Source%20&%20Examples%20-%20macOS/badge.svg)](https://github.com/raysan5/raylib/actions)
[![GitHub contributors](https://img.shields.io/github/contributors/raysan5/raylib)](https://github.com/raysan5/raylib/graphs/contributors)
[![GitHub All Releases](https://img.shields.io/github/downloads/raysan5/raylib/total)](https://github.com/raysan5/raylib/releases)
[![GitHub commits since tagged version](https://img.shields.io/github/commits-since/raysan5/raylib/3.0.0)](https://github.com/raysan5/raylib/commits/master)
[![License](https://img.shields.io/badge/license-zlib%2Flibpng-blue.svg)](LICENSE)
[![Chat on Discord](https://img.shields.io/discord/426912293134270465.svg?logo=discord)](https://discord.gg/VkzNHUE)
[![GitHub stars](https://img.shields.io/github/stars/raysan5/raylib?style=social)](https://github.com/raysan5/raylib/stargazers)
[![Twitter Follow](https://img.shields.io/twitter/follow/raysan5?style=social)](https://twitter.com/raysan5)
[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/raylib?style=social)](https://www.reddit.com/r/raylib/)
[![Windows](https://github.com/raysan5/raylib/workflows/Windows/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3AWindows)
[![Linux](https://github.com/raysan5/raylib/workflows/Linux/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3ALinux)
[![macOS](https://github.com/raysan5/raylib/workflows/macOS/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3AmacOS)
[![Android](https://github.com/raysan5/raylib/workflows/Android/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3AAndroid)
[![WebAssembly](https://github.com/raysan5/raylib/workflows/WebAssembly/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3AWebAssembly)
features
--------
- **NO external dependencies**, all required libraries are bundled into raylib
- Multiple platforms supported: **Windows, Linux, MacOS, Android... and many more!**
- Multiple platforms supported: **Windows, Linux, MacOS, RPI, Android, HTML5... and more!**
- Written in plain C code (C99) in PascalCase/camelCase notation
- Hardware accelerated with OpenGL (**1.1, 2.1, 3.3 or ES 2.0**)
- **Unique OpenGL abstraction layer** (usable as standalone module): [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h)
- Multiple **Fonts** formats supported (XNA fonts, AngelCode fonts, TTF)
- Multiple **Fonts** formats supported (TTF, XNA fonts, AngelCode fonts)
- Outstanding texture formats support, including compressed formats (DXT, ETC, ASTC)
- **Full 3D support**, including 3D Shapes, Models, Billboards, Heightmaps and more!
- Flexible Materials system, supporting classic maps and **PBR maps**
- **Animated 3D models** supported (skeletal bones animation)
- Shaders support, including model and postprocessing shaders.
- Shaders support, including model and **postprocessing** shaders.
- **Powerful math module** for Vector, Matrix and Quaternion operations: [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h)
- Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, XM, MOD)
- **VR stereo rendering** support with configurable HMD device parameters
- Huge examples collection with [+95 code examples](https://www.raylib.com/examples.html)!
- Bindings to [+25 programming languages](https://github.com/raysan5/raylib/blob/master/BINDINGS.md)!
- Huge examples collection with [+120 code examples](https://github.com/raysan5/raylib/tree/master/examples)!
- Bindings to [+50 programming languages](https://github.com/raysan5/raylib/blob/master/BINDINGS.md)!
- Free and open source.
raylib uses on its [core](https://github.com/raysan5/raylib/blob/master/src/core.c) module the outstanding [GLFW3](http://www.glfw.org/) library, embedded in the form of [rglfw](https://github.com/raysan5/raylib/blob/master/src/rglfw.c) module, to avoid external dependencies.
raylib uses on its [raudio](https://github.com/raysan5/raylib/blob/master/src/raudio.c) module, the amazing [miniaudio](https://github.com/dr-soft/miniaudio) library to support multiple platforms and multiple audio backends.
raylib uses internally multiple single-file header-only libraries to support different fileformats loading and saving, all those libraries are embedded with raylib and available in [src/external](https://github.com/raysan5/raylib/tree/master/src/external) directory. Check [raylib Wiki](https://github.com/raysan5/raylib/wiki/raylib-dependencies) for a detailed list.
raylib uses internally several single-file header-only libraries to support different fileformats loading and saving, all those libraries are embedded with raylib and available in [src/external](https://github.com/raysan5/raylib/tree/master/src/external) directory. Check [raylib Wiki](https://github.com/raysan5/raylib/wiki/raylib-dependencies) for a detailed list.
*On Android platform, `native_app_glue module` module (provided by Android NDK) and native Android libraries are used to manage window/context, inputs and activity life cycle.*
*On Android platform, `native_app_glue` module (provided by Android NDK) and native Android libraries are used to manage window/context, inputs and activity life cycle.*
*On Raspberry Pi platform (native mode), `Videocore API` and `EGL` libraries are used for window/context management. Inputs are processed using `evdev` Linux libraries*
*On Raspberry Pi 0,1,2,3 platform (native mode), `Videocore API` and `EGL` libraries are used for window/context management. Inputs are processed using `evdev` Linux libraries*
*On Raspberry Pi 4 platform (native mode), `DRM subsystem` and `GBM API` libraries are used for window/context management. Inputs are processed using `evdev` Linux libraries*
*On Web platform, raylib uses `emscripten` provided libraries for several input events management, specially noticeable the touch events support.*
build and installation
----------------------
Binary releases for Windows, Linux and macOS are available at the [Github Releases page](https://github.com/raysan5/raylib/releases). raylib is also available via multiple package managers on multiple OS distributions. Check [raylib Wiki](https://github.com/raysan5/raylib/wiki) for more info.
raylib binary releases for Windows, Linux and macOS are available at the [Github Releases page](https://github.com/raysan5/raylib/releases).
If you wish to build raylib yourself, [the raylib Wiki](https://github.com/raysan5/raylib/wiki) also contains detailed instructions on how to approach that.
raylib is also available via multiple [package managers](https://github.com/raysan5/raylib/issues/613) on multiple OS distributions.
raylib has been developed using two tools:
#### Installing and building raylib via vcpkg
* Notepad++ (text editor) - [http://notepad-plus-plus.org](http://notepad-plus-plus.org/)
* MinGW (GCC compiler) - [http://www.mingw.org](http://www.mingw.org/)
You can download and install raylib using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
Those are the tools recommended to enjoy raylib development.
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
vcpkg install raylib
*The raylib port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.*
#### Building raylib on multiple platforms
[raylib Wiki](https://github.com/raysan5/raylib/wiki#development-platforms) contains detailed instructions on building and usage on multiple platforms.
- [Working on Windows](https://github.com/raysan5/raylib/wiki/Working-on-Windows)
- [Working on macOS](https://github.com/raysan5/raylib/wiki/Working-on-macOS)
- [Working on GNU Linux](https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux)
- [Working on FreeBSD](https://github.com/raysan5/raylib/wiki/Working-on-FreeBSD)
- [Working on Raspberry Pi](https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi)
- [Working for Android](https://github.com/raysan5/raylib/wiki/Working-for-Android)
- [Working for Web (HTML5)](https://github.com/raysan5/raylib/wiki/Working-for-Web-(HTML5))
- [Working for UWP (Universal Window Platform)](https://github.com/raysan5/raylib/wiki/Working-for-UWP)
- [Working anywhere with CMake](https://github.com/raysan5/raylib/wiki/Working-with-CMake)
*Note that Wiki is open for edit, if you find some issue while building raylib for your target platform, feel free to edit the Wiki or open and issue related to it.*
#### Using raylib with multiple IDEs
raylib has been developed on Windows platform using [Notepad++](https://notepad-plus-plus.org/) and [MinGW GCC](http://mingw-w64.org/doku.php) compiler but it can be used with other IDEs on multiple platforms.
[Projects directory](https://github.com/raysan5/raylib/tree/master/projects) contains several ready-to-use **project templates** to build raylib and code examples with multiple IDEs.
*Note that there are lots of IDEs supported, some of the provided templates could require some review, please, if you find some issue with some template or you think they could be improved, feel free to send a PR or open a related issue.*
contact
-------
@@ -73,9 +114,9 @@ contact
* Patreon: [https://www.patreon.com/raylib](https://www.patreon.com/raylib)
* YouTube: [https://www.youtube.com/channel/raylib](https://www.youtube.com/channel/UC8WIBkhYb5sBNqXO1mZ7WSQ)
If you are using raylib and you enjoy it, please, join our [Discord server](https://discord.gg/VkzNHUE).
If you are using raylib and enjoying it, please, join our [Discord server](https://discord.gg/VkzNHUE) and let us know! :)
license
-------
raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check [LICENSE](LICENSE.md) for further details.
raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check [LICENSE](LICENSE) for further details.

View File

@@ -3,14 +3,20 @@ roadmap
Here it is a wish-list with features and ideas to improve the library. Note that features listed here are quite high-level and could be long term additions for the library. Current version of raylib is complete and functional but there is a lot of room for improvement.
[raylib source code](https://github.com/raysan5/raylib/tree/master/src) has some *TODO* marks around code with pending things to review and improve.
Also, check [GitHub Issues](https://github.com/raysan5/raylib/issues) for further details!
[raylib source code](https://github.com/raysan5/raylib/tree/master/src) has some *TODO* marks around code with pending things to review and improve. Check also [GitHub Issues](https://github.com/raysan5/raylib/issues) for further details!
**raylib 2.x**
- [ ] rnet: raylib network module
- [ ] rres: raylib resource packer
- [ ] rlvk: raylib Vulkan API support (GRAPHICS_API_VULKAN)
- [ ] Basic CPU/GPU stats sytem (memory, draws, time...)
**raylib 3.x**
- [ ] Network module (UDP): `rnet` ([info](https://github.com/raysan5/raylib/issues/753))
- [ ] Custom raylib resource packer: `rres` ([info](https://github.com/raysan5/rres))
- [ ] Basic CPU/GPU stats system (memory, draws, time...)
- [x] Continuous Deployment using GitHub Actions
**raylib 3.0**
- [x] Custom memory allocators support
- [x] Global variables moved to global context
- [x] Optimize data structures for pass-by-value
- [x] Trace log messages redesign ([info](https://github.com/raysan5/raylib/issues/1065))
- [x] Continuous Integration using GitHub Actions
**raylib 2.5**
- [x] Support Animated models

View File

@@ -6,8 +6,42 @@ The following people has contributed with a generous donation to the raylib proj
## 🥈 Silver Contributors
...
- Jonathan Johnson ([@ecton](https://github.com/ecton))
- Eric J. ([@ProfJski](https://github.com/ProfJski))
- Rudy Faile ([@rfaile313](https://github.com/rfaile313)) - https://rudyfaile.com/
- devdad ([@devdad](https://github.com/devdad))
- frithrah ([@frithrah](https://github.com/frithrah))
- Zach Geis ([@zacgeis](https://github.com/zacgeis))
## 🥉 Bronze Contributors
...
- minirop ([@minirop](https://github.com/minirop))
- Daniel Gómez ([@Koocachookies](https://github.com/Koocachookies))
- Sergio ([@anidealgift](https://github.com/anidealgift))
- JFons ([@JFonS](https://github.com/JFonS))
- Marc Agüera ([@maguera93](https://github.com/maguera93))
- Pau Fernández ([@pauek](https://github.com/pauek))
- Jens Pitkänen ([@neonmoe](https://github.com/neonmoe))
- Snowminx ([@Gamerfiend](https://github.com/Gamerfiend))
- NimbusFox ([@NimbusFox](https://github.com/NimbusFox))
- Robin Mattheussen ([@romatthe](https://github.com/romatthe))
- Rahul Nair ([@rahulunair](https://github.com/rahulunair))
- Grant Haywood ([@cinterloper](https://github.com/cinterloper))
- Terry Nguyen ([@terrehbyte](https://github.com/terrehbyte))
- albatros-hmd ([@albatros-hmd](https://github.com/albatros-hmd))
- Benjamin Stigsen ([@BenStigsen](https://github.com/BenStigsen))
- Louis Johnson ([@louisgjohnson](https://github.com/louisgjohnson))
- Dani Martin ([@danimartin82](https://github.com/danimartin82))
- Tommi Sinivuo ([@TommiSinivuo](https://github.com/TommiSinivuo))
- Joakim Wennergren ([@joakimwennergren](https://github.com/joakimwennergren))
- Richard Urbanec ([@Poryg1](https://github.com/Poryg1))
- pmgl ([@pmgl](https://github.com/pmgl))
- cob ([@majorcob](https://github.com/majorcob))
- Samuel Batista ([@gamedevsam](https://github.com/gamedevsam))
- Alexandre Chêne ([@kooparse](https://github.com/kooparse))
- daddio69 ([@daddio69](https://github.com/daddio69))
- James Ghawaly ([@jghawaly](https://github.com/jghawaly))
- jack ([@Jack-Ji](https://github.com/Jack-Ji))
- Merlyn Morgan-Graham ([@kavika13](https://github.com/kavika13))

View File

@@ -1,65 +0,0 @@
#os: Visual Studio 2015
clone_depth: 5
cache:
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml
init:
- cmake -E remove c:\programdata\chocolatey\bin\cpack.exe
- set PATH=%PATH:C:\Program Files (x86)\Git\usr\bin;=%
- set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- if [%BITS%]==[32] set MINGW=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32
- if [%BITS%]==[64] set MINGW=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64
- if [%COMPILER%]==[mingw] set PATH=%MINGW%\bin;%PATH%
- set RAYLIB_PACKAGE_SUFFIX=-Win%BITS%-%COMPILER%
- set VERBOSE=1
environment:
matrix:
- compiler: mingw
bits: 32
examples: ON
- compiler: mingw
bits: 64
examples: ON
- compiler: msvc15
bits: 32
examples: OFF
- compiler: msvc15
bits: 64
examples: OFF
before_build:
- if [%compiler%]==[mingw] set CFLAGS=-m%BITS% & set LDFLAGS=-m%BITS% & set GENERATOR="MinGW Makefiles"
- if [%COMPILER%]==[msvc15] if [%BITS%]==[32] set GENERATOR="Visual Studio 14 2015"
- if [%COMPILER%]==[msvc15] if [%BITS%]==[64] set GENERATOR="Visual Studio 14 2015 Win64"
- mkdir build
- cd build
build_script:
- cmake -G %GENERATOR% -DSTATIC=ON -DSHARED=ON -DBUILD_EXAMPLES=%examples% -DBUILD_GAMES=%examples% -DINCLUDE_EVERYTHING=ON ..
- cmake --build . --target install
after_build:
- cmake --build . --target package
before_test:
test_script:
artifacts:
- path: 'build\*.zip'
deploy:
- provider: GitHub
auth_token:
secure: OxKnnT3tlkPl9365cOO84rDWU4UkHIYJc0D3r3Tv7rB3HaR2BBhlhCnl7g3nuOJy
artifact: /.*\.zip/
draft: false
prerelease: false
force_update: true
on:
branch: master
appveyor_repo_tag: true # deploy on tag push only

View File

@@ -1,13 +0,0 @@
# Populates a ${FILESYSTEM_LACKS_SYMLINKS} variable
message(STATUS "Testing if file system supports symlinks")
execute_process(
COMMAND ${CMAKE_COMMAND} -E create_symlink CMakeLists.txt "${CMAKE_CURRENT_BINARY_DIR}/TestingIfSymlinkWorks"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE FILESYSTEM_LACKS_SYMLINKS
)
If (FILESYSTEM_LACKS_SYMLINKS)
message(STATUS "Testing if file system supports symlinks -- unsupported")
else()
message(STATUS "Testing if file system supports symlinks -- supported")
endif()

26
cmake/JoinPaths.cmake Normal file
View File

@@ -0,0 +1,26 @@
# This module provides function for joining paths
# known from most languages
#
# Original license:
# SPDX-License-Identifier: (MIT OR CC0-1.0)
# Explicit permission given to distribute this module under
# the terms of the project as described in /LICENSE.rst.
# Copyright 2020 Jan Tojnar
# https://github.com/jtojnar/cmake-snips
#
# Modelled after Pythons os.path.join
# https://docs.python.org/3.7/library/os.path.html#os.path.join
# Windows not supported
function(join_paths joined_path first_path_segment)
set(temp_path "${first_path_segment}")
foreach(current_segment IN LISTS ARGN)
if(NOT ("${current_segment}" STREQUAL ""))
if(IS_ABSOLUTE "${current_segment}")
set(temp_path "${current_segment}")
else()
set(temp_path "${temp_path}/${current_segment}")
endif()
endif()
endforeach()
set(${joined_path} "${temp_path}" PARENT_SCOPE)
endfunction()

View File

@@ -1,12 +1,20 @@
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_PROCESSOR x86)
if (CMAKE_HOST_WIN32)
SET(EMSCRIPTEN_EXTENSION ".bat")
else ()
SET(EMSCRIPTEN_EXTENSION "")
endif()
SET(CMAKE_C_COMPILER emcc${EMSCRIPTEN_EXTENSION})
SET(CMAKE_CXX_COMPILER em++${EMSCRIPTEN_EXTENSION})
SET(CMAKE_C_COMPILER emcc)
SET(CMAKE_CXX_COMPILER em++)
if(NOT DEFINED CMAKE_AR)
find_program(CMAKE_AR NAMES emar)
find_program(CMAKE_AR NAMES emar${EMSCRIPTEN_EXTENSION})
endif()
if(NOT DEFINED CMAKE_RANLIB)
find_program(CMAKE_RANLIB NAMES emranlib)
find_program(CMAKE_RANLIB NAMES emranlib${EMSCRIPTEN_EXTENSION})
endif()
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

View File

@@ -28,7 +28,6 @@ if (APPLE AND NOT CMAKE_SYSTEM STRLESS "Darwin-18.0.0")
add_definitions(-DGL_SILENCE_DEPRECATION)
MESSAGE(AUTHOR_WARNING "OpenGL is deprecated starting with macOS 10.14 (Mojave)!")
endif()
set(OUTPUT_EXT)
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/rlgl_standalone.c)
include(CheckIncludeFile)
@@ -81,16 +80,16 @@ if(${PLATFORM} MATCHES "Android")
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_basic_lighting.c)
elseif(${PLATFORM} MATCHES "Web")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s ASYNCIFY")
# 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_C_FLAGS "${CMAKE_C_FLAGS} --shell-file ${CMAKE_SOURCE_DIR}/src/shell.html")
set(OUTPUT_EXT ".html")
set(CMAKE_EXECUTABLE_SUFFIX ".html")
# Remove the -rdynamic flag because otherwise emscripten
# does not generate HTML+JS+WASM files, only a non-working
# and fat HTML
string(REPLACE "-rdynamic" "" CMAKE_SHARED_LIBRARY_LINK_C_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
string(REPLACE "-rdynamic" "" CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}")
endif()
include_directories(BEFORE SYSTEM others/external/include)
@@ -103,7 +102,7 @@ endif()
foreach(example_source ${example_sources})
# Create the basename for the example
get_filename_component(example_name ${example_source} NAME)
string(REPLACE ".c" "${OUTPUT_EXT}" example_name ${example_name})
string(REPLACE ".c" "" example_name ${example_name})
# Setup the example
add_executable(${example_name} ${example_source})
@@ -125,7 +124,7 @@ if (${PLATFORM} MATCHES "Desktop")
foreach (example_source "others/rlgl_standalone.c")
# Create the basename for the example
get_filename_component(example_name ${example_source} NAME)
string(REPLACE ".c" "${OUTPUT_EXT}" example_name ${example_name})
string(REPLACE ".c" "" example_name ${example_name})
add_executable(${example_name} ${example_source})
add_dependencies(${example_name} raylib)
target_link_libraries(${example_name} ${raylib_LDFLAGS})

View File

@@ -25,8 +25,7 @@
# Define required raylib variables
PROJECT_NAME ?= raylib_examples
RAYLIB_VERSION ?= 2.5.0
RAYLIB_API_VERSION ?= 2
RAYLIB_VERSION ?= 3.5.0
RAYLIB_PATH ?= ..
# Define default options
@@ -96,6 +95,12 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
PLATFORM_OS=LINUX
endif
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
UNAMEOS=$(shell uname)
ifeq ($(UNAMEOS),Linux)
PLATFORM_OS=LINUX
endif
endif
# RAYLIB_PATH adjustment for different platforms.
# If using GNU make, we can get the full path to the top of the tree. Windows? BSD?
@@ -112,14 +117,17 @@ endif
ifeq ($(PLATFORM),PLATFORM_RPI)
RAYLIB_PATH ?= /home/pi/raylib
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
RAYLIB_PATH ?= /home/pi/raylib
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
# Emscripten required variables
EMSDK_PATH ?= C:/emsdk
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/fastcomp/emscripten
CLANG_PATH = $(EMSDK_PATH)/fastcomp/bin
PYTHON_PATH = $(EMSDK_PATH)/python/2.7.13.1_64bit/python-2.7.13.amd64
NODE_PATH = $(EMSDK_PATH)/node/12.9.1_64bit/bin
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
CLANG_PATH = $(EMSDK_PATH)/upstream/bin
PYTHON_PATH = $(EMSDK_PATH)/python/3.7.4-pywin32_64bit
NODE_PATH = $(EMSDK_PATH)/node/12.18.1_64bit/bin
export PATH = $(EMSDK_PATH);$(EMSCRIPTEN_PATH);$(CLANG_PATH);$(NODE_PATH);$(PYTHON_PATH);C:\raylib\MinGW\bin:$$(PATH)
endif
@@ -176,6 +184,9 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(PLATFORM_OS),LINUX)
MAKE = make
endif
ifeq ($(PLATFORM_OS),OSX)
MAKE = make
endif
endif
# Define compiler flags:
@@ -205,11 +216,6 @@ endif
# Additional flags for compiler (if desired)
#CFLAGS += -Wextra -Wmissing-prototypes -Wstrict-prototypes
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(PLATFORM_OS),WINDOWS)
# resource file contains windows executable icon and properties
# -Wl,--subsystem,windows hides the console window
CFLAGS += $(RAYLIB_PATH)/src/raylib.rc.data -Wl,--subsystem,windows
endif
ifeq ($(PLATFORM_OS),LINUX)
ifeq ($(RAYLIB_LIBTYPE),STATIC)
CFLAGS += -D_DEFAULT_SOURCE
@@ -223,6 +229,9 @@ endif
ifeq ($(PLATFORM),PLATFORM_RPI)
CFLAGS += -std=gnu99
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
CFLAGS += -std=gnu99 -DEGL_NO_X11
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
# -Os # size optimization
# -O2 # optimization level 2, if used, also set --memory-init-file 0
@@ -231,16 +240,16 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
# -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB)
# -s USE_PTHREADS=1 # multithreading support
# -s WASM=0 # disable Web Assembly, emitted by default
# -s EMTERPRETIFY=1 # enable emscripten code interpreter (very slow)
# -s EMTERPRETIFY_ASYNC=1 # support synchronous loops by emterpreter
# -s ASYNCIFY # lets synchronous C/C++ code interact with asynchronous JS
# -s FORCE_FILESYSTEM=1 # force filesystem to load/save files data
# -s ASSERTIONS=1 # enable runtime checks for common memory allocation errors (-O1 and above turn it off)
# --profiling # include information for code profiling
# --memory-init-file 0 # to avoid an external memory initialization code file (.mem)
# --preload-file resources # specify a resources folder for data compilation
CFLAGS += -s USE_GLFW=3 -s FORCE_FILESYSTEM=1 -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1 --preload-file $(dir $<)resources@resources
# --source-map-base # allow debugging in browser with source map
CFLAGS += -s USE_GLFW=3 -s ASYNCIFY -s TOTAL_MEMORY=67108864 -s FORCE_FILESYSTEM=1 $(dir $<)resources@resources
# NOTE: Simple raylib examples are compiled to be interpreter by emterpreter, that way,
# NOTE: Simple raylib examples are compiled to be interpreter with asyncify, that way,
# we can compile same code for ALL platforms with no change required, but, working on bigger
# projects, code needs to be refactored to avoid a blocking while() loop, moving Update and Draw
# logic to a self contained function: UpdateDrawFrame(), check core_basic_window_web.c for reference.
@@ -261,15 +270,17 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
INCLUDE_PATHS += -I/opt/vc/include/interface/vmcs_host/linux
INCLUDE_PATHS += -I/opt/vc/include/interface/vcos/pthreads
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
# DRM required libraries
INCLUDE_PATHS += -I/usr/include/libdrm
endif
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(PLATFORM_OS),BSD)
# Consider -L$(RAYLIB_H_INSTALL_PATH)
INCLUDE_PATHS += -I/usr/local/include
endif
ifeq ($(PLATFORM_OS),LINUX)
# Reset everything.
# Precedence: immediately local, installed version, raysan5 provided libs -I$(RAYLIB_H_INSTALL_PATH) -I$(RAYLIB_PATH)/release/include
INCLUDE_PATHS = -I$(RAYLIB_H_INSTALL_PATH) -isystem. -isystem$(RAYLIB_PATH)/src -isystem$(RAYLIB_PATH)/release/include -isystem$(RAYLIB_PATH)/src/external
INCLUDE_PATHS = -I$(RAYLIB_H_INSTALL_PATH) -I. -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external
endif
endif
@@ -277,6 +288,14 @@ endif
LDFLAGS = -L. -L$(RAYLIB_RELEASE_PATH) -L$(RAYLIB_PATH)/src
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(PLATFORM_OS),WINDOWS)
# resource file contains windows executable icon and properties
LDFLAGS += $(RAYLIB_PATH)/src/raylib.rc.data
# -Wl,--subsystem,windows hides the console window
ifeq ($(BUILD_MODE), RELEASE)
LDFLAGS += -Wl,--subsystem,windows
endif
endif
ifeq ($(PLATFORM_OS),BSD)
# Consider -L$(RAYLIB_INSTALL_PATH)
LDFLAGS += -L. -Lsrc -L/usr/local/lib
@@ -284,7 +303,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(PLATFORM_OS),LINUX)
# Reset everything.
# Precedence: immediately local, installed version, raysan5 provided libs
LDFLAGS = -L. -L$(RAYLIB_INSTALL_PATH) -L$(RAYLIB_RELEASE_PATH)
LDFLAGS = -L. -L$(RAYLIB_INSTALL_PATH) -L$(RAYLIB_RELEASE_PATH) -L$(RAYLIB_PATH)
endif
endif
@@ -292,6 +311,10 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
LDFLAGS += -L/opt/vc/lib
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
LDFLAGS += -lGLESv2 -lEGL -ldrm -lgbm
endif
# Define any libraries required on linking
# if you want to link libraries (libname.so or libname.a), use the -lname
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
@@ -344,9 +367,14 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
# NOTE: Required packages: libasound2-dev (ALSA)
LDLIBS = -lraylib -lbrcmGLESv2 -lbrcmEGL -lpthread -lrt -lm -lbcm_host -ldl
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
# Libraries for DRM compiling
# NOTE: Required packages: libasound2-dev (ALSA)
LDLIBS = -lraylib -lGLESv2 -lEGL -lpthread -lrt -lm -lgbm -ldrm -ldl
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
# Libraries for web (HTML5) compiling
LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.bc
LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.a
endif
# Define all object files required
@@ -372,7 +400,9 @@ CORE = \
core/core_scissor_test \
core/core_storage_values \
core/core_vr_simulator \
core/core_loading_thread
core/core_loading_thread \
core/core_quat_conversion \
core/core_window_flags
SHAPES = \
shapes/shapes_basic_shapes \
@@ -408,7 +438,9 @@ TEXTURES = \
textures/textures_background_scrolling \
textures/textures_sprite_button \
textures/textures_sprite_explosion \
textures/textures_bunnymark
textures/textures_bunnymark \
textures/textures_blend_modes \
textures/textures_draw_tiled
TEXT = \
text/text_raylib_fonts \
@@ -453,7 +485,11 @@ SHADERS = \
shaders/shaders_eratosthenes \
shaders/shaders_basic_lighting \
shaders/shaders_fog \
shaders/shaders_simple_mask
shaders/shaders_simple_mask \
shaders/shaders_spotlight \
shaders/shaders_hot_reloading \
shaders/shaders_rlgl_mesh_instanced \
shaders/shaders_multi_sample2d
AUDIO = \
audio/audio_module_playing \
@@ -477,8 +513,8 @@ all: $(CORE) $(SHAPES) $(TEXT) $(TEXTURES) $(MODELS) $(SHADERS) $(AUDIO) $(PHYSI
core: $(CORE)
shapes: $(SHAPES)
text: $(TEXT)
textures: $(TEXTURES)
text: $(TEXT)
models: $(MODELS)
shaders: $(SHADERS)
audio: $(AUDIO)
@@ -500,7 +536,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
del *.o *.exe /s
endif
ifeq ($(PLATFORM_OS),LINUX)
find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable|x-pie-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -fv
find . -type f -executable -delete
rm -fv *.o
endif
ifeq ($(PLATFORM_OS),OSX)
find . -type f -perm +ugo+x -delete
@@ -511,6 +548,10 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
find . -type f -executable -delete
rm -fv *.o
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
find . -type f -executable -delete
rm -fv *.o
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
del *.o *.html *.js
endif

View File

@@ -2,7 +2,7 @@
#
# raylib makefile for Android project (APK building)
#
# Copyright (c) 2017 Ramon Santamaria (@raysan5)
# Copyright (c) 2017-2020 Ramon Santamaria (@raysan5)
#
# This software is provided "as-is", without any express or implied warranty. In no event
# will the authors be held liable for any damages arising from the use of this software.
@@ -26,21 +26,40 @@ PLATFORM ?= PLATFORM_ANDROID
RAYLIB_PATH ?= ..\..
# Define Android architecture (armeabi-v7a, arm64-v8a, x86, x86-64) and API version
ANDROID_ARCH ?= ARM
ANDROID_API_VERSION = 21
# Starting in 2019 using ARM64 is mandatory for published apps,
# Starting on August 2020, minimum required target API is Android 10 (API level 29)
ANDROID_ARCH ?= ARM64
ANDROID_API_VERSION = 29
# Android required path variables
# NOTE: Starting with Android NDK r21, no more toolchain generation is required, NDK is the toolchain on itself
ifeq ($(OS),Windows_NT)
ANDROID_NDK = C:/android-ndk
ANDROID_TOOLCHAIN = $(ANDROID_NDK)/toolchains/llvm/prebuilt/windows-x86_64
else
ANDROID_NDK ?= /usr/lib/android/ndk
ANDROID_TOOLCHAIN = $(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64
endif
ifeq ($(ANDROID_ARCH),ARM)
ANDROID_ARCH_NAME = armeabi-v7a
endif
ifeq ($(ANDROID_ARCH),ARM64)
ANDROID_ARCH_NAME = arm64-v8a
endif
ifeq ($(ANDROID_ARCH),x86)
ANDROID_ARCH_NAME = i686
endif
ifeq ($(ANDROID_ARCH),x86_64)
ANDROID_ARCH_NAME = x86_64
endif
# Required path variables
# NOTE: JAVA_HOME must be set to JDK
JAVA_HOME ?= C:/JavaJDK
# NOTE: JAVA_HOME must be set to JDK (using OpenJDK 13)
JAVA_HOME ?= C:/open-jdk
ANDROID_HOME = C:/android-sdk
ANDROID_TOOLCHAIN = C:/android_toolchain_$(ANDROID_ARCH)_API$(ANDROID_API_VERSION)
ANDROID_BUILD_TOOLS = $(ANDROID_HOME)/build-tools/28.0.1
ANDROID_TOOLCHAIN = C:/android-ndk/toolchains/llvm/prebuilt/windows-x86_64
ANDROID_BUILD_TOOLS = $(ANDROID_HOME)/build-tools/29.0.3
ANDROID_PLATFORM_TOOLS = $(ANDROID_HOME)/platform-tools
# Android project configuration variables
@@ -81,13 +100,12 @@ ifeq ($(RAYLIB_LIBTYPE),SHARED)
endif
# Compiler and archiver
# NOTE: GCC is being deprecated in Android NDK r16
ifeq ($(ANDROID_ARCH),ARM)
CC = $(ANDROID_TOOLCHAIN)/bin/arm-linux-androideabi-clang
CC = $(ANDROID_TOOLCHAIN)/bin/armv7a-linux-androideabi$(ANDROID_API_VERSION)-clang
AR = $(ANDROID_TOOLCHAIN)/bin/arm-linux-androideabi-ar
endif
ifeq ($(ANDROID_ARCH),ARM64)
CC = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android-clang
CC = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android$(ANDROID_API_VERSION)-clang
AR = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android-ar
endif
@@ -226,7 +244,7 @@ generate_android_manifest:
# Generate storekey for APK signing: $(PROJECT_NAME).keystore
# NOTE: Configure here your Distinguished Names (-dname) if required!
generate_apk_keystore:
if not exist $(PROJECT_BUILD_PATH)/$(PROJECT_NAME).keystore $(JAVA_HOME)/bin/keytool -genkeypair -validity 1000 -dname "CN=$(APP_COMPANY_NAME),O=Android,C=ES" -keystore $(PROJECT_BUILD_PATH)/$(PROJECT_NAME).keystore -storepass $(APP_KEYSTORE_PASS) -keypass $(APP_KEYSTORE_PASS) -alias $(PROJECT_NAME)Key -keyalg RSA
if not exist $(PROJECT_BUILD_PATH)/$(PROJECT_NAME).keystore $(JAVA_HOME)/bin/keytool -genkeypair -validity 10000 -dname "CN=$(APP_COMPANY_NAME),O=Android,C=ES" -keystore $(PROJECT_BUILD_PATH)/$(PROJECT_NAME).keystore -storepass $(APP_KEYSTORE_PASS) -keypass $(APP_KEYSTORE_PASS) -alias $(PROJECT_NAME)Key -keyalg RSA
# Config project package and resource using AndroidManifest.xml and res/values/strings.xml
# NOTE: Generates resources file: src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/R.java
@@ -274,7 +292,7 @@ zipalign_project_apk_package:
# Install $(PROJECT_NAME).apk to default emulator/device
# NOTE: Use -e (emulator) or -d (device) parameters if required
install:
$(ANDROID_PLATFORM_TOOLS)/adb install --abi $(ANDROID_ARCH_NAME) -rds $(PROJECT_NAME).apk
$(ANDROID_PLATFORM_TOOLS)/adb install $(PROJECT_NAME).apk
# Check supported ABI for the device (armeabi-v7a, arm64-v8a, x86, x86_64)
check_device_abi:
@@ -287,7 +305,7 @@ logcat:
# Install and monitorize $(PROJECT_NAME).apk to default emulator/device
deploy:
$(ANDROID_PLATFORM_TOOLS)/adb install -r $(PROJECT_NAME).apk
$(ANDROID_PLATFORM_TOOLS)/adb install $(PROJECT_NAME).apk
$(ANDROID_PLATFORM_TOOLS)/adb logcat -c
$(ANDROID_PLATFORM_TOOLS)/adb logcat raylib:V *:S

View File

@@ -24,10 +24,12 @@ Examples using raylib core platform functionality like window creation, inputs,
| 16 | [core_window_letterbox](core/core_window_letterbox.c) | <img src="core/core_window_letterbox.png" alt="core_window_letterbox" width="200"> | [Anata](https://github.com/anatagawa) | |
| 17 | [core_drop_files](core/core_drop_files.c) | <img src="core/core_drop_files.png" alt="core_drop_files" width="200"> | ray | |
| 18 | [core_random_values](core/core_random_values.c) | <img src="core/core_random_values.png" alt="core_random_values" width="200"> | ray | |
| 19 | [core_storage_values](core/core_storage_values.c) | <img src="core/core_storage_values.png" alt="core_storage_values" width="200"> | ray | |
| 20 | [core_vr_simulator](core/core_vr_simulator.c) | <img src="core/core_vr_simulator.png" alt="core_vr_simulator" width="200"> | ray | |
| 21 | [core_loading_thread](core/core_loading_thread.c) | <img src="core/core_loading_thread.png" alt="core_loading_thread" width="200"> | ray | ⭐️ |
| 22 | [core_scissor_test](core/core_scissor_test.c) | <img src="core/core_scissor_test.png" alt="core_scissor_test" width="200"> | [Chris Dill](https://github.com/MysteriousSpace) | ⭐️ |
| 19 | [core_scissor_test](core/core_scissor_test.c) | <img src="core/core_scissor_test.png" alt="core_scissor_test" width="200"> | [Chris Dill](https://github.com/MysteriousSpace) | ⭐️ |
| 20 | [core_storage_values](core/core_storage_values.c) | <img src="core/core_storage_values.png" alt="core_storage_values" width="200"> | ray | |
| 21 | [core_vr_simulator](core/core_vr_simulator.c) | <img src="core/core_vr_simulator.png" alt="core_vr_simulator" width="200"> | ray | |
| 22 | [core_loading_thread](core/core_loading_thread.c) | <img src="core/core_loading_thread.png" alt="core_loading_thread" width="200"> | ray | ⭐️ |
| 23 | [core/core_quat_conversion](core/core_quat_conversion.c) | <img src="core/core_quat_conversion.png" alt="core_quat_conversion" width="200"> | [Chris Camacho](https://github.com/codifies) | ⭐️ |
| 24 | [core/core_window_flags](core/core_window_flags.c) | <img src="core/core_window_flags.png" alt="core_window_flags" width="200"> | ray | ⭐️ | | ⭐️ |
### category: shapes
@@ -35,21 +37,47 @@ Examples using raylib shapes drawing functionality, provided by raylib [shapes](
| ## | example | image | developer | new |
|----|----------|--------|:----------:|:---:|
| 23 | [shapes_basic_shapes](shapes/shapes_basic_shapes.c) | <img src="shapes/shapes_basic_shapes.png" alt="shapes_basic_shapes" width="200"> | ray | |
| 24 | [shapes_bouncing_ball](shapes/shapes_bouncing_ball.c) | <img src="shapes/shapes_bouncing_ball.png" alt="shapes_bouncing_ball" width="200"> | ray | ⭐️ |
| 25 | [shapes_colors_palette](shapes/shapes_colors_palette.c) | <img src="shapes/shapes_colors_palette.png" alt="shapes_colors_palette" width="200"> | ray | |
| 26 | [shapes_logo_raylib](shapes/shapes_logo_raylib.c) | <img src="shapes/shapes_logo_raylib.png" alt="shapes_logo_raylib" width="200"> | ray | |
| 27 | [shapes_logo_raylib_anim](shapes/shapes_logo_raylib_anim.c) | <img src="shapes/shapes_logo_raylib_anim.png" alt="shapes_logo_raylib_anim" width="200"> | ray | |
| 28 | [shapes_rectangle_scaling](shapes/shapes_rectangle_scaling.c) | <img src="shapes/shapes_rectangle_scaling.png" alt="shapes_rectangle_scaling" width="200"> | [Vlad Adrian](https://github.com/demizdor) | |
| 29 | [shapes_lines_bezier](shapes/shapes_lines_bezier.c) | <img src="shapes/shapes_lines_bezier.png" alt="shapes_lines_bezier" width="200"> | ray | |
| 30 | [shapes_collision_area](shapes/shapes_collision_area.c) | <img src="shapes/shapes_collision_area.png" alt="shapes_collision_area" width="200"> | ray | ⭐️ |
| 31 | [shapes_following_eyes](shapes/shapes_following_eyes.c) | <img src="shapes/shapes_following_eyes.png" alt="shapes_following_eyes" width="200"> | ray | ⭐️ |
| 32 | [shapes_easings_ball_anim](shapes/shapes_easings_ball_anim.c) | <img src="shapes/shapes_easings_ball_anim.png" alt="shapes_easings_ball_anim" width="200"> | ray | ⭐️ |
| 33 | [shapes_easings_box_anim](shapes/shapes_easings_box_anim.c) | <img src="shapes/shapes_easings_box_anim.png" alt="shapes_easings_box_anim" width="200"> | ray | ⭐️ |
| 34 | [shapes_easings_rectangle_array](shapes/shapes_easings_rectangle_array.c) | <img src="shapes/shapes_easings_rectangle_array.png" alt="shapes_easings_rectangle_array" width="200"> | ray | ⭐️ |
| 35 | [shapes_draw_ring](shapes/shapes_draw_ring.c) | <img src="shapes/shapes_draw_ring.png" alt="shapes_draw_ring" width="200"> | [Vlad Adrian](https://github.com/demizdor) | ⭐️ |
| 36 | [shapes_draw_circle_sector](shapes/shapes_draw_circle_sector.c) | <img src="shapes/shapes_draw_circle_sector.png" alt="shapes_draw_circle_sector" width="200"> | [Vlad Adrian](https://github.com/demizdor) | |
| 37 | [shapes_draw_rectangle_rounded](shapes/shapes_draw_rectangle_rounded.c) | <img src="shapes/shapes_draw_rectangle_rounded.png" alt="shapes_draw_rectangle_rounded" width="200"> | [Vlad Adrian](https://github.com/demizdor) | |
| 25 | [shapes_basic_shapes](shapes/shapes_basic_shapes.c) | <img src="shapes/shapes_basic_shapes.png" alt="shapes_basic_shapes" width="200"> | ray | |
| 26 | [shapes_bouncing_ball](shapes/shapes_bouncing_ball.c) | <img src="shapes/shapes_bouncing_ball.png" alt="shapes_bouncing_ball" width="200"> | ray | ⭐️ |
| 27 | [shapes_colors_palette](shapes/shapes_colors_palette.c) | <img src="shapes/shapes_colors_palette.png" alt="shapes_colors_palette" width="200"> | ray | |
| 28 | [shapes_logo_raylib](shapes/shapes_logo_raylib.c) | <img src="shapes/shapes_logo_raylib.png" alt="shapes_logo_raylib" width="200"> | ray | |
| 29 | [shapes_logo_raylib_anim](shapes/shapes_logo_raylib_anim.c) | <img src="shapes/shapes_logo_raylib_anim.png" alt="shapes_logo_raylib_anim" width="200"> | ray | |
| 30 | [shapes_rectangle_scaling](shapes/shapes_rectangle_scaling.c) | <img src="shapes/shapes_rectangle_scaling.png" alt="shapes_rectangle_scaling" width="200"> | [Vlad Adrian](https://github.com/demizdor) | |
| 31 | [shapes_lines_bezier](shapes/shapes_lines_bezier.c) | <img src="shapes/shapes_lines_bezier.png" alt="shapes_lines_bezier" width="200"> | ray | |
| 32 | [shapes_collision_area](shapes/shapes_collision_area.c) | <img src="shapes/shapes_collision_area.png" alt="shapes_collision_area" width="200"> | ray | ⭐️ |
| 33 | [shapes_following_eyes](shapes/shapes_following_eyes.c) | <img src="shapes/shapes_following_eyes.png" alt="shapes_following_eyes" width="200"> | ray | ⭐️ |
| 34 | [shapes_easings_ball_anim](shapes/shapes_easings_ball_anim.c) | <img src="shapes/shapes_easings_ball_anim.png" alt="shapes_easings_ball_anim" width="200"> | ray | ⭐️ |
| 35 | [shapes_easings_box_anim](shapes/shapes_easings_box_anim.c) | <img src="shapes/shapes_easings_box_anim.png" alt="shapes_easings_box_anim" width="200"> | ray | ⭐️ |
| 36 | [shapes_easings_rectangle_array](shapes/shapes_easings_rectangle_array.c) | <img src="shapes/shapes_easings_rectangle_array.png" alt="shapes_easings_rectangle_array" width="200"> | ray | ⭐️ |
| 37 | [shapes_draw_ring](shapes/shapes_draw_ring.c) | <img src="shapes/shapes_draw_ring.png" alt="shapes_draw_ring" width="200"> | [Vlad Adrian](https://github.com/demizdor) | ⭐️ |
| 38 | [shapes_draw_circle_sector](shapes/shapes_draw_circle_sector.c) | <img src="shapes/shapes_draw_circle_sector.png" alt="shapes_draw_circle_sector" width="200"> | [Vlad Adrian](https://github.com/demizdor) | |
| 39 | [shapes_draw_rectangle_rounded](shapes/shapes_draw_rectangle_rounded.c) | <img src="shapes/shapes_draw_rectangle_rounded.png" alt="shapes_draw_rectangle_rounded" width="200"> | [Vlad Adrian](https://github.com/demizdor) | |
### category: textures
Examples using raylib textures functionality, including image/textures loading/generation and drawing, provided by raylib [textures](../src/textures.c) module.
| ## | example | image | developer | new |
|----|---------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|:------------------------------------------------:|:---:|
| 40 | [textures_logo_raylib](textures/textures_logo_raylib.c) | <img src="textures/textures_logo_raylib.png" alt="textures_logo_raylib" width="200"> | ray | |
| 41 | [textures_rectangle](textures/textures_rectangle.c) | <img src="textures/textures_rectangle.png" alt="textures_rectangle" width="200"> | ray | |
| 42 | [textures_srcrec_dstrec](textures/textures_srcrec_dstrec.c) | <img src="textures/textures_srcrec_dstrec.png" alt="textures_srcrec_dstrec" width="200"> | ray | |
| 43 | [textures_image_drawing](textures/textures_image_drawing.c) | <img src="textures/textures_image_drawing.png" alt="textures_image_drawing" width="200"> | ray | |
| 44 | [textures_image_generation](textures/textures_image_generation.c) | <img src="textures/textures_image_generation.png" alt="textures_image_generation" width="200"> | ray | |
| 45 | [textures_image_loading](textures/textures_image_loading.c) | <img src="textures/textures_image_loading.png" alt="textures_image_loading" width="200"> | ray | |
| 46 | [textures_image_processing](textures/textures_image_processing.c) | <img src="textures/textures_image_processing.png" alt="textures_image_processing" width="200"> | ray | |
| 47 | [textures_image_text](textures/textures_image_text.c) | <img src="textures/textures_image_text.png" alt="textures_image_text" width="200"> | ray | |
| 48 | [textures_to_image](textures/textures_to_image.c) | <img src="textures/textures_to_image.png" alt="textures_to_image" width="200"> | ray | ⭐️ |
| 49 | [textures_raw_data](textures/textures_raw_data.c) | <img src="textures/textures_raw_data.png" alt="textures_raw_data" width="200"> | ray | |
| 50 | [textures_particles_blending](textures/textures_particles_blending.c) | <img src="textures/textures_particles_blending.png" alt="textures_particles_blending" width="200"> | ray | |
| 51 | [textures_npatch_drawing](textures/textures_npatch_drawing.c) | <img src="textures/textures_npatch_drawing.png" alt="textures_npatch_drawing" width="200"> | [Jorge A. Gomes](https://github.com/overdev) | |
| 52 | [textures_background_scrolling](textures/textures_background_scrolling.c) | <img src="textures/textures_background_scrolling.png" alt="textures_background_scrolling" width="200"> | ray | ⭐️ |
| 53 | [textures_sprite_button](textures/textures_sprite_button.c) | <img src="textures/textures_sprite_button.png" alt="textures_sprite_button" width="200"> | ray | ⭐️ |
| 54 | [textures_sprite_explosion](textures/textures_sprite_explosion.c) | <img src="textures/textures_sprite_explosion.png" alt="textures_sprite_explosion" width="200"> | ray | ⭐️ |
| 55 | [textures_bunnymark](textures/textures_bunnymark.c) | <img src="textures/textures_bunnymark.png" alt="textures_bunnymark" width="200"> | ray | |
| 56 | [textures_mouse_painting](textures/textures_mouse_painting.c) | <img src="textures/textures_mouse_painting.png" alt="textures_mouse_painting" width="200"> | [Chris Dill](https://github.com/MysteriousSpace) | |
| 57 | [textures_blend_modes](textures/textures_blend_modes.c) | <img src="textures/textures_blend_modes.png" alt="textures_blend_modes" width="200"> | [Karlo Licudine](https://github.com/accidentalrebel) | ⭐️ |
| 58 | [textures/textures_draw_tiled](textures/textures_draw_tiled.c) | <img src="textures/textures_draw_tiled.png" alt="textures_draw_tiled" width="200"> | [Vlad Adrian](https://github.com/demizdor) | ⭐️ |
### category: text
@@ -57,40 +85,16 @@ Examples using raylib text functionality, including sprite fonts loading/generat
| ## | example | image | developer | new |
|----|----------|--------|:----------:|:---:|
| 38 | [text_raylib_fonts](text/text_raylib_fonts.c) | <img src="text/text_raylib_fonts.png" alt="text_raylib_fonts" width="200"> | ray | |
| 39 | [text_font_spritefont](text/text_font_spritefont.c) | <img src="text/text_font_spritefont.png" alt="text_font_spritefont" width="200"> | ray | |
| 40 | [text_font_filters](text/text_font_filters.c) | <img src="text/text_font_filters.png" alt="text_font_filters" width="200"> | ray | |
| 41 | [text_font_loading](text/text_font_loading.c) | <img src="text/text_font_loading.png" alt="text_font_loading" width="200"> | ray | |
| 42 | [text_font_sdf](text/text_font_sdf.c) | <img src="text/text_font_sdf.png" alt="text_font_sdf" width="200"> | ray | ⭐️ |
| 43 | [text_format_text](text/text_format_text.c) | <img src="text/text_format_text.png" alt="text_format_text" width="200"> | ray | |
| 44 | [text_input_box](text/text_input_box.c) | <img src="text/text_input_box.png" alt="text_input_box" width="200"> | ray | |
| 45 | [text_writing_anim](text/text_writing_anim.c) | <img src="text/text_writing_anim.png" alt="text_writing_anim" width="200"> | ray | |
| 46 | [text_rectangle_bounds](text/text_rectangle_bounds.c) | <img src="text/text_rectangle_bounds.png" alt="text_rectangle_bounds" width="200"> | [Vlad Adrian](https://github.com/demizdor) | |
| 47 | [text_unicode](text/text_unicode.c) | <img src="text/text_unicode.png" alt="text_unicode" width="200"> | [Vlad Adrian](https://github.com/demizdor) | |
### category: textures
Examples using raylib textures functionality, including image/textures loading/generation and drawing, provided by raylib [textures](../src/textures.c) module.
| ## | example | image | developer | new |
|----|----------|--------|:----------:|:---:|
| 48 | [textures_logo_raylib](textures/textures_logo_raylib.c) | <img src="textures/textures_logo_raylib.png" alt="textures_logo_raylib" width="200"> | ray | |
| 49 | [textures_rectangle](textures/textures_rectangle.c) | <img src="textures/textures_rectangle.png" alt="textures_rectangle" width="200"> | ray | |
| 50 | [textures_srcrec_dstrec](textures/textures_srcrec_dstrec.c) | <img src="textures/textures_srcrec_dstrec.png" alt="textures_srcrec_dstrec" width="200"> | ray | |
| 51 | [textures_image_drawing](textures/textures_image_drawing.c) | <img src="textures/textures_image_drawing.png" alt="textures_image_drawing" width="200"> | ray | |
| 52 | [textures_image_generation](textures/textures_image_generation.c) | <img src="textures/textures_image_generation.png" alt="textures_image_generation" width="200"> | ray | |
| 53 | [textures_image_loading](textures/textures_image_loading.c) | <img src="textures/textures_image_loading.png" alt="textures_image_loading" width="200"> | ray | |
| 54 | [textures_image_processing](textures/textures_image_processing.c) | <img src="textures/textures_image_processing.png" alt="textures_image_processing" width="200"> | ray | |
| 55 | [textures_image_text](textures/textures_image_text.c) | <img src="textures/textures_image_text.png" alt="textures_image_text" width="200"> | ray | ⭐️ |
| 56 | [textures_to_image](textures/textures_to_image.c) | <img src="textures/textures_to_image.png" alt="textures_to_image" width="200"> | ray | |
| 57 | [textures_raw_data](textures/textures_raw_data.c) | <img src="textures/textures_raw_data.png" alt="textures_raw_data" width="200"> | ray | |
| 58 | [textures_particles_blending](textures/textures_particles_blending.c) | <img src="textures/textures_particles_blending.png" alt="textures_particles_blending" width="200"> | ray | |
| 59 | [textures_npatch_drawing](textures/textures_npatch_drawing.c) | <img src="textures/textures_npatch_drawing.png" alt="textures_npatch_drawing" width="200"> | [Jorge A. Gomes](https://github.com/overdev) | |
| 60 | [textures_background_scrolling](textures/textures_background_scrolling.c) | <img src="textures/textures_background_scrolling.png" alt="textures_background_scrolling" width="200"> | ray | ⭐️ |
| 61 | [textures_sprite_button](textures/textures_sprite_button.c) | <img src="textures/textures_sprite_button.png" alt="textures_sprite_button" width="200"> | ray | ⭐️ |
| 62 | [textures_sprite_explosion](textures/textures_sprite_explosion.c) | <img src="textures/textures_sprite_explosion.png" alt="textures_sprite_explosion" width="200"> | ray | ⭐️ |
| 63 | [textures_bunnymark](textures/textures_bunnymark.c) | <img src="textures/textures_bunnymark.png" alt="textures_bunnymark" width="200"> | ray | ⭐️ |
| 64 | [textures_mouse_painting](textures/textures_mouse_painting.c) | <img src="textures/textures_mouse_painting.png" alt="textures_mouse_painting" width="200"> | [Chris Dill](https://github.com/MysteriousSpace) | ⭐️ |
| 59 | [text_raylib_fonts](text/text_raylib_fonts.c) | <img src="text/text_raylib_fonts.png" alt="text_raylib_fonts" width="200"> | ray | |
| 60 | [text_font_spritefont](text/text_font_spritefont.c) | <img src="text/text_font_spritefont.png" alt="text_font_spritefont" width="200"> | ray | |
| 61 | [text_font_filters](text/text_font_filters.c) | <img src="text/text_font_filters.png" alt="text_font_filters" width="200"> | ray | |
| 62 | [text_font_loading](text/text_font_loading.c) | <img src="text/text_font_loading.png" alt="text_font_loading" width="200"> | ray | |
| 63 | [text_font_sdf](text/text_font_sdf.c) | <img src="text/text_font_sdf.png" alt="text_font_sdf" width="200"> | ray | |
| 64 | [text_format_text](text/text_format_text.c) | <img src="text/text_format_text.png" alt="text_format_text" width="200"> | ray | |
| 65 | [text_input_box](text/text_input_box.c) | <img src="text/text_input_box.png" alt="text_input_box" width="200"> | ray | |
| 66 | [text_writing_anim](text/text_writing_anim.c) | <img src="text/text_writing_anim.png" alt="text_writing_anim" width="200"> | ray | |
| 67 | [text_rectangle_bounds](text/text_rectangle_bounds.c) | <img src="text/text_rectangle_bounds.png" alt="text_rectangle_bounds" width="200"> | [Vlad Adrian](https://github.com/demizdor) | |
| 68 | [text_unicode](text/text_unicode.c) | <img src="text/text_unicode.png" alt="text_unicode" width="200"> | [Vlad Adrian](https://github.com/demizdor) | |
### category: models
@@ -98,24 +102,22 @@ Examples using raylib models functionality, including models loading/generation
| ## | example | image | developer | new |
|----|----------|--------|:----------:|:---:|
| 65 | [models_animation](models/models_animation.c) | <img src="models/models_animation.png" alt="models_animation" width="200"> | [culacant](https://github.com/culacant) | ⭐️ |
| 66 | [models_billboard](models/models_billboard.c) | <img src="models/models_billboard.png" alt="models_billboard" width="200"> | ray | |
| 67 | [models_box_collisions](models/models_box_collisions.c) | <img src="models/models_box_collisions.png" alt="models_box_collisions" width="200"> | ray | |
| 68 | [models_cubicmap](models/models_cubicmap.c) | <img src="models/models_cubicmap.png" alt="models_cubicmap" width="200"> | ray | |
| 69 | [models_first_person_maze](models/models_first_person_maze.c) | <img src="models/models_first_person_maze.png" alt="models_first_person_maze" width="200"> | ray | ⭐️ |
| 70 | [models_geometric_shapes](models/models_geometric_shapes.c) | <img src="models/models_geometric_shapes.png" alt="models_geometric_shapes" width="200"> | ray | |
| 71 | [models_material_pbr](models/models_material_pbr.c) | <img src="models/models_material_pbr.png" alt="models_material_pbr" width="200"> | ray | |
| 72 | [models_mesh_generation](models/models_mesh_generation.c) | <img src="models/models_mesh_generation.png" alt="models_mesh_generation" width="200"> | ray | |
| 73 | [models_mesh_picking](models/models_mesh_picking.c) | <img src="models/models_mesh_picking.png" alt="models_mesh_picking" width="200"> | [Joel Davis](https://github.com/joeld42) | |
| 74 | [models_loading](models/models_loading.c) | <img src="models/models_loading.png" alt="models_loading" width="200"> | ray | |
| 75 | [models_orthographic_projection](models/models_orthographic_projection.c) | <img src="models/models_orthographic_projection.png" alt="models_orthographic_projection" width="200"> | [Max Danielsson](https://github.com/autious) | |
| 76 | *TODO* | *TODO* | *TODO* | |
| 77 | *TODO* | *TODO* | *TODO* | |
| 78 | [models_solar_system_rlgl](models/models_rlgl_solar_system.c) | <img src="models/models_rlgl_solar_system.png" alt="models_rlgl_solar_system" width="200"> | ray | ⭐️ |
| 79 | [models_yaw_pitch_roll](models/models_yaw_pitch_roll.c) | <img src="models/models_yaw_pitch_roll.png" alt="models_yaw_pitch_roll" width="200"> | [Berni](https://github.com/Berni8k) | |
| 80 | [models_waving_cubes](models/models_waving_cubes.c) | <img src="models/models_waving_cubes.png" alt="models_waving_cubes" width="200"> | [codecat](https://github.com/codecat) | ⭐️ |
| 81 | [models_heightmap](models/models_heightmap.c) | <img src="models/models_heightmap.png" alt="models_heightmap" width="200"> | ray | |
| 82 | [models_skybox](models/models_skybox.c) | <img src="models/models_skybox.png" alt="models_skybox" width="200"> | ray | |
| 69 | [models_animation](models/models_animation.c) | <img src="models/models_animation.png" alt="models_animation" width="200"> | [culacant](https://github.com/culacant) | |
| 70 | [models_billboard](models/models_billboard.c) | <img src="models/models_billboard.png" alt="models_billboard" width="200"> | ray | |
| 71 | [models_box_collisions](models/models_box_collisions.c) | <img src="models/models_box_collisions.png" alt="models_box_collisions" width="200"> | ray | |
| 72 | [models_cubicmap](models/models_cubicmap.c) | <img src="models/models_cubicmap.png" alt="models_cubicmap" width="200"> | ray | |
| 73 | [models_first_person_maze](models/models_first_person_maze.c) | <img src="models/models_first_person_maze.png" alt="models_first_person_maze" width="200"> | ray | |
| 74 | [models_geometric_shapes](models/models_geometric_shapes.c) | <img src="models/models_geometric_shapes.png" alt="models_geometric_shapes" width="200"> | ray | |
| 75 | [models_material_pbr](models/models_material_pbr.c) | <img src="models/models_material_pbr.png" alt="models_material_pbr" width="200"> | ray | |
| 76 | [models_mesh_generation](models/models_mesh_generation.c) | <img src="models/models_mesh_generation.png" alt="models_mesh_generation" width="200"> | ray | |
| 77 | [models_mesh_picking](models/models_mesh_picking.c) | <img src="models/models_mesh_picking.png" alt="models_mesh_picking" width="200"> | [Joel Davis](https://github.com/joeld42) | |
| 78 | [models_loading](models/models_loading.c) | <img src="models/models_loading.png" alt="models_loading" width="200"> | ray | |
| 79 | [models_orthographic_projection](models/models_orthographic_projection.c) | <img src="models/models_orthographic_projection.png" alt="models_orthographic_projection" width="200"> | [Max Danielsson](https://github.com/autious) | |
| 80 | [models_rlgl_solar_system](models/models_rlgl_solar_system.c) | <img src="models/models_rlgl_solar_system.png" alt="models_rlgl_solar_system" width="200"> | ray | |
| 81 | [models_skybox](models/models_skybox.c) | <img src="models/models_skybox.png" alt="models_skybox" width="200"> | ray | |
| 82 | [models_yaw_pitch_roll](models/models_yaw_pitch_roll.c) | <img src="models/models_yaw_pitch_roll.png" alt="models_yaw_pitch_roll" width="200"> | [Berni](https://github.com/Berni8k) | |
| 83 | [models_heightmap](models/models_heightmap.c) | <img src="models/models_heightmap.png" alt="models_heightmap" width="200"> | ray | |
| 84 | [models_waving_cubes](models/models_waving_cubes.c) | <img src="models/models_waving_cubes.png" alt="models_waving_cubes" width="200"> | [codecat](https://github.com/codecat) | ⭐️ |
### category: shaders
@@ -123,19 +125,23 @@ Examples using raylib shaders functionality, including shaders loading, paramete
| ## | example | image | developer | new |
|----|----------|--------|:----------:|:---:|
| 83 | [shaders_basic_lighting](shaders/shaders_basic_lighting.c) | <img src="shaders/shaders_basic_lighting.png" alt="shaders_basic_lighting" width="200"> | [Chris Camacho](https://github.com/codifies) | ⭐️ |
| 84 | [shaders_model_shader](shaders/shaders_model_shader.c) | <img src="shaders/shaders_model_shader.png" alt="shaders_model_shader" width="200"> | ray | |
| 85 | [shaders_shapes_textures](shaders/shaders_shapes_textures.c) | <img src="shaders/shaders_shapes_textures.png" alt="shaders_shapes_textures" width="200"> | ray | |
| 86 | [shaders_custom_uniform](shaders/shaders_custom_uniform.c) | <img src="shaders/shaders_custom_uniform.png" alt="shaders_custom_uniform" width="200"> | ray | |
| 87 | [shaders_postprocessing](shaders/shaders_postprocessing.c) | <img src="shaders/shaders_postprocessing.png" alt="shaders_postprocessing" width="200"> | ray | |
| 88 | [shaders_palette_switch](shaders/shaders_palette_switch.c) | <img src="shaders/shaders_palette_switch.png" alt="shaders_palette_switch" width="200"> | [Marco Lizza](https://github.com/MarcoLizza) | |
| 89 | [shaders_raymarching](shaders/shaders_raymarching.c) | <img src="shaders/shaders_raymarching.png" alt="shaders_raymarching" width="200"> | Shader by Iñigo Quilez | ⭐️ |
| 90 | [shaders_texture_drawing](shaders/shaders_texture_drawing.c) | <img src="shaders/shaders_texture_drawing.png" alt="shaders_texture_drawing" width="200"> | Michał Ciesielski | ⭐️ |
| 91 | [shaders_texture_waves](shaders/shaders_texture_waves.c) | <img src="shaders/shaders_texture_waves.png" alt="shaders_texture_waves" width="200"> | [Anata](https://github.com/anatagawa) | ⭐️ |
| 92 | [shaders_julia_set](shaders/shaders_julia_set.c) | <img src="shaders/shaders_julia_set.png" alt="shaders_julia_set" width="200"> | [eggmund](https://github.com/eggmund) | ⭐️ |
| 93 | [shaders_eratosthenes](shaders/shaders_eratosthenes.c) | <img src="shaders/shaders_eratosthenes.png" alt="shaders_eratosthenes" width="200"> | [ProfJski](https://github.com/ProfJski) | ⭐️ |
| 94 | [shaders_fog](shaders/shaders_fog.c) | <img src="shaders/shaders_fog.png" alt="shaders_fog" width="200"> | [Chris Camacho](https://github.com/codifies) | ⭐️ |
| 95 | [shaders_simple_mask](shaders/shaders_simple_mask.c) | <img src="shaders/shaders_simple_mask.png" alt="shaders_simple_mask" width="200"> | [Chris Camacho](https://github.com/codifies) | ⭐️ |
| 85 | [shaders_basic_lighting](shaders/shaders_basic_lighting.c) | <img src="shaders/shaders_basic_lighting.png" alt="shaders_basic_lighting" width="200"> | [Chris Camacho](https://github.com/codifies) | |
| 86 | [shaders_model_shader](shaders/shaders_model_shader.c) | <img src="shaders/shaders_model_shader.png" alt="shaders_model_shader" width="200"> | ray | |
| 87 | [shaders_shapes_textures](shaders/shaders_shapes_textures.c) | <img src="shaders/shaders_shapes_textures.png" alt="shaders_shapes_textures" width="200"> | ray | |
| 88 | [shaders_custom_uniform](shaders/shaders_custom_uniform.c) | <img src="shaders/shaders_custom_uniform.png" alt="shaders_custom_uniform" width="200"> | ray | |
| 89 | [shaders_postprocessing](shaders/shaders_postprocessing.c) | <img src="shaders/shaders_postprocessing.png" alt="shaders_postprocessing" width="200"> | ray | |
| 90 | [shaders_palette_switch](shaders/shaders_palette_switch.c) | <img src="shaders/shaders_palette_switch.png" alt="shaders_palette_switch" width="200"> | [Marco Lizza](https://github.com/MarcoLizza) | |
| 91 | [shaders_raymarching](shaders/shaders_raymarching.c) | <img src="shaders/shaders_raymarching.png" alt="shaders_raymarching" width="200"> | Shader by Iñigo Quilez | |
| 92 | [shaders_texture_drawing](shaders/shaders_texture_drawing.c) | <img src="shaders/shaders_texture_drawing.png" alt="shaders_texture_drawing" width="200"> | Michał Ciesielski | |
| 93 | [shaders_texture_waves](shaders/shaders_texture_waves.c) | <img src="shaders/shaders_texture_waves.png" alt="shaders_texture_waves" width="200"> | [Anata](https://github.com/anatagawa) | |
| 94 | [shaders_julia_set](shaders/shaders_julia_set.c) | <img src="shaders/shaders_julia_set.png" alt="shaders_julia_set" width="200"> | [eggmund](https://github.com/eggmund) | |
| 95 | [shaders_eratosthenes](shaders/shaders_eratosthenes.c) | <img src="shaders/shaders_eratosthenes.png" alt="shaders_eratosthenes" width="200"> | [ProfJski](https://github.com/ProfJski) | |
| 96 | [shaders_fog](shaders/shaders_fog.c) | <img src="shaders/shaders_fog.png" alt="shaders_fog" width="200"> | [Chris Camacho](https://github.com/codifies) | |
| 97 | [shaders_simple_mask](shaders/shaders_simple_mask.c) | <img src="shaders/shaders_simple_mask.png" alt="shaders_simple_mask" width="200"> | [Chris Camacho](https://github.com/codifies) | |
| 98 | [shaders_spotlight](shaders/shaders_spotlight.c) | <img src="shaders/shaders_spotlight.png" alt="shaders_spotlight" width="200"> | [Chris Camacho](https://github.com/codifies) | ⭐️ |
| 99 | [shaders_hot_reloading](shaders/shaders_hot_reloading.c) | <img src="shaders/shaders_hot_reloading.png" alt="shaders_hot_reloading" width="200"> | ray | ⭐️ |
| 100 | [shaders_rlgl_mesh_instanced](shaders/shaders_rlgl_mesh_instanced.c) | <img src="shaders/shaders_rlgl_mesh_instanced.png" alt="shaders_rlgl_mesh_instanced" width="200"> | [Chris Camacho](https://github.com/codifies) | ⭐️ |
| 101 | [shaders_multi_sample2d](shaders/shaders_multi_sample2d.c) | <img src="shaders/shaders_multi_sample2d.png" alt="shaders_multi_sample2d" width="200"> | ray | ⭐️ |
### category: audio
@@ -143,11 +149,11 @@ Examples using raylib audio functionality, including sound/music loading and pla
| ## | example | image | developer | new |
|----|----------|--------|:----------:|:---:|
| 96 | [audio_module_playing](audio/audio_module_playing.c) | <img src="audio/audio_module_playing.png" alt="audio_module_playing" width="200"> | ray | |
| 97 | [audio_music_stream](audio/audio_music_stream.c) | <img src="audio/audio_music_stream.png" alt="audio_music_stream" width="200"> | ray | |
| 98 | [audio_raw_stream](audio/audio_raw_stream.c) | <img src="audio/audio_raw_stream.png" alt="audio_raw_stream" width="200"> | ray | |
| 99 | [audio_sound_loading](audio/audio_sound_loading.c) | <img src="audio/audio_sound_loading.png" alt="audio_sound_loading" width="200"> | ray | |
| 100 | [audio_multichannel_sound](audio/audio_multichannel_sound.c) | <img src="audio/audio_multichannel_sound.png" alt="audio_multichannel_sound" width="200"> | [Chris Camacho](https://github.com/codifies) | ⭐️ |
| 102 | [audio_module_playing](audio/audio_module_playing.c) | <img src="audio/audio_module_playing.png" alt="audio_module_playing" width="200"> | ray | |
| 103 | [audio_music_stream](audio/audio_music_stream.c) | <img src="audio/audio_music_stream.png" alt="audio_music_stream" width="200"> | ray | |
| 104 | [audio_raw_stream](audio/audio_raw_stream.c) | <img src="audio/audio_raw_stream.png" alt="audio_raw_stream" width="200"> | ray | |
| 105 | [audio_sound_loading](audio/audio_sound_loading.c) | <img src="audio/audio_sound_loading.png" alt="audio_sound_loading" width="200"> | ray | |
| 106 | [audio_multichannel_sound](audio/audio_multichannel_sound.c) | <img src="audio/audio_multichannel_sound.png" alt="audio_multichannel_sound" width="200"> | [Chris Camacho](https://github.com/codifies) | ⭐️ |
### category: physics
@@ -155,11 +161,11 @@ Examples showing physics functionality with raylib. This functionality is provid
| ## | example | image | developer | new |
|----|----------|--------|:----------:|:---:|
| 101 | [physics_demo](physics/physics_demo.c) | <img src="physics/physics_demo.png" alt="physics_demo" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
| 102 | [physics_friction](physics/physics_friction.c) | <img src="physics/physics_friction.png" alt="physics_friction" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
| 103 | [physics_movement](physics/physics_movement.c) | <img src="physics/physics_movement.png" alt="physics_movement" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
| 104 | [physics_restitution](physics/physics_restitution.c) | <img src="physics/physics_restitution.png" alt="physics_restitution" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
| 105 | [physics_shatter](physics/physics_shatter.c) | <img src="physics/physics_shatter.png" alt="physics_shatter" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
| 107 | [physics_demo](physics/physics_demo.c) | <img src="physics/physics_demo.png" alt="physics_demo" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
| 108 | [physics_friction](physics/physics_friction.c) | <img src="physics/physics_friction.png" alt="physics_friction" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
| 109 | [physics_movement](physics/physics_movement.c) | <img src="physics/physics_movement.png" alt="physics_movement" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
| 110 | [physics_restitution](physics/physics_restitution.c) | <img src="physics/physics_restitution.png" alt="physics_restitution" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
| 111 | [physics_shatter](physics/physics_shatter.c) | <img src="physics/physics_shatter.png" alt="physics_shatter" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
### category: network
@@ -169,13 +175,13 @@ Examples showing raylib network functionality. This functionality is provided by
| ## | example | image | developer | new |
|----|----------|--------|:----------:|:---:|
| 106 | [network_ping_pong](network/network_ping_pong.c) | | [Jak Barnes](https://github.com/syphonx) | |
| 107 | [network_resolve_host](network/network_resolve_host.c) | | [Jak Barnes](https://github.com/syphonx) | |
| 108 | [network_tcp_client](network/network_tcp_client.c) | | [Jak Barnes](https://github.com/syphonx) | |
| 109 | [network_tcp_server](network/network_tcp_server.c) | | [Jak Barnes](https://github.com/syphonx) | |
| 110 | [network_test](network/network_test.c) | | [Jak Barnes](https://github.com/syphonx) | |
| 111 | [network_udp_client](network/network_udp_client.c) | | [Jak Barnes](https://github.com/syphonx) | |
| 112 | [network_udp_server](network/network_udp_server.c) | | [Jak Barnes](https://github.com/syphonx) | |
| 112 | [network_ping_pong](network/network_ping_pong.c) | | [Jak Barnes](https://github.com/syphonx) | |
| 113 | [network_resolve_host](network/network_resolve_host.c) | | [Jak Barnes](https://github.com/syphonx) | |
| 114 | [network_tcp_client](network/network_tcp_client.c) | | [Jak Barnes](https://github.com/syphonx) | |
| 115 | [network_tcp_server](network/network_tcp_server.c) | | [Jak Barnes](https://github.com/syphonx) | |
| 116 | [network_test](network/network_test.c) | | [Jak Barnes](https://github.com/syphonx) | |
| 117 | [network_udp_client](network/network_udp_client.c) | | [Jak Barnes](https://github.com/syphonx) | |
| 118 | [network_udp_server](network/network_udp_server.c) | | [Jak Barnes](https://github.com/syphonx) | |
### category: others
@@ -183,9 +189,10 @@ Examples showing raylib misc functionality that does not fit in other categories
| ## | example | image | developer | new |
|----|----------|--------|:----------:|:---:|
| 113 | [raudio_standalone](others/raudio_standalone.c) | | ray | |
| 114 | [rlgl_standalone](others/rlgl_standalone.c) | | ray | |
| 115 | [easings_testbed](others/easings_testbed.c) | | ray | |
| 119 | [raudio_standalone](others/raudio_standalone.c) | | ray | |
| 120 | [rlgl_standalone](others/rlgl_standalone.c) | | ray | |
| 121 | [easings_testbed](others/easings_testbed.c) | | [Juan Miguel López](https://github.com/flashback-fx) | |
| 122 | [embedded_files_loading](others/embedded_files_loading.c)) | | [Kristian Holmgren](https://github.com/defutura) | |
As always contributions are welcome, feel free to send new examples! Here it is an [examples template](examples_template.c) to start with!

View File

@@ -51,6 +51,8 @@ int main(void)
}
Music music = LoadMusicStream("resources/mini1111.xm");
music.looping = false;
float pitch = 1.0f;
PlayMusicStream(music);
@@ -83,6 +85,11 @@ int main(void)
else ResumeMusicStream(music);
}
if (IsKeyDown(KEY_DOWN)) pitch -= 0.01f;
else if (IsKeyDown(KEY_UP)) pitch += 0.01f;
SetMusicPitch(music, pitch);
// Get timePlayed scaled to bar dimensions
timePlayed = GetMusicTimePlayed(music)/GetMusicTimeLength(music)*(screenWidth - 40);

View File

@@ -5,9 +5,9 @@
* This example has been created using raylib 2.6 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Example contributed by Chris Camacho (@codifies) and reviewed by Ramon Santamaria (@raysan5)
* Example contributed by Chris Camacho (@chriscamacho) and reviewed by Ramon Santamaria (@raysan5)
*
* Copyright (c) 2019 Chris Camacho (@codifies) and Ramon Santamaria (@raysan5)
* Copyright (c) 2019 Chris Camacho (@chriscamacho) and Ramon Santamaria (@raysan5)
*
********************************************************************************************/
@@ -25,7 +25,7 @@ int main(void)
InitAudioDevice(); // Initialize audio device
Sound fxWav = LoadSound("resources/sound.wav"); // Load WAV audio file
Sound fxOgg = LoadSound("resources/tanatana.ogg"); // Load OGG audio file
Sound fxOgg = LoadSound("resources/target.ogg"); // Load OGG audio file
SetSoundVolume(fxWav, 0.2);
@@ -51,7 +51,7 @@ int main(void)
DrawText("Press SPACE to play new ogg instance!", 200, 120, 20, LIGHTGRAY);
DrawText("Press ENTER to play new wav instance!", 200, 180, 20, LIGHTGRAY);
DrawText(FormatText("CONCURRENT SOUNDS PLAYING: %02i", GetSoundsPlaying()), 220, 280, 20, RED);
DrawText(TextFormat("CONCURRENT SOUNDS PLAYING: %02i", GetSoundsPlaying()), 220, 280, 20, RED);
EndDrawing();
//----------------------------------------------------------------------------------

View File

@@ -22,7 +22,7 @@ int main(void)
InitAudioDevice(); // Initialize audio device
Music music = LoadMusicStream("resources/guitar_noodling.ogg");
Music music = LoadMusicStream("resources/country.mp3");
PlayMusicStream(music);

View File

@@ -134,7 +134,7 @@ int main(void)
ClearBackground(RAYWHITE);
DrawText(FormatText("sine frequency: %i",(int)frequency), GetScreenWidth() - 220, 10, 20, RED);
DrawText(TextFormat("sine frequency: %i",(int)frequency), GetScreenWidth() - 220, 10, 20, RED);
DrawText("click mouse button to change frequency", 10, 10, 20, DARKGRAY);
// Draw the current buffer state proportionate to the screen

View File

@@ -23,7 +23,7 @@ int main(void)
InitAudioDevice(); // Initialize audio device
Sound fxWav = LoadSound("resources/sound.wav"); // Load WAV audio file
Sound fxOgg = LoadSound("resources/tanatana.ogg"); // Load OGG audio file
Sound fxOgg = LoadSound("resources/target.ogg"); // Load OGG audio file
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------

View File

@@ -0,0 +1,10 @@
| resource | author | licence | notes |
| :------------------- | :---------: | :------ | :---- |
| country.mp3 | [@emegeme](https://github.com/emegeme) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Originally created for "DART that TARGET" game |
| target.ogg | [@emegeme](https://github.com/emegeme) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Originally created for "DART that TARGET" game |
| target.flac | [@emegeme](https://github.com/emegeme) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Originally created for "DART that TARGET" game |
| coin.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Created using [rFXGen](https://raylibtech.itch.io/rfxgen) |
| sound.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Created using [rFXGen](https://raylibtech.itch.io/rfxgen) |
| spring.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Created using [rFXGen](https://raylibtech.itch.io/rfxgen) |
| weird.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Created using [rFXGen](https://raylibtech.itch.io/rfxgen) |
| mini1111.xm | [tPORt](https://modarchive.org/index.php?request=view_by_moduleid&query=51891) | [Mod Archive Distribution license](https://modarchive.org/index.php?terms-upload) | - |

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -15,8 +15,8 @@
#include "raymath.h"
#define G 400
#define PLAYER_JUMP_SPD 350.f
#define PLAYER_HOR_SPD 200.f
#define PLAYER_JUMP_SPD 350.0f
#define PLAYER_HOR_SPD 200.0f
typedef struct Player {
Vector2 position;

View File

@@ -31,7 +31,7 @@ int main(void)
camera.type = CAMERA_PERSPECTIVE;
// Generates some random columns
float heights[MAX_COLUMNS] = { 0.0f };
float heights[MAX_COLUMNS] = { 0 };
Vector3 positions[MAX_COLUMNS] = { 0 };
Color colors[MAX_COLUMNS] = { 0 };

View File

@@ -59,7 +59,7 @@ int main(void)
if (IsGamepadAvailable(GAMEPAD_PLAYER1))
{
DrawText(FormatText("GP1: %s", GetGamepadName(GAMEPAD_PLAYER1)), 10, 10, 10, BLACK);
DrawText(TextFormat("GP1: %s", GetGamepadName(GAMEPAD_PLAYER1)), 10, 10, 10, BLACK);
if (IsGamepadName(GAMEPAD_PLAYER1, XBOX360_NAME_ID))
{
@@ -92,13 +92,13 @@ int main(void)
DrawCircle(259, 152, 39, BLACK);
DrawCircle(259, 152, 34, LIGHTGRAY);
DrawCircle(259 + (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_X)*20),
152 - (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_Y)*20), 25, BLACK);
152 + (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_Y)*20), 25, BLACK);
// Draw axis: right joystick
DrawCircle(461, 237, 38, BLACK);
DrawCircle(461, 237, 33, LIGHTGRAY);
DrawCircle(461 + (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_X)*20),
237 - (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_Y)*20), 25, BLACK);
237 + (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_Y)*20), 25, BLACK);
// Draw axis: left-right triggers
DrawRectangle(170, 30, 15, 70, GRAY);
@@ -106,8 +106,8 @@ int main(void)
DrawRectangle(170, 30, 15, (((1.0f + GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_TRIGGER))/2.0f)*70), RED);
DrawRectangle(604, 30, 15, (((1.0f + GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_TRIGGER))/2.0f)*70), RED);
//DrawText(FormatText("Xbox axis LT: %02.02f", GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_TRIGGER)), 10, 40, 10, BLACK);
//DrawText(FormatText("Xbox axis RT: %02.02f", GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_TRIGGER)), 10, 60, 10, BLACK);
//DrawText(TextFormat("Xbox axis LT: %02.02f", GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_TRIGGER)), 10, 40, 10, BLACK);
//DrawText(TextFormat("Xbox axis RT: %02.02f", GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_TRIGGER)), 10, 60, 10, BLACK);
}
else if (IsGamepadName(GAMEPAD_PLAYER1, PS3_NAME_ID))
{
@@ -161,14 +161,14 @@ int main(void)
// TODO: Draw generic gamepad
}
DrawText(FormatText("DETECTED AXIS [%i]:", GetGamepadAxisCount(GAMEPAD_PLAYER1)), 10, 50, 10, MAROON);
DrawText(TextFormat("DETECTED AXIS [%i]:", GetGamepadAxisCount(GAMEPAD_PLAYER1)), 10, 50, 10, MAROON);
for (int i = 0; i < GetGamepadAxisCount(GAMEPAD_PLAYER1); i++)
{
DrawText(FormatText("AXIS %i: %.02f", i, GetGamepadAxisMovement(GAMEPAD_PLAYER1, i)), 20, 70 + 20*i, 10, DARKGRAY);
DrawText(TextFormat("AXIS %i: %.02f", i, GetGamepadAxisMovement(GAMEPAD_PLAYER1, i)), 20, 70 + 20*i, 10, DARKGRAY);
}
if (GetGamepadButtonPressed() != -1) DrawText(FormatText("DETECTED BUTTON: %i", GetGamepadButtonPressed()), 10, 430, 10, RED);
if (GetGamepadButtonPressed() != -1) DrawText(TextFormat("DETECTED BUTTON: %i", GetGamepadButtonPressed()), 10, 430, 10, RED);
else DrawText("DETECTED BUTTON: NONE", 10, 430, 10, GRAY);
}
else

View File

@@ -43,7 +43,7 @@ int main(void)
DrawRectangle(screenWidth/2 - 40, boxPositionY, 80, 80, MAROON);
DrawText("Use mouse wheel to move the cube up and down!", 10, 10, 20, GRAY);
DrawText(FormatText("Box position Y: %03i", boxPositionY), 10, 40, 20, LIGHTGRAY);
DrawText(TextFormat("Box position Y: %03i", boxPositionY), 10, 40, 20, LIGHTGRAY);
EndDrawing();
//----------------------------------------------------------------------------------

View File

@@ -13,6 +13,8 @@
#include "raylib.h"
#define MAX_TOUCH_POINTS 10
int main(void)
{
// Initialization
@@ -26,7 +28,7 @@ int main(void)
Color ballColor = BEIGE;
int touchCounter = 0;
Vector2 touchPosition = { 0.0f };
Vector2 touchPosition = { 0 };
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//---------------------------------------------------------------------------------------
@@ -66,7 +68,7 @@ int main(void)
{
// Draw circle and touch index number
DrawCircleV(touchPosition, 34, ORANGE);
DrawText(FormatText("%d", i), touchPosition.x - 10, touchPosition.y - 70, 40, BLACK);
DrawText(TextFormat("%d", i), touchPosition.x - 10, touchPosition.y - 70, 40, BLACK);
}
}

View File

@@ -0,0 +1,130 @@
/*******************************************************************************************
*
* raylib [core] example - quat conversions
*
* Generally you should really stick to eulers OR quats...
* This tests that various conversions are equivalent.
*
* This example has been created using raylib 3.5 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Example contributed by Chris Camacho (@chriscamacho) and reviewed by Ramon Santamaria (@raysan5)
*
* Copyright (c) 2020 Chris Camacho (@chriscamacho) and Ramon Santamaria (@raysan5)
*
********************************************************************************************/
#include "raylib.h"
#include "raymath.h"
int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [core] example - quat conversions");
Camera3D camera = { 0 };
camera.position = (Vector3){ 0.0f, 10.0f, 10.0f }; // Camera position
camera.target = (Vector3){ 0.0f, 0.0f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.type = CAMERA_PERSPECTIVE; // Camera mode type
Mesh mesh = GenMeshCylinder(0.2f, 1.0f, 32);
Model model = LoadModelFromMesh(mesh);
// Some required variables
Quaternion q1 = { 0 };
Matrix m1 = { 0 }, m2 = { 0 }, m3 = { 0 }, m4 = { 0 };
Vector3 v1 = { 0 }, v2 = { 0 };
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//--------------------------------------------------------------------------------------
if (!IsKeyDown(KEY_SPACE))
{
v1.x += 0.01f;
v1.y += 0.03f;
v1.z += 0.05f;
}
if (v1.x > PI*2) v1.x -= PI*2;
if (v1.y > PI*2) v1.y -= PI*2;
if (v1.z > PI*2) v1.z -= PI*2;
q1 = QuaternionFromEuler(v1.x, v1.y, v1.z);
m1 = MatrixRotateZYX(v1);
m2 = QuaternionToMatrix(q1);
q1 = QuaternionFromMatrix(m1);
m3 = QuaternionToMatrix(q1);
v2 = QuaternionToEuler(q1);
v2.x *= DEG2RAD;
v2.y *= DEG2RAD;
v2.z *= DEG2RAD;
m4 = MatrixRotateZYX(v2);
//--------------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
BeginMode3D(camera);
model.transform = m1;
DrawModel(model, (Vector3){ -1, 0, 0 }, 1.0f, RED);
model.transform = m2;
DrawModel(model, (Vector3){ 1, 0, 0 }, 1.0f, RED);
model.transform = m3;
DrawModel(model, (Vector3){ 0, 0, 0 }, 1.0f, RED);
model.transform = m4;
DrawModel(model, (Vector3){ 0, 0, -1 }, 1.0f, RED);
DrawGrid(10, 1.0f);
EndMode3D();
if (v2.x < 0) v2.x += PI*2;
if (v2.y < 0) v2.y += PI*2;
if (v2.z < 0) v2.z += PI*2;
Color cx,cy,cz;
cx = cy = cz = BLACK;
if (v1.x == v2.x) cx = GREEN;
if (v1.y == v2.y) cy = GREEN;
if (v1.z == v2.z) cz = GREEN;
DrawText(TextFormat("%2.3f", v1.x), 20, 20, 20, cx);
DrawText(TextFormat("%2.3f", v1.y), 20, 40, 20, cy);
DrawText(TextFormat("%2.3f", v1.z), 20, 60, 20, cz);
DrawText(TextFormat("%2.3f", v2.x), 200, 20, 20, cx);
DrawText(TextFormat("%2.3f", v2.y), 200, 40, 20, cy);
DrawText(TextFormat("%2.3f", v2.z), 200, 60, 20, cz);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
UnloadModel(model); // Unload model data (mesh and materials)
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -50,7 +50,7 @@ int main(void)
DrawText("Every 2 seconds a new random value is generated:", 130, 100, 20, MAROON);
DrawText(FormatText("%i", randValue), 360, 180, 80, LIGHTGRAY);
DrawText(TextFormat("%i", randValue), 360, 180, 80, LIGHTGRAY);
EndDrawing();
//----------------------------------------------------------------------------------

View File

@@ -12,7 +12,10 @@
#include "raylib.h"
// NOTE: Storage positions must start with 0, directly related to file memory layout
typedef enum { STORAGE_SCORE = 0, STORAGE_HISCORE } StorageData;
typedef enum {
STORAGE_POSITION_SCORE = 0,
STORAGE_POSITION_HISCORE = 1
} StorageData;
int main(void)
{
@@ -43,14 +46,14 @@ int main(void)
if (IsKeyPressed(KEY_ENTER))
{
StorageSaveValue(STORAGE_SCORE, score);
StorageSaveValue(STORAGE_HISCORE, hiscore);
SaveStorageValue(STORAGE_POSITION_SCORE, score);
SaveStorageValue(STORAGE_POSITION_HISCORE, hiscore);
}
else if (IsKeyPressed(KEY_SPACE))
{
// NOTE: If requested position could not be found, value 0 is returned
score = StorageLoadValue(STORAGE_SCORE);
hiscore = StorageLoadValue(STORAGE_HISCORE);
score = LoadStorageValue(STORAGE_POSITION_SCORE);
hiscore = LoadStorageValue(STORAGE_POSITION_HISCORE);
}
framesCounter++;
@@ -62,10 +65,10 @@ int main(void)
ClearBackground(RAYWHITE);
DrawText(FormatText("SCORE: %i", score), 280, 130, 40, MAROON);
DrawText(FormatText("HI-SCORE: %i", hiscore), 210, 200, 50, BLACK);
DrawText(TextFormat("SCORE: %i", score), 280, 130, 40, MAROON);
DrawText(TextFormat("HI-SCORE: %i", hiscore), 210, 200, 50, BLACK);
DrawText(FormatText("frames: %i", framesCounter), 10, 10, 20, LIME);
DrawText(TextFormat("frames: %i", framesCounter), 10, 10, 20, LIME);
DrawText("Press R to generate random numbers", 220, 40, 20, LIGHTGRAY);
DrawText("Press ENTER to SAVE values", 250, 310, 20, LIGHTGRAY);

View File

@@ -56,7 +56,7 @@ int main(void)
hmd.chromaAbCorrection[3] = 0.0f; // HMD chromatic aberration correction parameter 3
// Distortion shader (uses device lens distortion and chroma)
Shader distortion = LoadShader(0, FormatText("resources/distortion%i.fs", GLSL_VERSION));
Shader distortion = LoadShader(0, TextFormat("resources/distortion%i.fs", GLSL_VERSION));
SetVrConfiguration(hmd, distortion); // Set Vr device parameters for stereo rendering

View File

@@ -0,0 +1,191 @@
/*******************************************************************************************
*
* raylib [core] example - window flags
*
* This example has been created using raylib 3.5 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Copyright (c) 2020 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
#include "raylib.h"
int main(void)
{
// Initialization
//---------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
// Possible window flags
/*
FLAG_VSYNC_HINT
FLAG_FULLSCREEN_MODE -> not working properly -> wrong scaling!
FLAG_WINDOW_RESIZABLE
FLAG_WINDOW_UNDECORATED
FLAG_WINDOW_TRANSPARENT
FLAG_WINDOW_HIDDEN
FLAG_WINDOW_MINIMIZED -> Not supported on window creation
FLAG_WINDOW_MAXIMIZED -> Not supported on window creation
FLAG_WINDOW_UNFOCUSED
FLAG_WINDOW_TOPMOST
FLAG_WINDOW_HIGHDPI -> errors after minimize-resize, fb size is recalculated
FLAG_WINDOW_ALWAYS_RUN
FLAG_MSAA_4X_HINT
*/
// Set configuration flags for window creation
SetConfigFlags(FLAG_VSYNC_HINT | FLAG_MSAA_4X_HINT | FLAG_WINDOW_HIGHDPI);
InitWindow(screenWidth, screenHeight, "raylib [core] example - window flags");
Vector2 ballPosition = { GetScreenWidth() / 2, GetScreenHeight() / 2 };
Vector2 ballSpeed = { 5.0f, 4.0f };
int ballRadius = 20;
int framesCounter = 0;
//SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//----------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//-----------------------------------------------------
if (IsKeyPressed(KEY_F)) ToggleFullscreen(); // modifies window size when scaling!
if (IsKeyPressed(KEY_R))
{
if (IsWindowState(FLAG_WINDOW_RESIZABLE)) ClearWindowState(FLAG_WINDOW_RESIZABLE);
else SetWindowState(FLAG_WINDOW_RESIZABLE);
}
if (IsKeyPressed(KEY_D))
{
if (IsWindowState(FLAG_WINDOW_UNDECORATED)) ClearWindowState(FLAG_WINDOW_UNDECORATED);
else SetWindowState(FLAG_WINDOW_UNDECORATED);
}
if (IsKeyPressed(KEY_H))
{
if (!IsWindowState(FLAG_WINDOW_HIDDEN)) SetWindowState(FLAG_WINDOW_HIDDEN);
framesCounter = 0;
}
if (IsWindowState(FLAG_WINDOW_HIDDEN))
{
framesCounter++;
if (framesCounter >= 240) ClearWindowState(FLAG_WINDOW_HIDDEN); // Show window after 3 seconds
}
if (IsKeyPressed(KEY_N))
{
if (!IsWindowState(FLAG_WINDOW_MINIMIZED)) MinimizeWindow();
framesCounter = 0;
}
if (IsWindowState(FLAG_WINDOW_MINIMIZED))
{
framesCounter++;
if (framesCounter >= 240) RestoreWindow(); // Restore window after 3 seconds
}
if (IsKeyPressed(KEY_M))
{
// NOTE: Requires FLAG_WINDOW_RESIZABLE enabled!
if (IsWindowState(FLAG_WINDOW_MAXIMIZED)) RestoreWindow();
else MaximizeWindow();
}
if (IsKeyPressed(KEY_U))
{
if (IsWindowState(FLAG_WINDOW_UNFOCUSED)) ClearWindowState(FLAG_WINDOW_UNFOCUSED);
else SetWindowState(FLAG_WINDOW_UNFOCUSED);
}
if (IsKeyPressed(KEY_T))
{
if (IsWindowState(FLAG_WINDOW_TOPMOST)) ClearWindowState(FLAG_WINDOW_TOPMOST);
else SetWindowState(FLAG_WINDOW_TOPMOST);
}
if (IsKeyPressed(KEY_A))
{
if (IsWindowState(FLAG_WINDOW_ALWAYS_RUN)) ClearWindowState(FLAG_WINDOW_ALWAYS_RUN);
else SetWindowState(FLAG_WINDOW_ALWAYS_RUN);
}
if (IsKeyPressed(KEY_V))
{
if (IsWindowState(FLAG_VSYNC_HINT)) ClearWindowState(FLAG_VSYNC_HINT);
else SetWindowState(FLAG_VSYNC_HINT);
}
// Bouncing ball logic
ballPosition.x += ballSpeed.x;
ballPosition.y += ballSpeed.y;
if ((ballPosition.x >= (GetScreenWidth() - ballRadius)) || (ballPosition.x <= ballRadius)) ballSpeed.x *= -1.0f;
if ((ballPosition.y >= (GetScreenHeight() - ballRadius)) || (ballPosition.y <= ballRadius)) ballSpeed.y *= -1.0f;
//-----------------------------------------------------
// Draw
//-----------------------------------------------------
BeginDrawing();
if (IsWindowState(FLAG_WINDOW_TRANSPARENT)) ClearBackground(BLANK);
else ClearBackground(RAYWHITE);
DrawCircleV(ballPosition, ballRadius, MAROON);
DrawRectangleLinesEx((Rectangle) { 0, 0, GetScreenWidth(), GetScreenHeight() }, 4, RAYWHITE);
DrawCircleV(GetMousePosition(), 10, DARKBLUE);
DrawFPS(10, 10);
DrawText(FormatText("Screen Size: [%i, %i]", GetScreenWidth(), GetScreenHeight()), 10, 40, 10, GREEN);
// Draw window state info
DrawText("Following flags can be set after window creation:", 10, 60, 10, GRAY);
if (IsWindowState(FLAG_FULLSCREEN_MODE)) DrawText("[F] FLAG_FULLSCREEN_MODE: on", 10, 80, 10, LIME);
else DrawText("[F] FLAG_FULLSCREEN_MODE: off", 10, 80, 10, MAROON);
if (IsWindowState(FLAG_WINDOW_RESIZABLE)) DrawText("[R] FLAG_WINDOW_RESIZABLE: on", 10, 100, 10, LIME);
else DrawText("[R] FLAG_WINDOW_RESIZABLE: off", 10, 100, 10, MAROON);
if (IsWindowState(FLAG_WINDOW_UNDECORATED)) DrawText("[D] FLAG_WINDOW_UNDECORATED: on", 10, 120, 10, LIME);
else DrawText("[D] FLAG_WINDOW_UNDECORATED: off", 10, 120, 10, MAROON);
if (IsWindowState(FLAG_WINDOW_HIDDEN)) DrawText("[H] FLAG_WINDOW_HIDDEN: on", 10, 140, 10, LIME);
else DrawText("[H] FLAG_WINDOW_HIDDEN: off", 10, 140, 10, MAROON);
if (IsWindowState(FLAG_WINDOW_MINIMIZED)) DrawText("[N] FLAG_WINDOW_MINIMIZED: on", 10, 160, 10, LIME);
else DrawText("[N] FLAG_WINDOW_MINIMIZED: off", 10, 160, 10, MAROON);
if (IsWindowState(FLAG_WINDOW_MAXIMIZED)) DrawText("[M] FLAG_WINDOW_MAXIMIZED: on", 10, 180, 10, LIME);
else DrawText("[M] FLAG_WINDOW_MAXIMIZED: off", 10, 180, 10, MAROON);
if (IsWindowState(FLAG_WINDOW_UNFOCUSED)) DrawText("[G] FLAG_WINDOW_UNFOCUSED: on", 10, 200, 10, LIME);
else DrawText("[U] FLAG_WINDOW_UNFOCUSED: off", 10, 200, 10, MAROON);
if (IsWindowState(FLAG_WINDOW_TOPMOST)) DrawText("[T] FLAG_WINDOW_TOPMOST: on", 10, 220, 10, LIME);
else DrawText("[T] FLAG_WINDOW_TOPMOST: off", 10, 220, 10, MAROON);
if (IsWindowState(FLAG_WINDOW_ALWAYS_RUN)) DrawText("[A] FLAG_WINDOW_ALWAYS_RUN: on", 10, 240, 10, LIME);
else DrawText("[A] FLAG_WINDOW_ALWAYS_RUN: off", 10, 240, 10, MAROON);
if (IsWindowState(FLAG_VSYNC_HINT)) DrawText("[V] FLAG_VSYNC_HINT: on", 10, 260, 10, LIME);
else DrawText("[V] FLAG_VSYNC_HINT: off", 10, 260, 10, MAROON);
DrawText("Following flags can only be set before window creation:", 10, 300, 10, GRAY);
if (IsWindowState(FLAG_WINDOW_HIGHDPI)) DrawText("FLAG_WINDOW_HIGHDPI: on", 10, 320, 10, LIME);
else DrawText("FLAG_WINDOW_HIGHDPI: off", 10, 320, 10, MAROON);
if (IsWindowState(FLAG_WINDOW_TRANSPARENT)) DrawText("FLAG_WINDOW_TRANSPARENT: on", 10, 340, 10, LIME);
else DrawText("FLAG_WINDOW_TRANSPARENT: off", 10, 340, 10, MAROON);
if (IsWindowState(FLAG_MSAA_4X_HINT)) DrawText("FLAG_MSAA_4X_HINT: on", 10, 360, 10, LIME);
else DrawText("FLAG_MSAA_4X_HINT: off", 10, 360, 10, MAROON);
EndDrawing();
//-----------------------------------------------------
}
// De-Initialization
//---------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
//----------------------------------------------------------
return 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -1,6 +1,6 @@
/*******************************************************************************************
*
* raylib [core] example - window scale letterbox
* raylib [core] example - window scale letterbox (and virtual mouse)
*
* This example has been created using raylib 2.5 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
@@ -16,6 +16,18 @@
#define max(a, b) ((a)>(b)? (a) : (b))
#define min(a, b) ((a)<(b)? (a) : (b))
// Clamp Vector2 value with min and max and return a new vector2
// NOTE: Required for virtual mouse, to clamp inside virtual game size
Vector2 ClampValue(Vector2 value, Vector2 min, Vector2 max)
{
Vector2 result = value;
result.x = (result.x > max.x)? max.x : result.x;
result.x = (result.x < min.x)? min.x : result.x;
result.y = (result.y > max.y)? max.y : result.y;
result.y = (result.y < min.y)? min.y : result.y;
return result;
}
int main(void)
{
const int windowWidth = 800;
@@ -52,6 +64,13 @@ int main(void)
// Recalculate random colors for the bars
for (int i = 0; i < 10; i++) colors[i] = (Color){ GetRandomValue(100, 250), GetRandomValue(50, 150), GetRandomValue(10, 100), 255 };
}
// Update virtual mouse (clamped mouse value behind game screen)
Vector2 mouse = GetMousePosition();
Vector2 virtualMouse = { 0 };
virtualMouse.x = (mouse.x - (GetScreenWidth() - (gameScreenWidth*scale))*0.5f)/scale;
virtualMouse.y = (mouse.y - (GetScreenHeight() - (gameScreenHeight*scale))*0.5f)/scale;
virtualMouse = ClampValue(virtualMouse, (Vector2){ 0, 0 }, (Vector2){ gameScreenWidth, gameScreenHeight });
//----------------------------------------------------------------------------------
// Draw
@@ -68,6 +87,9 @@ int main(void)
DrawText("If executed inside a window,\nyou can resize the window,\nand see the screen scaling!", 10, 25, 20, WHITE);
DrawText(TextFormat("Default Mouse: [%i , %i]", (int)mouse.x, (int)mouse.y), 350, 25, 20, GREEN);
DrawText(TextFormat("Virtual Mouse: [%i , %i]", (int)virtualMouse.x, (int)virtualMouse.y), 350, 55, 20, YELLOW);
EndTextureMode();
// Draw RenderTexture2D to window, properly scaled

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,4 @@
| resource | author | licence | notes |
| :------------ | :---------: | :------ | :---- |
| ps3.png | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - |
| xbox.png | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - |

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -17,9 +17,11 @@
*
********************************************************************************************/
#include <stdlib.h>
#include "raylib.h"
#include <stdlib.h>
int main(void)
{
// Initialization
@@ -37,7 +39,6 @@ int main(void)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.type = CAMERA_PERSPECTIVE; // Camera mode type
Model model = LoadModel("resources/guy/guy.iqm"); // Load the animated model mesh and basic data
Texture2D texture = LoadTexture("resources/guy/guytex.png"); // Load model texture and set material
SetMaterialTexture(&model.materials[0], MAP_DIFFUSE, texture); // Set model material map texture

View File

@@ -2,6 +2,9 @@
*
* raylib [models] example - PBR material
*
* NOTE: This example requires raylib OpenGL 3.3 for shaders support and only #version 330
* is currently supported. OpenGL ES 2.0 platforms are not supported at the moment.
*
* This example has been created using raylib 1.8 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
@@ -17,7 +20,7 @@
#define RLIGHTS_IMPLEMENTATION
#include "rlights.h"
#define CUBEMAP_SIZE 512 // Cubemap texture size
#define CUBEMAP_SIZE 1024 // Cubemap texture size
#define IRRADIANCE_SIZE 32 // Irradiance texture size
#define PREFILTERED_SIZE 256 // Prefiltered HDR environment texture size
#define BRDF_SIZE 512 // BRDF LUT texture size
@@ -48,9 +51,8 @@ int main(void)
// Mesh tangents are generated... and uploaded to GPU
// NOTE: New VBO for tangents is generated at default location and also binded to mesh VAO
MeshTangents(&model.meshes[0]);
//MeshTangents(&model.meshes[0]);
UnloadMaterial(model.materials[0]); // get rid of default material
model.materials[0] = LoadMaterialPBR((Color){ 255, 255, 255, 255 }, 1.0f, 1.0f);
// Create lights
@@ -99,18 +101,7 @@ int main(void)
// De-Initialization
//--------------------------------------------------------------------------------------
// Shaders and textures must be unloaded by user,
// they could be in use by other models
UnloadTexture(model.materials[0].maps[MAP_ALBEDO].texture);
UnloadTexture(model.materials[0].maps[MAP_NORMAL].texture);
UnloadTexture(model.materials[0].maps[MAP_METALNESS].texture);
UnloadTexture(model.materials[0].maps[MAP_ROUGHNESS].texture);
UnloadTexture(model.materials[0].maps[MAP_OCCLUSION].texture);
UnloadTexture(model.materials[0].maps[MAP_IRRADIANCE].texture);
UnloadTexture(model.materials[0].maps[MAP_PREFILTER].texture);
UnloadTexture(model.materials[0].maps[MAP_BRDF].texture);
UnloadShader(model.materials[0].shader);
UnloadMaterial(model.materials[0]); // Unload material: shader and textures
UnloadModel(model); // Unload model
@@ -126,6 +117,7 @@ static Material LoadMaterialPBR(Color albedo, float metalness, float roughness)
{
Material mat = LoadMaterialDefault(); // Initialize material to default
// Load PBR shader (requires several maps)
#if defined(PLATFORM_DESKTOP)
mat.shader = LoadShader("resources/shaders/glsl330/pbr.vs", "resources/shaders/glsl330/pbr.fs");
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
@@ -157,53 +149,6 @@ static Material LoadMaterialPBR(Color albedo, float metalness, float roughness)
mat.maps[MAP_ROUGHNESS].texture = LoadTexture("resources/pbr/trooper_roughness.png");
mat.maps[MAP_OCCLUSION].texture = LoadTexture("resources/pbr/trooper_ao.png");
// Load equirectangular to cubemap shader
#if defined(PLATFORM_DESKTOP)
Shader shdrCubemap = LoadShader("resources/shaders/glsl330/cubemap.vs", "resources/shaders/glsl330/cubemap.fs");
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
Shader shdrCubemap = LoadShader("resources/shaders/glsl100/cubemap.vs", "resources/shaders/glsl100/cubemap.fs");
#endif
// Load irradiance (GI) calculation shader
#if defined(PLATFORM_DESKTOP)
Shader shdrIrradiance = LoadShader("resources/shaders/glsl330/skybox.vs", "resources/shaders/glsl330/irradiance.fs");
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
Shader shdrIrradiance = LoadShader("resources/shaders/glsl100/skybox.vs", "resources/shaders/glsl100/irradiance.fs");
#endif
// Load reflection prefilter calculation shader
#if defined(PLATFORM_DESKTOP)
Shader shdrPrefilter = LoadShader("resources/shaders/glsl330/skybox.vs", "resources/shaders/glsl330/prefilter.fs");
#else
Shader shdrPrefilter = LoadShader("resources/shaders/glsl100/skybox.vs", "resources/shaders/glsl100/prefilter.fs");
#endif
// Load bidirectional reflectance distribution function shader
#if defined(PLATFORM_DESKTOP)
Shader shdrBRDF = LoadShader("resources/shaders/glsl330/brdf.vs", "resources/shaders/glsl330/brdf.fs");
#else
Shader shdrBRDF = LoadShader("resources/shaders/glsl100/brdf.vs", "resources/shaders/glsl100/brdf.fs");
#endif
// Setup required shader locations
SetShaderValue(shdrCubemap, GetShaderLocation(shdrCubemap, "equirectangularMap"), (int[1]){ 0 }, UNIFORM_INT);
SetShaderValue(shdrIrradiance, GetShaderLocation(shdrIrradiance, "environmentMap"), (int[1]){ 0 }, UNIFORM_INT);
SetShaderValue(shdrPrefilter, GetShaderLocation(shdrPrefilter, "environmentMap"), (int[1]){ 0 }, UNIFORM_INT);
Texture2D texHDR = LoadTexture("resources/dresden_square.hdr");
Texture2D cubemap = GenTextureCubemap(shdrCubemap, texHDR, CUBEMAP_SIZE);
mat.maps[MAP_IRRADIANCE].texture = GenTextureIrradiance(shdrIrradiance, cubemap, IRRADIANCE_SIZE);
mat.maps[MAP_PREFILTER].texture = GenTexturePrefilter(shdrPrefilter, cubemap, PREFILTERED_SIZE);
mat.maps[MAP_BRDF].texture = GenTextureBRDF(shdrBRDF, BRDF_SIZE);
UnloadTexture(cubemap);
UnloadTexture(texHDR);
// Unload already used shaders (to create specific textures)
UnloadShader(shdrCubemap);
UnloadShader(shdrIrradiance);
UnloadShader(shdrPrefilter);
UnloadShader(shdrBRDF);
// Set textures filtering for better quality
SetTextureFilter(mat.maps[MAP_ALBEDO].texture, FILTER_BILINEAR);
SetTextureFilter(mat.maps[MAP_NORMAL].texture, FILTER_BILINEAR);
@@ -230,5 +175,58 @@ static Material LoadMaterialPBR(Color albedo, float metalness, float roughness)
mat.maps[MAP_EMISSION].value = 0.5f;
mat.maps[MAP_HEIGHT].value = 0.5f;
// Generate cubemap from panorama texture
//--------------------------------------------------------------------------------------------------------
Texture2D panorama = LoadTexture("resources/dresden_square.hdr");
// Load equirectangular to cubemap shader
#if defined(PLATFORM_DESKTOP)
Shader shdrCubemap = LoadShader("resources/shaders/glsl330/cubemap.vs", "resources/shaders/glsl330/cubemap.fs");
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
Shader shdrCubemap = LoadShader("resources/shaders/glsl100/cubemap.vs", "resources/shaders/glsl100/cubemap.fs");
#endif
SetShaderValue(shdrCubemap, GetShaderLocation(shdrCubemap, "equirectangularMap"), (int[1]){ 0 }, UNIFORM_INT);
TextureCubemap cubemap = GenTextureCubemap(shdrCubemap, panorama, CUBEMAP_SIZE, UNCOMPRESSED_R32G32B32);
UnloadTexture(panorama);
UnloadShader(shdrCubemap);
//--------------------------------------------------------------------------------------------------------
// Generate irradiance map from cubemap texture
//--------------------------------------------------------------------------------------------------------
// Load irradiance (GI) calculation shader
#if defined(PLATFORM_DESKTOP)
Shader shdrIrradiance = LoadShader("resources/shaders/glsl330/skybox.vs", "resources/shaders/glsl330/irradiance.fs");
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
Shader shdrIrradiance = LoadShader("resources/shaders/glsl100/skybox.vs", "resources/shaders/glsl100/irradiance.fs");
#endif
SetShaderValue(shdrIrradiance, GetShaderLocation(shdrIrradiance, "environmentMap"), (int[1]){ 0 }, UNIFORM_INT);
mat.maps[MAP_IRRADIANCE].texture = GenTextureIrradiance(shdrIrradiance, cubemap, IRRADIANCE_SIZE);
UnloadShader(shdrIrradiance);
//--------------------------------------------------------------------------------------------------------
// Generate prefilter map from cubemap texture
//--------------------------------------------------------------------------------------------------------
// Load reflection prefilter calculation shader
#if defined(PLATFORM_DESKTOP)
Shader shdrPrefilter = LoadShader("resources/shaders/glsl330/skybox.vs", "resources/shaders/glsl330/prefilter.fs");
#else
Shader shdrPrefilter = LoadShader("resources/shaders/glsl100/skybox.vs", "resources/shaders/glsl100/prefilter.fs");
#endif
SetShaderValue(shdrPrefilter, GetShaderLocation(shdrPrefilter, "environmentMap"), (int[1]){ 0 }, UNIFORM_INT);
mat.maps[MAP_PREFILTER].texture = GenTexturePrefilter(shdrPrefilter, cubemap, PREFILTERED_SIZE);
UnloadTexture(cubemap);
UnloadShader(shdrPrefilter);
//--------------------------------------------------------------------------------------------------------
// Generate BRDF (bidirectional reflectance distribution function) texture (using shader)
//--------------------------------------------------------------------------------------------------------
#if defined(PLATFORM_DESKTOP)
Shader shdrBRDF = LoadShader("resources/shaders/glsl330/brdf.vs", "resources/shaders/glsl330/brdf.fs");
#else
Shader shdrBRDF = LoadShader("resources/shaders/glsl100/brdf.vs", "resources/shaders/glsl100/brdf.fs");
#endif
mat.maps[MAP_BRDF].texture = GenTextureBRDF(shdrBRDF, BRDF_SIZE);
UnloadShader(shdrBRDF);
//--------------------------------------------------------------------------------------------------------
return mat;
}

View File

@@ -160,25 +160,25 @@ int main(void)
EndMode3D();
// Draw some debug GUI text
DrawText(FormatText("Hit Object: %s", hitObjectName), 10, 50, 10, BLACK);
DrawText(TextFormat("Hit Object: %s", hitObjectName), 10, 50, 10, BLACK);
if (nearestHit.hit)
{
int ypos = 70;
DrawText(FormatText("Distance: %3.2f", nearestHit.distance), 10, ypos, 10, BLACK);
DrawText(TextFormat("Distance: %3.2f", nearestHit.distance), 10, ypos, 10, BLACK);
DrawText(FormatText("Hit Pos: %3.2f %3.2f %3.2f",
DrawText(TextFormat("Hit Pos: %3.2f %3.2f %3.2f",
nearestHit.position.x,
nearestHit.position.y,
nearestHit.position.z), 10, ypos + 15, 10, BLACK);
DrawText(FormatText("Hit Norm: %3.2f %3.2f %3.2f",
DrawText(TextFormat("Hit Norm: %3.2f %3.2f %3.2f",
nearestHit.normal.x,
nearestHit.normal.y,
nearestHit.normal.z), 10, ypos + 30, 10, BLACK);
if (hitTriangle) DrawText(FormatText("Barycenter: %3.2f %3.2f %3.2f", bary.x, bary.y, bary.z), 10, ypos + 45, 10, BLACK);
if (hitTriangle) DrawText(TextFormat("Barycenter: %3.2f %3.2f %3.2f", bary.x, bary.y, bary.z), 10, ypos + 45, 10, BLACK);
}
DrawText("Use Mouse to Move Camera", 10, 430, 10, GRAY);

View File

@@ -2,10 +2,10 @@
*
* raylib [models] example - Skybox loading and drawing
*
* This example has been created using raylib 1.8 (www.raylib.com)
* This example has been created using raylib 3.5 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Copyright (c) 2017 Ramon Santamaria (@raysan5)
* Copyright (c) 2017-2020 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
@@ -35,6 +35,7 @@ int main(void)
skybox.materials[0].shader = LoadShader("resources/shaders/glsl100/skybox.vs", "resources/shaders/glsl100/skybox.fs");
#endif
SetShaderValue(skybox.materials[0].shader, GetShaderLocation(skybox.materials[0].shader, "environmentMap"), (int[1]){ MAP_CUBEMAP }, UNIFORM_INT);
SetShaderValue(skybox.materials[0].shader, GetShaderLocation(skybox.materials[0].shader, "vflipped"), (int[1]){ 1 }, UNIFORM_INT);
// Load cubemap shader and setup required shader locations
#if defined(PLATFORM_DESKTOP)
@@ -45,14 +46,17 @@ int main(void)
SetShaderValue(shdrCubemap, GetShaderLocation(shdrCubemap, "equirectangularMap"), (int[1]){ 0 }, UNIFORM_INT);
// Load HDR panorama (sphere) texture
Texture2D texHDR = LoadTexture("resources/dresden_square.hdr");
char panoFileName[256] = { 0 };
TextCopy(panoFileName, "resources/dresden_square_2k.hdr");
Texture2D panorama = LoadTexture(panoFileName);
// Generate cubemap (texture with 6 quads-cube-mapping) from panorama HDR texture
// NOTE: New texture is generated rendering to texture, shader computes the sphre->cube coordinates mapping
skybox.materials[0].maps[MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, texHDR, 512);
// NOTE 1: New texture is generated rendering to texture, shader calculates the sphere->cube coordinates mapping
// NOTE 2: It seems on some Android devices WebGL, fbo does not properly support a FLOAT-based attachment,
// despite texture can be successfully created.. so using UNCOMPRESSED_R8G8B8A8 instead of UNCOMPRESSED_R32G32B32A32
skybox.materials[0].maps[MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, panorama, 1024, UNCOMPRESSED_R8G8B8A8);
UnloadTexture(texHDR); // Texture not required anymore, cubemap already generated
UnloadShader(shdrCubemap); // Unload cubemap generation shader, not required anymore
UnloadTexture(panorama); // Texture not required anymore, cubemap already generated
SetCameraMode(camera, CAMERA_FIRST_PERSON); // Set a first person camera mode
@@ -65,6 +69,30 @@ int main(void)
// Update
//----------------------------------------------------------------------------------
UpdateCamera(&camera); // Update camera
// Load new cubemap texture on drag&drop
if (IsFileDropped())
{
int count = 0;
char **droppedFiles = GetDroppedFiles(&count);
if (count == 1) // Only support one file dropped
{
if (IsFileExtension(droppedFiles[0], ".png;.jpg;.hdr;.bmp;.tga"))
{
// Unload current cubemap texture and load new one
UnloadTexture(skybox.materials[0].maps[MAP_CUBEMAP].texture);
panorama = LoadTexture(droppedFiles[0]);
TextCopy(panoFileName, droppedFiles[0]);
// Generate cubemap from panorama texture
skybox.materials[0].maps[MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, panorama, 1024, UNCOMPRESSED_R8G8B8A8);
UnloadTexture(panorama);
}
}
ClearDroppedFiles(); // Clear internal buffers
}
//----------------------------------------------------------------------------------
// Draw
@@ -74,13 +102,11 @@ int main(void)
ClearBackground(RAYWHITE);
BeginMode3D(camera);
DrawModel(skybox, (Vector3){0, 0, 0}, 1.0f, WHITE);
DrawGrid(10, 1.0f);
EndMode3D();
DrawText(TextFormat("Panorama image from hdrihaven.com: %s", GetFileName(panoFileName)), 10, GetScreenHeight() - 20, 10, BLACK);
DrawFPS(10, 10);
EndDrawing();

View File

@@ -84,7 +84,7 @@ int main()
};
// Pick a color with a hue depending on cube position for the rainbow color effect
Color cubeColor = ColorFromHSV((Vector3){ (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
float cubeSize = (2.4f - scale)*blockScale;

View File

@@ -114,23 +114,23 @@ int main(void)
// Draw framebuffer texture (Ahrs Display)
int centerX = framebuffer.texture.width/2;
int centerY = framebuffer.texture.height/2;
float scaleFactor = 0.5f;
BeginTextureMode(framebuffer);
ClearBackground(RAYWHITE);
BeginBlendMode(BLEND_ALPHA);
DrawTexturePro(texBackground, (Rectangle){ 0, 0, texBackground.width, texBackground.height },
(Rectangle){ centerX, centerY, texBackground.width*scaleFactor, texBackground.height*scaleFactor},
(Vector2){ texBackground.width/2*scaleFactor, texBackground.height/2*scaleFactor + pitchOffset*scaleFactor }, roll, WHITE);
(Rectangle){ centerX, centerY, texBackground.width, texBackground.height},
(Vector2){ texBackground.width/2, texBackground.height/2 + pitchOffset }, roll, WHITE);
DrawTexturePro(texPitch, (Rectangle){ 0, 0, texPitch.width, texPitch.height },
(Rectangle){ centerX, centerY, texPitch.width*scaleFactor, texPitch.height*scaleFactor },
(Vector2){ texPitch.width/2*scaleFactor, texPitch.height/2*scaleFactor + pitchOffset*scaleFactor }, roll, WHITE);
(Rectangle){ centerX, centerY, texPitch.width, texPitch.height },
(Vector2){ texPitch.width/2, texPitch.height/2 + pitchOffset }, roll, WHITE);
DrawTexturePro(texPlane, (Rectangle){ 0, 0, texPlane.width, texPlane.height },
(Rectangle){ centerX, centerY, texPlane.width*scaleFactor, texPlane.height*scaleFactor },
(Vector2){ texPlane.width/2*scaleFactor, texPlane.height/2*scaleFactor }, 0, WHITE);
(Rectangle){ centerX, centerY, texPlane.width, texPlane.height },
(Vector2){ texPlane.width/2, texPlane.height/2 }, 0, WHITE);
EndBlendMode();
@@ -195,6 +195,6 @@ void DrawAngleGauge(Texture2D angleGauge, int x, int y, float angle, char title[
DrawTexturePro(angleGauge, srcRec, dstRec, origin, angle, color);
DrawText(FormatText("%5.1f", angle), x - MeasureText(FormatText("%5.1f", angle), textSize) / 2, y + 10, textSize, DARKGRAY);
DrawText(TextFormat("%5.1f", angle), x - MeasureText(TextFormat("%5.1f", angle), textSize) / 2, y + 10, textSize, DARKGRAY);
DrawText(title, x - MeasureText(title, textSize) / 2, y + 60, textSize, DARKGRAY);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 KiB

After

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1,219 +0,0 @@
{
"asset": {
"generator": "COLLADA2GLTF",
"version": "2.0"
},
"scene": 0,
"scenes": [
{
"nodes": [
0
]
}
],
"nodes": [
{
"children": [
2,
1
],
"matrix": [
0.009999999776482582,
0.0,
0.0,
0.0,
0.0,
0.009999999776482582,
0.0,
0.0,
0.0,
0.0,
0.009999999776482582,
0.0,
0.0,
0.0,
0.0,
1.0
]
},
{
"matrix": [
-0.7289686799049377,
0.0,
-0.6845470666885376,
0.0,
-0.4252049028873444,
0.7836934328079224,
0.4527972936630249,
0.0,
0.5364750623703003,
0.6211478114128113,
-0.571287989616394,
0.0,
400.1130065917969,
463.2640075683594,
-431.0780334472656,
1.0
],
"camera": 0
},
{
"mesh": 0
}
],
"cameras": [
{
"perspective": {
"aspectRatio": 1.5,
"yfov": 0.6605925559997559,
"zfar": 10000.0,
"znear": 1.0
},
"type": "perspective"
}
],
"meshes": [
{
"primitives": [
{
"attributes": {
"NORMAL": 1,
"POSITION": 2,
"TEXCOORD_0": 3
},
"indices": 0,
"mode": 4,
"material": 0
}
],
"name": "LOD3spShape"
}
],
"accessors": [
{
"bufferView": 0,
"byteOffset": 0,
"componentType": 5123,
"count": 12636,
"max": [
2398
],
"min": [
0
],
"type": "SCALAR"
},
{
"bufferView": 1,
"byteOffset": 0,
"componentType": 5126,
"count": 2399,
"max": [
0.9995989799499512,
0.999580979347229,
0.9984359741210938
],
"min": [
-0.9990839958190918,
-1.0,
-0.9998319745063782
],
"type": "VEC3"
},
{
"bufferView": 1,
"byteOffset": 28788,
"componentType": 5126,
"count": 2399,
"max": [
96.17990112304688,
163.97000122070313,
53.92519760131836
],
"min": [
-69.29850006103516,
9.929369926452637,
-61.32819747924805
],
"type": "VEC3"
},
{
"bufferView": 2,
"byteOffset": 0,
"componentType": 5126,
"count": 2399,
"max": [
0.9833459854125976,
0.9800369739532472
],
"min": [
0.026409000158309938,
0.01996302604675293
],
"type": "VEC2"
}
],
"materials": [
{
"pbrMetallicRoughness": {
"baseColorTexture": {
"index": 0
},
"metallicFactor": 0.0
},
"emissiveFactor": [
0.0,
0.0,
0.0
],
"name": "blinn3-fx"
}
],
"textures": [
{
"sampler": 0,
"source": 0
}
],
"images": [
{
"uri": "DuckCM.png"
}
],
"samplers": [
{
"magFilter": 9729,
"minFilter": 9986,
"wrapS": 10497,
"wrapT": 10497
}
],
"bufferViews": [
{
"buffer": 0,
"byteOffset": 76768,
"byteLength": 25272,
"target": 34963
},
{
"buffer": 0,
"byteOffset": 0,
"byteLength": 57576,
"byteStride": 12,
"target": 34962
},
{
"buffer": 0,
"byteOffset": 57576,
"byteLength": 19192,
"byteStride": 8,
"target": 34962
}
],
"buffers": [
{
"byteLength": 102040,
"uri": "Duck0.bin"
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -1,14 +0,0 @@
# Duck
## Screenshot
![screenshot](screenshot/screenshot.png)
## License Information
Copyright 2006 Sony Computer Entertainment Inc.
Licensed under the SCEA Shared Source License, Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:
http://research.scea.com/scea_shared_source_license.html
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 KiB

After

Width:  |  Height:  |  Size: 311 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 434 KiB

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 KiB

After

Width:  |  Height:  |  Size: 383 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 KiB

After

Width:  |  Height:  |  Size: 380 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 KiB

After

Width:  |  Height:  |  Size: 371 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 KiB

After

Width:  |  Height:  |  Size: 334 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 KiB

After

Width:  |  Height:  |  Size: 295 KiB

View File

@@ -1,133 +0,0 @@
/*******************************************************************************************
*
* BRDF LUT Generation - Bidirectional reflectance distribution function fragment shader
*
* REF: https://github.com/HectorMF/BRDFGenerator
*
* Copyright (c) 2017 Victor Fisac
*
**********************************************************************************************/
#version 330
// Input vertex attributes (from vertex shader)
in vec2 fragTexCoord;
// Constant values
const float PI = 3.14159265359;
const uint MAX_SAMPLES = 1024u;
// Output fragment color
out vec4 finalColor;
vec2 Hammersley(uint i, uint N);
float RadicalInverseVdC(uint bits);
float GeometrySchlickGGX(float NdotV, float roughness);
float GeometrySmith(vec3 N, vec3 V, vec3 L, float roughness);
vec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness);
vec2 IntegrateBRDF(float NdotV, float roughness);
float RadicalInverseVdC(uint bits)
{
bits = (bits << 16u) | (bits >> 16u);
bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);
bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);
bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);
bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);
return float(bits) * 2.3283064365386963e-10; // / 0x100000000
}
// Compute Hammersley coordinates
vec2 Hammersley(uint i, uint N)
{
return vec2(float(i)/float(N), RadicalInverseVdC(i));
}
// Integrate number of importance samples for (roughness and NoV)
vec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness)
{
float a = roughness*roughness;
float phi = 2.0 * PI * Xi.x;
float cosTheta = sqrt((1.0 - Xi.y)/(1.0 + (a*a - 1.0)*Xi.y));
float sinTheta = sqrt(1.0 - cosTheta*cosTheta);
// Transform from spherical coordinates to cartesian coordinates (halfway vector)
vec3 H = vec3(cos(phi)*sinTheta, sin(phi)*sinTheta, cosTheta);
// Transform from tangent space H vector to world space sample vector
vec3 up = ((abs(N.z) < 0.999) ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0));
vec3 tangent = normalize(cross(up, N));
vec3 bitangent = cross(N, tangent);
vec3 sampleVec = tangent*H.x + bitangent*H.y + N*H.z;
return normalize(sampleVec);
}
float GeometrySchlickGGX(float NdotV, float roughness)
{
// For IBL k is calculated different
float k = (roughness*roughness)/2.0;
float nom = NdotV;
float denom = NdotV*(1.0 - k) + k;
return nom/denom;
}
// Compute the geometry term for the BRDF given roughness squared, NoV, NoL
float GeometrySmith(vec3 N, vec3 V, vec3 L, float roughness)
{
float NdotV = max(dot(N, V), 0.0);
float NdotL = max(dot(N, L), 0.0);
float ggx2 = GeometrySchlickGGX(NdotV, roughness);
float ggx1 = GeometrySchlickGGX(NdotL, roughness);
return ggx1*ggx2;
}
vec2 IntegrateBRDF(float NdotV, float roughness)
{
float A = 0.0;
float B = 0.0;
vec3 V = vec3(sqrt(1.0 - NdotV*NdotV), 0.0, NdotV);
vec3 N = vec3(0.0, 0.0, 1.0);
for (uint i = 0u; i < MAX_SAMPLES; i++)
{
// Generate a sample vector that's biased towards the preferred alignment direction (importance sampling)
vec2 Xi = Hammersley(i, MAX_SAMPLES); // Compute a Hammersely coordinate
vec3 H = ImportanceSampleGGX(Xi, N, roughness); // Integrate number of importance samples for (roughness and NoV)
vec3 L = normalize(2.0*dot(V, H)*H - V); // Compute reflection vector L
float NdotL = max(L.z, 0.0); // Compute normal dot light
float NdotH = max(H.z, 0.0); // Compute normal dot half
float VdotH = max(dot(V, H), 0.0); // Compute view dot half
if (NdotL > 0.0)
{
float G = GeometrySmith(N, V, L, roughness); // Compute the geometry term for the BRDF given roughness squared, NoV, NoL
float GVis = (G*VdotH)/(NdotH*NdotV); // Compute the visibility term given G, VoH, NoH, NoV, NoL
float Fc = pow(1.0 - VdotH, 5.0); // Compute the fresnel term given VoH
A += (1.0 - Fc)*GVis; // Sum the result given fresnel, geometry, visibility
B += Fc*GVis;
}
}
// Calculate brdf average sample
A /= float(MAX_SAMPLES);
B /= float(MAX_SAMPLES);
return vec2(A, B);
}
void main()
{
// Calculate brdf based on texture coordinates
vec2 brdf = IntegrateBRDF(fragTexCoord.x, fragTexCoord.y);
// Calculate final fragment color
finalColor = vec4(brdf.r, brdf.g, 0.0, 1.0);
}

View File

@@ -1,25 +0,0 @@
/*******************************************************************************************
*
* rPBR [shader] - Bidirectional reflectance distribution function vertex shader
*
* Copyright (c) 2017 Victor Fisac
*
**********************************************************************************************/
#version 330
// Input vertex attributes
in vec3 vertexPosition;
in vec2 vertexTexCoord;
// Output vertex attributes (to fragment shader)
out vec2 fragTexCoord;
void main()
{
// Calculate fragment position based on model transformations
fragTexCoord = vertexTexCoord;
// Calculate final vertex position
gl_Position = vec4(vertexPosition, 1.0);
}

View File

@@ -1,22 +1,13 @@
/*******************************************************************************************
*
* rPBR [shader] - Equirectangular to cubemap fragment shader
*
* Copyright (c) 2017 Victor Fisac
*
**********************************************************************************************/
#version 100
#version 330
precision mediump float;
// Input vertex attributes (from vertex shader)
in vec3 fragPosition;
varying vec3 fragPosition;
// Input uniform values
uniform sampler2D equirectangularMap;
// Output fragment color
out vec4 finalColor;
vec2 SampleSphericalMap(vec3 v)
{
vec2 uv = vec2(atan(v.z, v.x), asin(v.y));
@@ -31,8 +22,8 @@ void main()
vec2 uv = SampleSphericalMap(normalize(fragPosition));
// Fetch color from texture map
vec3 color = texture(equirectangularMap, uv).rgb;
vec3 color = texture2D(equirectangularMap, uv).rgb;
// Calculate final fragment color
finalColor = vec4(color, 1.0);
gl_FragColor = vec4(color, 1.0);
}

View File

@@ -1,22 +1,14 @@
/*******************************************************************************************
*
* rPBR [shader] - Equirectangular to cubemap vertex shader
*
* Copyright (c) 2017 Victor Fisac
*
**********************************************************************************************/
#version 330
#version 100
// Input vertex attributes
in vec3 vertexPosition;
attribute vec3 vertexPosition;
// Input uniform values
uniform mat4 projection;
uniform mat4 view;
// Output vertex attributes (to fragment shader)
out vec3 fragPosition;
varying vec3 fragPosition;
void main()
{

View File

@@ -1,58 +0,0 @@
/*******************************************************************************************
*
* rPBR [shader] - Irradiance cubemap fragment shader
*
* Copyright (c) 2017 Victor Fisac
*
**********************************************************************************************/
#version 330
// Input vertex attributes (from vertex shader)
in vec3 fragPosition;
// Input uniform values
uniform samplerCube environmentMap;
// Constant values
const float PI = 3.14159265359f;
// Output fragment color
out vec4 finalColor;
void main()
{
// The sample direction equals the hemisphere's orientation
vec3 normal = normalize(fragPosition);
vec3 irradiance = vec3(0.0);
vec3 up = vec3(0.0, 1.0, 0.0);
vec3 right = cross(up, normal);
up = cross(normal, right);
float sampleDelta = 0.025f;
float nrSamples = 0.0f;
for (float phi = 0.0; phi < 2.0*PI; phi += sampleDelta)
{
for (float theta = 0.0; theta < 0.5*PI; theta += sampleDelta)
{
// Spherical to cartesian (in tangent space)
vec3 tangentSample = vec3(sin(theta)*cos(phi), sin(theta)*sin(phi), cos(theta));
// tangent space to world
vec3 sampleVec = tangentSample.x*right + tangentSample.y*up + tangentSample.z*normal;
// Fetch color from environment cubemap
irradiance += texture(environmentMap, sampleVec).rgb*cos(theta)*sin(theta);
nrSamples++;
}
}
// Calculate irradiance average value from samples
irradiance = PI*irradiance*(1.0/float(nrSamples));
// Calculate final fragment color
finalColor = vec4(irradiance, 1.0);
}

View File

@@ -1,298 +0,0 @@
/*******************************************************************************************
*
* rPBR [shader] - Physically based rendering fragment shader
*
* Copyright (c) 2017 Victor Fisac
*
**********************************************************************************************/
#version 330
#define MAX_REFLECTION_LOD 4.0
#define MAX_DEPTH_LAYER 20
#define MIN_DEPTH_LAYER 10
#define MAX_LIGHTS 4
#define LIGHT_DIRECTIONAL 0
#define LIGHT_POINT 1
struct MaterialProperty {
vec3 color;
int useSampler;
sampler2D sampler;
};
struct Light {
int enabled;
int type;
vec3 position;
vec3 target;
vec4 color;
};
// Input vertex attributes (from vertex shader)
in vec3 fragPosition;
in vec2 fragTexCoord;
in vec3 fragNormal;
in vec3 fragTangent;
in vec3 fragBinormal;
// Input material values
uniform MaterialProperty albedo;
uniform MaterialProperty normals;
uniform MaterialProperty metalness;
uniform MaterialProperty roughness;
uniform MaterialProperty occlusion;
uniform MaterialProperty emission;
uniform MaterialProperty height;
// Input uniform values
uniform samplerCube irradianceMap;
uniform samplerCube prefilterMap;
uniform sampler2D brdfLUT;
// Input lighting values
uniform Light lights[MAX_LIGHTS];
// Other uniform values
uniform int renderMode;
uniform vec3 viewPos;
vec2 texCoord;
// Constant values
const float PI = 3.14159265359;
// Output fragment color
out vec4 finalColor;
vec3 ComputeMaterialProperty(MaterialProperty property);
float DistributionGGX(vec3 N, vec3 H, float roughness);
float GeometrySchlickGGX(float NdotV, float roughness);
float GeometrySmith(vec3 N, vec3 V, vec3 L, float roughness);
vec3 fresnelSchlick(float cosTheta, vec3 F0);
vec3 fresnelSchlickRoughness(float cosTheta, vec3 F0, float roughness);
vec2 ParallaxMapping(vec2 texCoords, vec3 viewDir);
vec3 ComputeMaterialProperty(MaterialProperty property)
{
vec3 result = vec3(0.0, 0.0, 0.0);
if (property.useSampler == 1) result = texture(property.sampler, texCoord).rgb;
else result = property.color;
return result;
}
float DistributionGGX(vec3 N, vec3 H, float roughness)
{
float a = roughness*roughness;
float a2 = a*a;
float NdotH = max(dot(N, H), 0.0);
float NdotH2 = NdotH*NdotH;
float nom = a2;
float denom = (NdotH2*(a2 - 1.0) + 1.0);
denom = PI*denom*denom;
return nom/denom;
}
float GeometrySchlickGGX(float NdotV, float roughness)
{
float r = (roughness + 1.0);
float k = r*r/8.0;
float nom = NdotV;
float denom = NdotV*(1.0 - k) + k;
return nom/denom;
}
float GeometrySmith(vec3 N, vec3 V, vec3 L, float roughness)
{
float NdotV = max(dot(N, V), 0.0);
float NdotL = max(dot(N, L), 0.0);
float ggx2 = GeometrySchlickGGX(NdotV, roughness);
float ggx1 = GeometrySchlickGGX(NdotL, roughness);
return ggx1*ggx2;
}
vec3 fresnelSchlick(float cosTheta, vec3 F0)
{
return F0 + (1.0 - F0)*pow(1.0 - cosTheta, 5.0);
}
vec3 fresnelSchlickRoughness(float cosTheta, vec3 F0, float roughness)
{
return F0 + (max(vec3(1.0 - roughness), F0) - F0)*pow(1.0 - cosTheta, 5.0);
}
vec2 ParallaxMapping(vec2 texCoords, vec3 viewDir)
{
// Calculate the number of depth layers and calculate the size of each layer
float numLayers = mix(MAX_DEPTH_LAYER, MIN_DEPTH_LAYER, abs(dot(vec3(0.0, 0.0, 1.0), viewDir)));
float layerDepth = 1.0/numLayers;
// Calculate depth of current layer
float currentLayerDepth = 0.0;
// Calculate the amount to shift the texture coordinates per layer (from vector P)
// Note: height amount is stored in height material attribute color R channel (sampler use is independent)
vec2 P = viewDir.xy*height.color.r;
vec2 deltaTexCoords = P/numLayers;
// Store initial texture coordinates and depth values
vec2 currentTexCoords = texCoords;
float currentDepthMapValue = texture(height.sampler, currentTexCoords).r;
while (currentLayerDepth < currentDepthMapValue)
{
// Shift texture coordinates along direction of P
currentTexCoords -= deltaTexCoords;
// Get depth map value at current texture coordinates
currentDepthMapValue = texture(height.sampler, currentTexCoords).r;
// Get depth of next layer
currentLayerDepth += layerDepth;
}
// Get texture coordinates before collision (reverse operations)
vec2 prevTexCoords = currentTexCoords + deltaTexCoords;
// Get depth after and before collision for linear interpolation
float afterDepth = currentDepthMapValue - currentLayerDepth;
float beforeDepth = texture(height.sampler, prevTexCoords).r - currentLayerDepth + layerDepth;
// Interpolation of texture coordinates
float weight = afterDepth/(afterDepth - beforeDepth);
vec2 finalTexCoords = prevTexCoords*weight + currentTexCoords*(1.0 - weight);
return finalTexCoords;
}
void main()
{
// Calculate TBN and RM matrices
mat3 TBN = transpose(mat3(fragTangent, fragBinormal, fragNormal));
// Calculate lighting required attributes
vec3 normal = normalize(fragNormal);
vec3 view = normalize(viewPos - fragPosition);
vec3 refl = reflect(-view, normal);
// Check if parallax mapping is enabled and calculate texture coordinates to use based on height map
// NOTE: remember that 'texCoord' variable must be assigned before calling any ComputeMaterialProperty() function
if (height.useSampler == 1) texCoord = ParallaxMapping(fragTexCoord, view);
else texCoord = fragTexCoord; // Use default texture coordinates
// Fetch material values from texture sampler or color attributes
vec3 color = ComputeMaterialProperty(albedo);
vec3 metal = ComputeMaterialProperty(metalness);
vec3 rough = ComputeMaterialProperty(roughness);
vec3 emiss = ComputeMaterialProperty(emission);
vec3 ao = ComputeMaterialProperty(occlusion);
// Check if normal mapping is enabled
if (normals.useSampler == 1)
{
// Fetch normal map color and transform lighting values to tangent space
normal = ComputeMaterialProperty(normals);
normal = normalize(normal*2.0 - 1.0);
normal = normalize(normal*TBN);
// Convert tangent space normal to world space due to cubemap reflection calculations
refl = normalize(reflect(-view, normal));
}
// Calculate reflectance at normal incidence
vec3 F0 = vec3(0.04);
F0 = mix(F0, color, metal.r);
// Calculate lighting for all lights
vec3 Lo = vec3(0.0);
vec3 lightDot = vec3(0.0);
for (int i = 0; i < MAX_LIGHTS; i++)
{
if (lights[i].enabled == 1)
{
// Calculate per-light radiance
vec3 light = vec3(0.0);
vec3 radiance = lights[i].color.rgb;
if (lights[i].type == LIGHT_DIRECTIONAL) light = -normalize(lights[i].target - lights[i].position);
else if (lights[i].type == LIGHT_POINT)
{
light = normalize(lights[i].position - fragPosition);
float distance = length(lights[i].position - fragPosition);
float attenuation = 1.0/(distance*distance);
radiance *= attenuation;
}
// Cook-torrance BRDF
vec3 high = normalize(view + light);
float NDF = DistributionGGX(normal, high, rough.r);
float G = GeometrySmith(normal, view, light, rough.r);
vec3 F = fresnelSchlick(max(dot(high, view), 0.0), F0);
vec3 nominator = NDF*G*F;
float denominator = 4*max(dot(normal, view), 0.0)*max(dot(normal, light), 0.0) + 0.001;
vec3 brdf = nominator/denominator;
// Store to kS the fresnel value and calculate energy conservation
vec3 kS = F;
vec3 kD = vec3(1.0) - kS;
// Multiply kD by the inverse metalness such that only non-metals have diffuse lighting
kD *= 1.0 - metal.r;
// Scale light by dot product between normal and light direction
float NdotL = max(dot(normal, light), 0.0);
// Add to outgoing radiance Lo
// Note: BRDF is already multiplied by the Fresnel so it doesn't need to be multiplied again
Lo += (kD*color/PI + brdf)*radiance*NdotL*lights[i].color.a;
lightDot += radiance*NdotL + brdf*lights[i].color.a;
}
}
// Calculate ambient lighting using IBL
vec3 F = fresnelSchlickRoughness(max(dot(normal, view), 0.0), F0, rough.r);
vec3 kS = F;
vec3 kD = 1.0 - kS;
kD *= 1.0 - metal.r;
// Calculate indirect diffuse
vec3 irradiance = texture(irradianceMap, fragNormal).rgb;
vec3 diffuse = color*irradiance;
// Sample both the prefilter map and the BRDF lut and combine them together as per the Split-Sum approximation
vec3 prefilterColor = textureLod(prefilterMap, refl, rough.r*MAX_REFLECTION_LOD).rgb;
vec2 brdf = texture(brdfLUT, vec2(max(dot(normal, view), 0.0), rough.r)).rg;
vec3 reflection = prefilterColor*(F*brdf.x + brdf.y);
// Calculate final lighting
vec3 ambient = (kD*diffuse + reflection)*ao;
// Calculate fragment color based on render mode
vec3 fragmentColor = ambient + Lo + emiss; // Physically Based Rendering
if (renderMode == 1) fragmentColor = color; // Albedo
else if (renderMode == 2) fragmentColor = normal; // Normals
else if (renderMode == 3) fragmentColor = metal; // Metalness
else if (renderMode == 4) fragmentColor = rough; // Roughness
else if (renderMode == 5) fragmentColor = ao; // Ambient Occlusion
else if (renderMode == 6) fragmentColor = emiss; // Emission
else if (renderMode == 7) fragmentColor = lightDot; // Lighting
else if (renderMode == 8) fragmentColor = kS; // Fresnel
else if (renderMode == 9) fragmentColor = irradiance; // Irradiance
else if (renderMode == 10) fragmentColor = reflection; // Reflection
// Apply HDR tonemapping
fragmentColor = fragmentColor/(fragmentColor + vec3(1.0));
// Apply gamma correction
fragmentColor = pow(fragmentColor, vec3(1.0/2.2));
// Calculate final fragment color
finalColor = vec4(fragmentColor, 1.0);
}

View File

@@ -1,49 +0,0 @@
/*******************************************************************************************
*
* rPBR [shader] - Physically based rendering vertex shader
*
* Copyright (c) 2017 Victor Fisac
*
**********************************************************************************************/
#version 330
// Input vertex attributes
in vec3 vertexPosition;
in vec2 vertexTexCoord;
in vec3 vertexNormal;
in vec4 vertexTangent;
// Input uniform values
uniform mat4 mvp;
uniform mat4 matModel;
// Output vertex attributes (to fragment shader)
out vec3 fragPosition;
out vec2 fragTexCoord;
out vec3 fragNormal;
out vec3 fragTangent;
out vec3 fragBinormal;
void main()
{
// Calculate binormal from vertex normal and tangent
vec3 vertexBinormal = cross(vertexNormal, vec3(vertexTangent));
// Calculate fragment normal based on normal transformations
mat3 normalMatrix = transpose(inverse(mat3(matModel)));
// Calculate fragment position based on model transformations
fragPosition = vec3(matModel*vec4(vertexPosition, 1.0f));
// Send vertex attributes to fragment shader
fragTexCoord = vertexTexCoord;
fragNormal = normalize(normalMatrix*vertexNormal);
fragTangent = normalize(normalMatrix*vec3(vertexTangent));
fragTangent = normalize(fragTangent - dot(fragTangent, fragNormal)*fragNormal);
fragBinormal = normalize(normalMatrix*vertexBinormal);
fragBinormal = cross(fragNormal, fragTangent);
// Calculate final vertex position
gl_Position = mvp*vec4(vertexPosition, 1.0);
}

View File

@@ -1,120 +0,0 @@
/*******************************************************************************************
*
* rPBR [shader] - Prefiltered environment for reflections fragment shader
*
* Copyright (c) 2017 Victor Fisac
*
**********************************************************************************************/
#version 330
#define MAX_SAMPLES 1024u
#define CUBEMAP_RESOLUTION 1024.0
// Input vertex attributes (from vertex shader)
in vec3 fragPosition;
// Input uniform values
uniform samplerCube environmentMap;
uniform float roughness;
// Constant values
const float PI = 3.14159265359f;
// Output fragment color
out vec4 finalColor;
float DistributionGGX(vec3 N, vec3 H, float roughness);
float RadicalInverse_VdC(uint bits);
vec2 Hammersley(uint i, uint N);
vec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness);
float DistributionGGX(vec3 N, vec3 H, float roughness)
{
float a = roughness*roughness;
float a2 = a*a;
float NdotH = max(dot(N, H), 0.0);
float NdotH2 = NdotH*NdotH;
float nom = a2;
float denom = (NdotH2*(a2 - 1.0) + 1.0);
denom = PI*denom*denom;
return nom/denom;
}
float RadicalInverse_VdC(uint bits)
{
bits = (bits << 16u) | (bits >> 16u);
bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);
bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);
bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);
bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);
return float(bits) * 2.3283064365386963e-10; // / 0x100000000
}
vec2 Hammersley(uint i, uint N)
{
return vec2(float(i)/float(N), RadicalInverse_VdC(i));
}
vec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness)
{
float a = roughness*roughness;
float phi = 2.0 * PI * Xi.x;
float cosTheta = sqrt((1.0 - Xi.y)/(1.0 + (a*a - 1.0)*Xi.y));
float sinTheta = sqrt(1.0 - cosTheta*cosTheta);
// Transform from spherical coordinates to cartesian coordinates (halfway vector)
vec3 H = vec3(cos(phi)*sinTheta, sin(phi)*sinTheta, cosTheta);
// Transform from tangent space H vector to world space sample vector
vec3 up = ((abs(N.z) < 0.999) ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0));
vec3 tangent = normalize(cross(up, N));
vec3 bitangent = cross(N, tangent);
vec3 sampleVec = tangent*H.x + bitangent*H.y + N*H.z;
return normalize(sampleVec);
}
void main()
{
// Make the simplyfying assumption that V equals R equals the normal
vec3 N = normalize(fragPosition);
vec3 R = N;
vec3 V = R;
vec3 prefilteredColor = vec3(0.0);
float totalWeight = 0.0;
for (uint i = 0u; i < MAX_SAMPLES; i++)
{
// Generate a sample vector that's biased towards the preferred alignment direction (importance sampling)
vec2 Xi = Hammersley(i, MAX_SAMPLES);
vec3 H = ImportanceSampleGGX(Xi, N, roughness);
vec3 L = normalize(2.0*dot(V, H)*H - V);
float NdotL = max(dot(N, L), 0.0);
if(NdotL > 0.0)
{
// Sample from the environment's mip level based on roughness/pdf
float D = DistributionGGX(N, H, roughness);
float NdotH = max(dot(N, H), 0.0);
float HdotV = max(dot(H, V), 0.0);
float pdf = D*NdotH/(4.0*HdotV) + 0.0001;
float resolution = CUBEMAP_RESOLUTION;
float saTexel = 4.0*PI/(6.0*resolution*resolution);
float saSample = 1.0/(float(MAX_SAMPLES)*pdf + 0.0001);
float mipLevel = ((roughness == 0.0) ? 0.0 : 0.5*log2(saSample/saTexel));
prefilteredColor += textureLod(environmentMap, L, mipLevel).rgb*NdotL;
totalWeight += NdotL;
}
}
// Calculate prefilter average color
prefilteredColor = prefilteredColor/totalWeight;
// Calculate final fragment color
finalColor = vec4(prefilteredColor, 1.0);
}

View File

@@ -1,31 +1,28 @@
/*******************************************************************************************
*
* rPBR [shader] - Background skybox fragment shader
*
* Copyright (c) 2017 Victor Fisac
*
**********************************************************************************************/
#version 100
#version 330
precision mediump float;
// Input vertex attributes (from vertex shader)
in vec3 fragPosition;
varying vec3 fragPosition;
// Input uniform values
uniform samplerCube environmentMap;
// Output fragment color
out vec4 finalColor;
uniform bool vflipped;
void main()
{
// Fetch color from texture map
vec3 color = texture(environmentMap, fragPosition).rgb;
vec4 texelColor = vec4(0.0);
if (vflipped) texelColor = textureCube(environmentMap, vec3(fragPosition.x, -fragPosition.y, fragPosition.z));
else texelColor = textureCube(environmentMap, fragPosition);
vec3 color = vec3(texelColor.x, texelColor.y, texelColor.z);
// Apply gamma correction
color = color/(color + vec3(1.0));
color = pow(color, vec3(1.0/2.2));
// Calculate final fragment color
finalColor = vec4(color, 1.0);
gl_FragColor = vec4(color, 1.0);
}

View File

@@ -1,22 +1,14 @@
/*******************************************************************************************
*
* rPBR [shader] - Background skybox vertex shader
*
* Copyright (c) 2017 Victor Fisac
*
**********************************************************************************************/
#version 330
#version 100
// Input vertex attributes
in vec3 vertexPosition;
attribute vec3 vertexPosition;
// Input uniform values
uniform mat4 projection;
uniform mat4 view;
// Output vertex attributes (to fragment shader)
out vec3 fragPosition;
varying vec3 fragPosition;
void main()
{
@@ -28,5 +20,5 @@ void main()
vec4 clipPos = projection*rotView*vec4(vertexPosition, 1.0);
// Calculate final vertex position
gl_Position = clipPos.xyww;
gl_Position = clipPos.xyzw;
}

View File

@@ -1,11 +1,3 @@
/*******************************************************************************************
*
* rPBR [shader] - Equirectangular to cubemap fragment shader
*
* Copyright (c) 2017 Victor Fisac
*
**********************************************************************************************/
#version 330
// Input vertex attributes (from vertex shader)

Some files were not shown because too many files have changed in this diff Show More