Commit Graph

5289 Commits

Author SHA1 Message Date
raysan5
8722ff7043 REVIEWED: RLGL.State.vertexCounter (See detailed comment)
`RLGL.State.vertexCounter` is a generic counter and it's reused for all `rlRenderBatch`, actually, once render batch is filled, required vertex count is provided through the draw calls, so, the total accumulated count of vertices is not directly registered inside the rlRenderBatch.

`RLGL.State.vertexCounter` keeps that count but one possible improvement(?) could be moving the `vertexCounter` inside `rlRenderBatch` to always keep a register of the total accumulated vertices in that batch (despite that info is provided by the accumulated `draws[i].vertexCount`.

Simplifying, `RLGL.State.vertexCounter = SUM(draws[i].vertexCount)`

The decision to move the counter out of `rlVertexBuffer` is to keep only the data that I think should belong to `rlVertexBuffer` and make it more generic, aligned with raylib `Mesh` structure.

The decision to not add it to `rlRenderBatch` is because it could contain multiple `rlVertexBuffer` and it would be confusing (because it would only register the count of the last filled one).
2021-10-06 11:44:57 +02:00
Ray
8d7f97ee04 Remove trailing spaces 2021-10-06 01:20:46 +02:00
Ray
9a4fb25285 REDESIGNED: Simplify vertex data recording
Instead of registering vertex texcoords and colors on every call, we keep the last defined value and we record everything on `glVertex*()`. Actually that behavior is aligned with OpenGL 1.1 standard.
2021-10-06 01:17:20 +02:00
raysan5
7439c7547b Review functions specifiers 2021-10-05 19:20:21 +02:00
raysan5
c8b16d72e2 Merge branch 'master' of https://github.com/raysan5/raylib 2021-10-05 18:33:53 +02:00
raysan5
b972b8d324 REVIEWED: API functions specifiers 2021-10-05 18:33:41 +02:00
AKDev
67de7c4483
added nelua-raylib and removed raylib-nelua (#2033)
removed raylib-nelua because it's the same as nelua-raylib but with some significant improvements 😸
2021-10-05 16:44:33 +02:00
Ray
9f4a839853
Update CHANGELOG 2021-10-04 10:44:32 +02:00
mausimus
6541895901
Revert "reset resizedLastFrame on web platform (#2020)" (#2032) 2021-10-04 09:47:41 +02:00
tomarigr
5d8c477d12
[rcore] fix rpi4 Failed to get DRM resources (#2031)
* [rcore] fix rpi4 Failed to get DRM resources

card1 is not always the the correct card to use on rpi4
rpi os finds the correct card and links it to /dev/dri/by-path/platform-gpu-card during boot.
this fix makes sure that we always point to the correct card on rpi4

* Update rcore.c
2021-10-04 01:59:59 +02:00
Ray
79f36799e7 REVIEWED: Avoid raymath dependency
Still, it depends on Matrix type... rcamera module should be completely reviewed...
2021-10-03 14:08:21 +02:00
Ray
369cb0a3c5 Format tweak 2021-10-03 13:51:53 +02:00
Ray
9b3d74db6b ADDED: GetImageColor() #2024 2021-10-03 12:55:52 +02:00
Ray
92417c4485 Update raylib.h 2021-10-03 12:33:40 +02:00
Ray
22345ff62a Minor format tweak 2021-10-03 12:17:15 +02:00
SAOMDVN
3fc4a4c974
Added DrawLineBezierCubic() (#2021)
Co-authored-by: SAOMDVN <saomdvn@users.noreply.github.com>
2021-10-03 12:15:56 +02:00
Ray
03a88678da Update core_basic_window.c 2021-10-03 12:14:31 +02:00
Dennis E. Hamilton
f60e0e6c94
Tidying the core_basic_window.c in projects/scripts (#2025)
* Match build-windows.bat changes

The location for manual setting of the vcvarsall.bat location moved to line 38 in the latest change.

* Update flags for clean x64/x86 building

std:c11 is required for initialization features used in raylib.  UTF-8 for consistency in contemporary systems.  /W3 gets rid of puzzling slack byte and linker in-lining warnings.  /sdl for some insecure library usages in the user code that beginners should learn about early.

* 2021-10-01 core_basic_windows.c adjustment

 1. The press F6 message and the placement of the compiled executable statement are incorrect for the scripts case.
 2. <raylib.h> because "raylib.h" is meaningful only when compiling inside raylib/src/ folder.
 3. main(void) to get rid of a novice-confusing warning.
2021-10-03 12:13:46 +02:00
Laurentino Luna
9fce26bb06
Supress most warnings on rmodels.c (#2029)
* Supress most warnings on rmodels.c

NOTE: unused symbols have been deleted and the following report will show in what location they were previously.

Unused symbols:
- ArrayInt - vox_loader.h: line 84
- initArrayInt - vox_loader.h: line 168
- insertArrayInt - vox_loader.h: line 175
- freeArrayInt - vox_loader.h: line 186
- offsetX, offsetY, offsetZ - vox_loader.h: line 610
- chunkTotalChildSize - vox_loader.h: line 623

Other warnings:
- initialization discards 'const' qualifier - vox_loader.h: line 572
- incompatible types for VoxVector3 and Vector3 - rmodels.c: line 5748
- incompatible types for VoxColor and Color - rmodels: line 5749

* Remove ToVector3 and ToColor functions and assign values directly
2021-10-03 12:11:20 +02:00
Ray
f869229b7f Minor format tweaks 2021-10-03 12:09:59 +02:00
Ray
239c37246a WARNING: REVIEWED: Follow a set of conventions
CONVENTIONS:
  - Functions are always self-contained, no function use another raymath function inside, required code is directly re-implemented inside
  - Functions input parameters are always received by value
  - Functions use always a "result" variable for return
  - Functions are always defined inline
  - Angles are always in radians (DEG2RAD/RAD2DEG macros provided for convenience)
2021-10-03 11:44:59 +02:00
Chris
9882796df0
Rename BRDG typo to BDRF (#2028) 2021-10-02 14:07:42 +02:00
Dennis E. Hamilton
e34c0911f9
Cleanup x64/x86 options in scripts/build-windows.bat (#2023)
* Match build-windows.bat changes

The location for manual setting of the vcvarsall.bat location moved to line 38 in the latest change.

* Update flags for clean x64/x86 building

std:c11 is required for initialization features used in raylib.  UTF-8 for consistency in contemporary systems.  /W3 gets rid of puzzling slack byte and linker in-lining warnings.  /sdl for some insecure library usages in the user code that beginners should learn about early.
2021-09-30 22:29:35 +02:00
mausimus
93efa565f9
reset resizedLastFrame on web platform (#2020) 2021-09-29 23:27:10 +02:00
mausimus
dfbb134bfe
RLGL: restore draw batch state after limit check (#2018) 2021-09-29 23:26:29 +02:00
Vadim Boev
92f6290dbb
Build Android App with Visual Studio 2019 (#2013)
* Add support Android build for Visual Studio

* Delete projects/VS2019-Android/raylib_android/ARM64/Debug directory

* Delete projects/VS2019-Android/raylib_android/raylib_android/raylib_android.NativeActivity/ARM64/Debug directory

* Delete projects/VS2019-Android/raylib_android/raylib_android/raylib_android.Packaging/ARM64/Debug directory

* Delete projects/VS2019-Android/raylib_android/raylib_android/raylib_android.Packaging/ARM/Debug directory

* Delete projects/VS2019-Android directory

* Build Android App with Visual Studio 2019
2021-09-27 17:57:06 +02:00
Ray
2474d50dba
Update raylib.h 2021-09-27 17:52:15 +02:00
Ray
e40ece55d5
Update raylib.h 2021-09-27 17:51:57 +02:00
raysan5
18c92b3104 ADDED: Vector3Angle() 2021-09-27 13:57:06 +02:00
raysan5
dd7d65a6b4 Remove tabs 2021-09-27 13:55:45 +02:00
Tommi Sinivuo
206e1def6f
Add Zig build file (#2014)
The build file builds Raylib as a static library for either
Windows or Linux.
2021-09-25 19:24:48 +02:00
Tristan Schulz
b7063ab879
[models] Animation System Fix Part 1 (#2009)
* Fixed gltf missing transforms on load

mend

* extracted Matrix calculation in to static method and added skinning check

* fixed formatting

* Fixed write to access to nullptr when animation has no normals

* Refactored UpdateModelAnimation to only update changed vertices when needed (allows for multi animation playing)

* add check for models that were missed during BindGLTFPrimitiveToBones to not segfault the program

* fixed id mismatch between animation and model

* draft on fixing the mesh to skin mapping

* dont look at this

* removing debug info
2021-09-23 21:06:51 +02:00
raysan5
10d7718011 UPDATED: raylib resource files 2021-09-23 20:53:31 +02:00
raysan5
ddc1fdf6d5 REVIEWED: SeekMusicStream() formating 2021-09-23 18:11:24 +02:00
Uneven Prankster
7fa521fae4
Fix + Return if attempting to seek on a module format (#2008) 2021-09-23 17:38:37 +02:00
Ray
08ea5e419e REVIEWED: LoadImageAnim() #2005 2021-09-23 00:23:57 +02:00
Ray
00a763ea44 Reviewed some TODO comments 2021-09-23 00:18:47 +02:00
Laurentino Luna
dcd289d931
Modify TODO to NOTE on Makefile (#2007)
'# TODO: see 'install' target.' should be a note rather than something
to do.
2021-09-22 23:49:11 +02:00
Timon de Groot
025246620f
Add function DrawCubeTextureRec (#2001)
* Add function DrawCubeTextureRec

* Add EOF newline

* Remove unneeded example
2021-09-22 21:56:38 +02:00
Uneven Prankster
19ef765382
SeekMusicStream initial implementation (#2006) 2021-09-22 21:55:13 +02:00
Ryan Roden-Corrent
9607ea5c0a
Use unsigned int for animation count. (#2002)
LoadModelAnimations takes an `int` for the animation count parameter.
The animation count should never be negative, so it makes sense to
specify it as unsigned in the API. This matches the API for
UnloadModelAnimations, which expects an unsigned int. Both GLTF and IQMM
also store the animation count internally as unsigned, and we were
casting to a signed int for no reason.

GLTF actually uses `size_t` internally, so we're technically risking
overflow, but having 2^32 animations seems unlikely.
2021-09-22 13:04:10 +02:00
Ray
8a434b4fd4 Update rmodels.c 2021-09-22 13:02:44 +02:00
Ray
0e037555fe Update raylib.h 2021-09-22 12:59:40 +02:00
Ray
de173a93c8 Update rmodels.c 2021-09-22 12:19:25 +02:00
Ray
37c047eabc Update rmodels.c 2021-09-22 11:28:52 +02:00
Ray
c1432386a5 Update Makefile 2021-09-22 11:13:10 +02:00
Conifer
b5f281bacd
Update BINDINGS.md (#2003)
Update the link to new and better Swift binding to Raylib by STREGAsGate
2021-09-22 10:11:44 +02:00
Ray
23b827b66c
Update macos.yml 2021-09-22 00:57:42 +02:00
Ray
d851208413
Update linux.yml 2021-09-22 00:56:58 +02:00
Ray
3caa15e696
Update webassembly.yml 2021-09-22 00:55:46 +02:00