Commit graph

47 commits

Author SHA1 Message Date
Ray
90fc7c0376 WARNING: BREAKING: REMOVED: GetRayCollisionModel() #2405 2022-03-30 20:11:22 +02:00
Ray
0da7830745 REVIEWED: Avoid some float -> double promotions 2022-03-20 12:15:51 +01:00
raysan5
937e7b3dd9 REVIEWED: Some functions input parametes that should be const 2022-02-20 20:35:28 +01:00
Antonis Geralis
68bad6986d
make const (#2348)
* make const

* make const
2022-02-20 20:12:55 +01:00
raysan5
d4382f4a52 Removed trailing spaces 2022-02-18 20:30:46 +01:00
Antonis Geralis
963de06d08
follow style guide (#2346)
* follow style guide

* Update rmodels.c
2022-02-17 00:54:21 +01:00
Roy Qu
45ef46c5e8
fix: material color won't be loaded if there's no texture for that material (#2298) 2022-01-21 12:52:07 +01:00
raysan5
a940f41b4b Update year to 2022 2021-12-31 20:06:22 +01:00
Antonis Geralis
dcc0791502
check not null before accessing by index (#2243) 2021-12-24 19:54:25 +01:00
Ray
5499388a4c REVIEWED: GenMeshCylinder() #2225 2021-12-19 13:40:55 +01:00
raysan5
ef5be632fe REVIEWED: ExportMesh() #2220 2021-12-17 20:55:38 +01:00
Ray
48918ca5c6 REVIEWED: DrawMesh*() issue #2211 2021-12-16 00:19:41 +01:00
Ray
e637ad9d2a Support custom modules inclusion
Allow to choose which modules are compiled with raylib, if some modules are excluded from compilation, required functionality is not available but smaller builds are possible.
2021-12-04 19:56:02 +01:00
raysan5
ba8c73a327 Added some reference code to load bones id and weight data for animations 2021-12-02 20:48:12 +01:00
Ray
5a6aa52a7c REVIEWED: ExportMesh() #2138 2021-11-15 10:14:00 +01:00
Ray
72758de6ea Reviewed warnings 2021-10-26 22:26:28 +02:00
Jeffery Myers
086f76ba7a
Fix warnings in raylib build (#2084) 2021-10-25 10:18:42 +02:00
raysan5
62965aa6d7 Comments tweaks 2021-10-23 14:17:26 +02:00
raysan5
04a4efb591 Added some comments on LoadGLTF() 2021-10-23 14:00:05 +02:00
raysan5
c4f0e80895 REVIEWED: Size of bones id supported, max 255 bones per mesh 2021-10-23 13:59:20 +02:00
raysan5
ebee8ba3bb REVIEWED: LoadGLTF() #2075 2021-10-23 11:42:02 +02:00
raysan5
18db2c4f01 REVIEWED: LoadGLTF()
Reorganized code and added some feature and listed restrictions. Some gltf models do not work yet.
2021-10-22 21:27:11 +02:00
raysan5
ebad28d831 REVIEWED: gltf models loading, reverted to a previous version (with some tweaks) 2021-10-22 14:53:11 +02:00
raysan5
6ac3043e88 WARNING: REMOVED: glTF loading
Actually, it was broken and it that code has no maintainer.
2021-10-18 14:11:56 +02:00
raysan5
cf12992b6a Remove trailing spaces 2021-10-17 21:00:20 +02:00
raysan5
2a6bd973bd Review some comments 2021-10-14 15:38:50 +02:00
Ray
9ac5a96408 Update rmodels.c 2021-10-14 10:52:24 +02:00
Ray
8a5bc933de Starting to review glTF loading -WIP- 2021-10-14 10:43:29 +02:00
raysan5
a77afd5c8f Reviewed some MSVC warnings 2021-10-13 20:47:42 +02:00
raysan5
32c9d411b2 REVIEWED LoadVOX() -WIP-
It seems vox loader is not working properly...
2021-10-13 20:28:58 +02:00
raysan5
1350361f58 Reviewed formatting 2021-10-13 19:34:37 +02:00
Horrowind
e545286369
Fix issue with empty cylinder (#2050)
* Add DrawCylinderEx and DrawCylinderWiresEx

* Modify examples/models/models_geometric_shapes.c to show the
usage of DrawCylinder(Wires)Ex

* Simplified DrawCylinder and DrawCylinderWires to use the -Ex versions.

* This reverts commits f49b2598dd and
4542b32e4e.

* Fixed formatting.
Renamed base_angle to baseAngle.
Remove most of the raymath.h calls.

* Added check for empty cylinder.

* Added check for empty cylinder.

* Fix bug.

Co-authored-by: Horrowind <you@example.com>
2021-10-13 19:32:30 +02:00
raysan5
f1659d78d3 Reviewed models examples paths 2021-10-12 21:01:49 +02:00
Horrowind
526e68afa8
Add DrawCylinder(Wires)Ex (#2049)
* Add DrawCylinderEx and DrawCylinderWiresEx

* Modify examples/models/models_geometric_shapes.c to show the
usage of DrawCylinder(Wires)Ex

* Simplified DrawCylinder and DrawCylinderWires to use the -Ex versions.

* This reverts commits f49b2598dd and
4542b32e4e.

* Fixed formatting.
Renamed base_angle to baseAngle.
Remove most of the raymath.h calls.

Co-authored-by: Horrowind <you@example.com>
2021-10-12 19:36:06 +02:00
raysan5
4a1bd12e2d REVIEWED: DrawCubeTextureRec() formatting 2021-10-12 12:08:12 +02:00
raysan5
700d448d75 Updated external libraries 2021-10-06 21:13:17 +02:00
Ray
8d7f97ee04 Remove trailing spaces 2021-10-06 01:20: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
raysan5
dd7d65a6b4 Remove tabs 2021-09-27 13:55:45 +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
Ray
00a763ea44 Reviewed some TODO comments 2021-09-23 00:18:47 +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
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
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
99ab4d6cb8 WARNING: MODULES RENAMING!!!
raylib modules have been slightly renamed to add some identity and note that they are independent modules that can be used as standalone separate parts of raylib if required.

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

All the build systems has been adapted to this change.
2021-09-22 00:15:06 +02:00
Renamed from src/models.c (Browse further)