Commit graph

263 commits

Author SHA1 Message Date
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
1ee6290fcf Replaced fabs() by fabsf() when required 2020-02-28 12:54:39 +01:00
Ray
c5d5d19443 Remove trail spaces 2020-02-26 20:23:55 +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
raysan5
131132f17d Minor tweaks 2020-02-10 10:56:48 +01:00
raysan5
becd3c3831 REVIEWED: GenMeshCylinder(), solved issue #1088 2020-02-09 21:04:03 +01:00
Ray
ea40bda88c Added func used in comments 2020-02-04 17:52:40 +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
c3f06b7470 Remove all trail spaces 2020-02-03 19:26:28 +01:00
Ray
cde26c743c Replace TraceLog() function by TRACELOG macro
Added SUPPORT_TRACELOG_DEBUG config
2020-02-03 19:13:24 +01:00
Ray
4992edab24 ADDED: DrawPoint3D() 2020-01-29 12:21:22 +01:00
Ray
c715cae18d Some tweaks 2020-01-28 16:40:12 +01:00
Ray
b02c6127a0 Minor tweaks 2020-01-26 13:27:37 +01:00
Ray
d41386d661 Minor tweaks to avoid warnings 2020-01-24 18:23:36 +01:00
Ray
d10ff78822 WARNING: Renamed Vector3Multiply() to Vector3Scale()
Renamed for consistency with Vecto2Scale()
Also renamed Vector3MultiplyV() to Vector3Multiply()
2020-01-23 21:10:12 +01:00
Victor Gallet
6a46dcb374 Fix compilation when the SUPPORT_MESH_GENERATION feature is not supported (previously, the loadModel function was using the GenMeshCube texture, if no model founded, to generate a default cube mesh (#1075) 2020-01-17 23:06:46 +01:00
raysan5
21c30f43d4 Update year to 2020 2020-01-05 20:01:54 +01:00
las3rlars
f8bd56b07f Normals was not correctly updated when using animated meshes (#1052)
* Normal vbo not correctly updated
2019-12-29 12:17:36 +01:00
Ray
1397242d88 Small code tweak to avoid warning 2019-12-11 23:14:32 +01:00
Ray
416a52b5bc Minor comments tweak 2019-12-01 12:55:33 +01:00
Ray
2783d0d63e DrawPoint3D(): PR review 2019-11-22 00:33:50 +01:00
Eric J
5d27c1e6c9 Add DrawPoint3D() function to models.c (#1019)
Uses fewer vertexes than using DrawCube() or DrawSphere() for points.  The small line is on analogy to the code for DrawPoint() in shapes.c.
2019-11-22 00:30:19 +01:00
João Coelho
75b0264f35 fix various problems, thanks CppCheck :) (#1005)
* explained a bit more the core_window_letterbox example

* fixed a few 'ups' moments that could lead to mild head pain and time loss
2019-10-29 15:57:19 +01:00
chriscamacho
3d8b1165a8 mem leak in gltf loader (#995) 2019-10-23 10:42:17 +02:00
Ray
9b6227688f Corrected issue #992 2019-10-22 23:31:04 +02:00
Ray
ea70c47a1a Review latest PR 2019-10-21 17:55:37 +02:00
Tyler Jessilynn Bezera
3f7fa6d6e7 Add multi texture support for materials in GLTF format (#979)
* Initial commit of addition for GLTF materials.. should support loading more than just albedo map.

* Clean up

* fixed seg faults and leaks

* temp don't overwrite defuse colour when rendering

* undid something dumb!

* correctly mixed diffuse map color when rendering to preserve not overwrite it
2019-10-21 17:38:23 +02:00
Michael Vetter
596338b26a Check whether parsing mtl file was succesful (#982) 2019-10-03 21:05:21 +02:00
Michael Vetter
eb772bc1e0 Check whether GLTF was loaded correctly (#981) 2019-10-03 17:07:32 +02:00
Ray
bdcb16e7bb Review PR and comments 2019-09-22 21:47:19 +02:00
Ray
741afde3bc Review PR formatting 2019-09-19 13:36:55 +02:00
chriscamacho
314c4061df fixs issue mem leak with LoadModel / OBJ and issue with -1 material index (#969) 2019-09-19 13:28:01 +02:00
chriscamacho
6916ff58b1 fixed some memory leaks, still issue with material index allocation leaking 4 bytes (possibly double allocation) (#964) 2019-09-13 13:29:52 +02:00
Ray
a2fd427224 Comment tweak 2019-09-12 16:26:37 +02:00
raysan5
37bb8e9554 UpdateModelAnimation() - Added security check 2019-08-27 12:23:30 +02:00
raysan5
8241dcf80b Review models loading, memory initialization 2019-08-27 11:16:43 +02:00
raysan5
c661cad692 Review all RL_CALLOC() calls
All data should be properly initialized by now
2019-08-27 10:56:49 +02:00
Ray
973d32f9a7 Reviewed issue #943 2019-08-19 12:17:02 +02:00
Oraoto
7ebcd06652 Fix uninitialized vboId in GenMeshHeightmap (#949) 2019-08-19 10:25:26 +02:00
raysan5
3ebc55fdfe Reviewed comment 2019-08-08 10:18:12 +02:00
chriscamacho
2d5cc5ddbf fixed xmloader bug, user must free model shaders and textures as they might be shared (#933) 2019-08-08 09:57:21 +02:00
Ray
3d5fa81bf2 WARNING: Redesigned structs
- Mesh, Shader, Material structs have been reviewed to minimize size when passed by value, all required code has been reviewed.
 - GetCollisionRayModel() reviewed to avoid pointer, not required because model is not modified inside the function
 - UnloadMesh() reviewed, pointer not required
 - CheckCollisionRay*() parameters name reviewed
2019-08-07 00:32:44 +02:00
Michael Vetter
6267fd1865 Fix memory leak in LoadGLTF() (#929)
Free texturePath in LoadGLTF()
2019-08-06 23:09:27 +02:00
culacant
f518c4e939 Fix loading multiple animations from .iqm file (#928)
* Fix loading multiple animations from .iqm file

* Fix memory leak in models_animation example

* Added export instructions to the animation example

* use raylib free

* include <stdlib.h> to appease the travis CI gods

* replace tabs with spaces
2019-08-06 23:08:58 +02:00
Leandro Gabriel
89c16baf18 Replace tabs with spaces and update year of copyright notices (#927)
* Update year of copyright notices

* Fix mistake in comment

* Fix typo ("algorythms")

* Replace tabs with spaces

* Remove trailing whitespace and fix mistake in comment

* Fix ExportImageAsCode missing comment rectangle corner

* Replace tab with spaces

* Replace tabs with spaces
2019-08-03 11:07:41 +02:00
raysan5
b83d165764 Replace tabs by spaces 2019-07-28 15:33:55 +02:00
Ray
4b2f6b2b5f Check buffer limit on DrawBillboardRec() 2019-07-22 00:12:51 +02:00
raysan5
f9a2d89ed2 Use function GetSizeBase64() 2019-07-12 14:33:06 +02:00
Ray
0c60af8981 Tweak: Change check order 2019-06-12 12:14:36 +02:00
Ray
9609ebf49a Corrected IQM function declaration 2019-06-12 12:12:59 +02:00