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
Wilhem Barbier
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
Wilhem Barbier
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
ProfJski
1655463ba5
Update models.c
2019-05-08 14:14:57 -04:00
ProfJski
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
Ray
e67ebabb02
Support custom memory management macros
...
Users can define their custom memory management macros.
NOTE: Most external libraries support custom macros in the same way, raylib should redefine those macros to raylib ones, to unify custom memory loading. That redefinition is only implemented as example for stb_image.h in [textures] module.
2019-04-23 14:55:35 +02:00
Ray
8c22f685d1
Check buffer overflow
2019-04-14 22:29:14 +02:00
Ray
45c820eeb4
Set default white texture for diffuse mat
2019-04-10 22:39:42 +02:00
Ray
21092266b5
Check textures available before loading
2019-04-10 00:44:24 +02:00
Ray
32ccecb8ca
Start working on glTF loading...
2019-04-09 13:23:51 +02:00
Ray
b8ada4b877
Review creation years
2019-04-08 12:25:13 +02:00
ChillerDragon
f21761fbbb
Happy new year 2019
2019-04-07 17:49:12 +02:00
Ray
c600dd0766
Review PBR shaders
...
Issue was related to vertex tangent attibutes not uploaded to GPU, a quick solution was implemented for new vertex attributes loading for already existing meshes... I don't like it specially but it will work for now.
2019-04-05 16:43:09 +02:00
Ray
92733d6695
BIG UPDATE: New models functions for animations!
...
Multiple functions added and some reviewed to adapt to the new multi-mesh, multi-material and animated models.
2019-04-05 13:15:56 +02:00
Ray
a103086443
Removed trail spaces
2019-04-04 13:50:52 +02:00
Ray
d89d24c5e8
BIG UPDATE: Support model animations!
2019-04-04 13:33:54 +02:00
Ray
f1cbdd6b3a
Corrected some issues
...
- Support compiling for OpenGL 1.1
- Free meshes/materials memory after usage...
2019-04-01 18:22:56 +02:00
Ray
86212e8462
Support material loading from OBJ/MTL
2019-04-01 12:41:32 +02:00
Ray
e5edbb7104
Reviewed OBJ loading implementation -WIP-
...
One mesh files can be loaded correctly
MISSING:
- Multimesh OBJ loading
- Materials loading
2019-04-01 12:17:29 +02:00
Ray
fe702cd6a2
Implementing LoadOBJ() -WIP-
...
It seems obj loading is working ok but there is some problem with drawing...
2019-04-01 00:16:56 +02:00
Ray
a197f40bb4
Default to white cube mesh if not loaded
2019-03-29 20:22:30 +01:00
Ray
19debd2b4e
Review some warnings
2019-03-29 17:28:10 +01:00
Ray
8a73c5d0b4
Replace custom OBJ/MTL implementations by tinyobj_loader -WIP-
2019-03-29 17:15:22 +01:00
Ray
a643dc4ca0
WARNING: Redesigned model struct for multi-meshes
...
This is quite a big change, Model struct has been redesigned to support multiple meshes and multiple materials, most 3d fileformats contain multiple meshes and reference multiple materials.
Consequently, multiple functions have been reviewed.
LoadOBJ(), LoadIQM(), LoadGLFT() now return a Model.
Current LoadOBJ() is not valid anymore, actually, tinyobj_loader_c library is considered for replacement.
2019-03-29 16:48:23 +01:00
Rafael Sachetto
9f54a69cec
Adding DrawCubeWiresV for convenience
2019-03-08 15:06:17 -03:00
Ray
374811c440
Change ternary operator formatting
2019-02-22 13:13:11 +01:00
Ray
641895b5ba
Remove end-line spaces
2019-02-21 18:45:19 +01:00
Ray
d62652c5b2
Update cgltf library
...
Added some comments to loader function...
2019-02-18 18:46:17 +01:00
Jens Pitkanen
f9963d4ed4
Fix config.h flags
2019-02-14 13:52:18 +02:00
Ray
d0d81ea545
Review ExportMesh() header
2019-02-06 10:51:06 +01:00
Ray
e13975beeb
Some security checks added
2019-01-11 18:54:48 +01:00
Ray
66c360d385
Corrected issue on plane drawing
2018-12-19 11:55:58 +01:00
Ray
f822650a3b
Support externally provided compilation flags
...
Useful in case raylib compilation want to be automated and compilation config flags provided by command line.
2018-12-18 00:20:08 +01:00
Ray
7d81e673ed
ADDED: GenMeshPoly()
...
To generate 2D polygonal shape
2018-12-15 23:31:56 +01:00
Ray
5ef4661216
Comments removed
2018-12-03 16:48:01 +01:00
Ray
ec5c9686b3
Improved data export capabilities!
...
REVIEWED: ExportImage()
REVIEWED: ExportMesh()
ADDED: ExportWave()
REMOVED: Internal funcs: SavePNG(), SaveBMP()
NOTE: These changes break the API (parameters order)
2018-09-17 16:56:02 +02:00
Ray
3a1a489545
Removed TABS
2018-09-14 13:00:48 +02:00
Ray
5b09630d45
Update mini_al to v0.8.8
...
Some minor tweaks around
2018-09-14 12:47:31 +02:00
F.H
9f1489dc1d
Update models.c
...
fix bug with GenMeshPlane() creating too many vertices/texcoords/normals for the plane mesh
2018-09-06 21:11:00 +02:00
Ray
1fcb3c0317
Started working on IQM/glTF loaders
2018-09-05 10:59:05 +02:00
Kim Kulling
ecf8bff4aa
Fix compiler warnings, first part
2018-08-04 10:32:16 +02:00
Ray
0148432588
fabsf() not working with TCC
...
Replaced by fabs() that seem to work ok
2018-05-28 00:48:45 +02:00
Ray
2aae62cea2
Header tweak and comments
2018-05-17 00:04:36 +02:00
raysan5
400c345f96
Added tangent computation alternative method
...
As stated in the note, I'm not sure if math is right, just followed a
reference implementation...
2018-04-30 11:21:44 +02:00
raysan5
23e335d933
Implemented MeshTangents()
...
- Added Vector3OrthoNormalize() to raymath.h - not sure if it is correct
- Implemented MeshBinormals() - Mesh struct has not a place for them...
- Updated model_material_pbr example - tested but not working on my GPU
(old Intel HD), actually, it never worked on it...
2018-04-30 02:47:48 +02:00
Ray
847bdaf682
Implemented default mesh
...
In case mesh loading fails, a cube is generated instead!
2018-04-19 20:20:34 +02:00
Ray
cd616258c6
Merge pull request #522 from a3f/master
...
Refactor all #define SUPPORT_* into a config.h
2018-04-08 22:46:44 +02:00
Ahmad Fatoum
1841afad11
Refactor all #define SUPPORT_* into a config.h
...
That way, a user needs only to touch a single file to configure what
features raylib is built with.
Include guards are left out intentionally, because config.h should only
be included in source files, not headers.
Later on, config.h can also define the raylib version (#461 ).
2018-04-07 23:37:48 +02:00
lumaio teon
d2cc5b88df
Removed useless GetCollisionRayMesh and libraylib.a
2018-04-07 03:49:56 -04:00
lumaio teon
d003c23ecf
Added GetCollisionRayModel
2018-04-06 12:04:09 -04:00
Ray
6edf15b9f9
Added funtion: ExportMesh()
2018-04-04 12:00:54 +02:00
Ray
3e0de31424
Merge pull request #504 from Martinfx/master
...
Fix potential bugs from static analysis
2018-04-02 18:10:38 +02:00
raysan5
375adf86a6
Review math usage to reduce temp variables
2018-04-02 15:16:45 +02:00
maficccc@gmail.com
201007e426
Fix sscanf() without field limits can crash with huge input data
2018-04-02 13:30:20 +02:00
Ray
61e0e4b4f3
Complete review of raymath for API consistency
2018-03-16 13:47:01 +01:00
raysan5
fd5e457bb4
Correct issue with triangleCount
2018-03-11 10:41:49 +01:00
Ray
fd2adbe62d
Renamed CalculateBoundingBox() to MeshBoundingBox()
...
Renamed function for consistency with a possible Mesh manipulation functions (maybe added in a future). Naming follows Image*() manipulation functions.
2018-02-26 12:10:45 +01:00
Ray
a7207dc6d4
Removed tangents generation
...
It has no sense to be inside LoadOBJ(), mesh processing moved to own functions: MeshTangents() and MeshBinormals(). Not exposed to user yet.
2018-02-26 12:02:05 +01:00
Ray
077bef4286
Support 4 components mesh.tangent data
...
Added struct Vector4 for convenience
2018-02-24 12:31:32 +01:00
Ray
6d64327a87
Reviewed unloading model data
...
When UnloadModel() --> UnloadMaterial(), avoid unloading default shader (if used) and avoid unlaoding default texture (if used), that data is managed by raylib internally. The question is... should UnloadModel() also UnloadMaterial()?
2018-02-22 12:39:17 +01:00
raysan5
e7cf03b1e4
Minor tweaks
2017-12-28 19:27:02 +01:00
Ray San
00c34a035c
Updated copyright year
2017-12-20 12:37:08 +01:00
Ray San
86df9168e7
Updated raylib VS2015 project
2017-10-19 14:14:18 +02:00
raysan5
20968830c0
Added mesh generation functions
2017-09-18 00:59:22 +02:00
Ray
fb334e2fd1
Testing shapes generation using additional library
2017-09-02 17:42:22 +02:00
raysan5
eeca607506
Review transforms to match OpenGL 1.1
2017-08-04 18:34:51 +02:00
raysan5
c764b3d03e
Some tweaks
2017-07-25 18:10:07 +02:00
raysan5
a766e2c480
Updated Vector math to new naming
2017-07-22 22:15:50 +02:00
raysan5
00d2768bc9
Corrected bug on MatrixPerspective()
...
Some other tweaks...
2017-07-22 10:35:49 +02:00
raysan5
c6cd07c373
Some tweaks raymath related
2017-07-21 17:46:44 +02:00
raysan5
e52032f646
Complete review of raymath
...
Now it should be coherent with OpenGL math standards
2017-07-21 17:19:28 +02:00
raysan5
2679c4ae9b
Review mesh loading and textures generation
2017-07-21 09:34:09 +02:00
raysan5
4c06725461
Removed useless functions
...
SetMaterialTexture() and UnsetMaterialTexture()... too shader
dependant...
2017-07-20 14:27:17 +02:00
raysan5
52cd5c6324
Corrected some issues
...
Corrected compilation for OpenGL 1.1
Review mesh data uploading to GPU
2017-07-20 12:26:25 +02:00
raysan5
76c6f0b1e6
Working on PBR system
...
Moved PBR material loading to example, right decision?
2017-07-19 18:55:32 +02:00
raysan5
d368403a13
Working on PBR materials, renamed some data
2017-07-19 10:09:34 +02:00