| Age | Commit message (Collapse) | Author |
|
|
|
Added comments for the future
|
|
|
|
Note that all meshes are loaded as a single one at this moment, loading should be improved!
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
Multiple functions added and some reviewed to adapt to the new multi-mesh, multi-material and animated models.
|
|
|
|
|
|
- Support compiling for OpenGL 1.1
- Free meshes/materials memory after usage...
|
|
|
|
One mesh files can be loaded correctly
MISSING:
- Multimesh OBJ loading
- Materials loading
|
|
It seems obj loading is working ok but there is some problem with drawing...
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
Added some comments to loader function...
|
|
|
|
|
|
|
|
|
|
Useful in case raylib compilation want to be automated and compilation config flags provided by command line.
|
|
To generate 2D polygonal shape
|
|
|
|
REVIEWED: ExportImage()
REVIEWED: ExportMesh()
ADDED: ExportWave()
REMOVED: Internal funcs: SavePNG(), SaveBMP()
NOTE: These changes break the API (parameters order)
|
|
|
|
Some minor tweaks around
|
|
fix bug with GenMeshPlane() creating too many vertices/texcoords/normals for the plane mesh
|
|
|
|
|
|
Replaced by fabs() that seem to work ok
|
|
|
|
As stated in the note, I'm not sure if math is right, just followed a
reference implementation...
|
|
- 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...
|
|
In case mesh loading fails, a cube is generated instead!
|
|
Refactor all #define SUPPORT_* into a config.h
|