Commit graph

303 commits

Author SHA1 Message Date
raysan5
0a9e080998 Remove trailing spaces 2020-12-23 15:03:26 +01:00
Ray
9097d0b4ef REVIEW: CheckCollisionSpheres() params naming 2020-12-19 20:05:32 +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
e69f2f0c26 REVIEWED: DrawGrid(), issue with buffer limits check #1417 2020-12-14 23:39:12 +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
Ray
d1119816d7 Review comment 2020-12-03 20:16:46 +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
Jeffery Myers
df249f5513
Fix typecast warnings in raylib code as reported by visual studio 2019 (#1443) 2020-11-30 08:14:11 +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
9471794449 Update to latest tiniobjloader
WARNING: OBJ loading is broken at this point...
2020-11-17 00:30:12 +01:00
raysan5
4d5ee7953c Updated tinyobjloader 2020-11-15 14:31:43 +01:00
Ray
3e1cd487df Remove trailing spaces 2020-11-03 23:47:33 +01: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
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
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
raysan5
8b5485f822 Remove unused variable 2020-08-30 20:00:56 +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
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
Ray
bd13d4a471 Add missing include 2020-06-23 00:33:51 +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
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
0bcb892975 REDESIGNED: LoadIQM(), LoadModelAnimations() to use mem buffers 2020-05-23 19:24:15 +02:00
raysan5
b3eea3d322 Avoid loading texcoords and normasl from model if not existent 2020-05-18 18:35:47 +02:00
raysan5
4ec40e720c GenMeshCubicmap() added comments and simplification 2020-05-11 17:54:23 +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
sikor666
db4a618c6f
Fix materials loading for IQM models (#1227) 2020-05-08 20:27:10 +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
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
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
4ca4326bf9 Review LoadGLTF() to read from memory buffer 2020-04-30 19:51:57 +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
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
raysan5
70ed975b99 [models] Review TRACELOG() messages, categorized 2020-03-27 17:43:51 +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
Ádám Dóda
584e2d664c
GenMeshHeightmap flat shading normals (#1140) 2020-03-24 13:27:49 +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
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