Commit Graph

305 Commits

Author SHA1 Message Date
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
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
21c30f43d4 Update year to 2020 2020-01-05 20:01:54 +01:00
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
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
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
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
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
596338b26a Check whether parsing mtl file was succesful (#982) 2019-10-03 21:05:21 +02:00
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
314c4061df fixs issue mem leak with LoadModel / OBJ and issue with -1 material index (#969) 2019-09-19 13:28:01 +02:00
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
37bb8e9554 UpdateModelAnimation() - Added security check 2019-08-27 12:23:30 +02:00
8241dcf80b Review models loading, memory initialization 2019-08-27 11:16:43 +02:00
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
7ebcd06652 Fix uninitialized vboId in GenMeshHeightmap (#949) 2019-08-19 10:25:26 +02:00
3ebc55fdfe Reviewed comment 2019-08-08 10:18:12 +02:00
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
6267fd1865 Fix memory leak in LoadGLTF() (#929)
Free texturePath in LoadGLTF()
2019-08-06 23:09:27 +02:00
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
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
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
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
13a1744ca9 Fix #848 2019-05-22 20:29:34 +02:00
Ray
371abb0a26 Review glTF implementation formatting
Added comments for the future
2019-05-20 11:13:38 +02:00
e01a381aec Load glTF 2019-05-18 11:36:47 +02:00
Ray
5a1a0a3492 Corrected issue with multi-mesh obj models
Note that all meshes are loaded as a single one at this moment, loading should be improved!
2019-05-15 15:12:56 +02:00
Ray
a2ed65aa14 Make code a bit clearer for beginners 2019-05-09 16:10:55 +02:00
Ray
46bac0ba2c Add comment in CheckCollisionSpheres() 2019-05-09 16:09:49 +02:00
1655463ba5 Update models.c 2019-05-08 14:14:57 -04:00
d3dae38449 Update CheckCollisionSpheres() to avoid sqrt
Square root calls are computationally expensive.  In this case, they can be avoided.  Instead of checking distance<RadA+RadB, check distance squared against (RadA+RadB) squared.  The dot product of Vector3Subtract(B,A) with itself gives distance squared, so I used this code instead of an element-by-element computation of distance squared.  The only downside is that your geometric code is very readable, whereas this is less so.
2019-05-08 13:54:12 -04:00