summaryrefslogtreecommitdiffhomepage
path: root/src/models.c
AgeCommit message (Collapse)Author
2021-04-26REMOVED: GenMeshDefault()Ray
2021-04-20Update models.cRay
2021-04-20ADDED: UpdateMeshBuffer()Ray
2021-04-19use bone weights for animation (#1728)nathants
2021-04-18Remove trailing spacesRay
2021-04-13Reviewed DrawLine3D() limits #1721Ray
2021-04-13REVIEWED: DrawLine3D() #1721Ray
Increased batch limit check to compensate internal buffers alignment for lines drawing
2021-04-09Enable DRM platform cross compilation support (#1717)Jon
* Log a warning if chdir failed, use agnostic CHDIR instead of chdir * Only include libdrm directory explicitly when not cross compiling
2021-04-05REVIEWED: Model scale #1700raysan5
2021-04-02ADDED: GenMeshDefault() #1556raysan5
2021-04-01Remove trailing spacesraysan5
2021-03-31ADDED: Support model normal matrix location #1691raysan5
2021-03-31REVIEWED: DrawMeshInstanced() matrix computationsraysan5
Simplified some parts and reviewed for a correct computation of matrices, considering stereo render view/projection per eye transformations
2021-03-31RENAMED: example: shaders_mesh_instancingraysan5
shaders_rlgl_mesh_instanced -> shaders_mesh_instancing
2021-03-31Review code formattingraysan5
2021-03-28Review matrix multiplicationraysan5
2021-03-28REVIEWED: rlgl: Stereo render is working againraysan5
As a bonus, stereo render is compatible with mesh instancing now!
2021-03-27GetCollisionRayMesh makes use of triangle count (#1688)Carlos Hernandez Barbera
Co-authored-by: Carlos Hernandez Barbera <[email protected]>
2021-03-26REVIEWED: DrawMeshInstanced()Ray
2021-03-25REVIEWED: OpenGL 1.1 working againRay
2021-03-25WARNING: BREAKING: rlgl redesign -WIP-Ray
rlgl module has been completely redesigned to move Mesh/Material structures to [models] module. Still some work to do, broken elements: - [models] OpenGL 1.1 mesh rendering: DrawMesh() - [models] Mesh Instancing: DrawMeshInstanced() - [models] Stereo rendering: DrawMesh() - [models] GL_FLOAT, GL_UNSIGNED_INT exposed - [models] GenMeshCustom() - [rlgl] GenTexture*() functions removal?
2021-03-24REMOVED: DrawGizmo()Ray
This is a very simple and specific implementation that should be better addressed by the users
2021-03-22typecast warning fixes. (#1667)Jeffery Myers
Co-authored-by: Jeffery Myers <[email protected]>
2021-03-22Review latest PR and some formattingRay
2021-03-21REVIEWED: rlgl module #1523Ray
2021-03-21WARNING: BREAKING: rlgl module redesign -WIP-Ray
- Some rlgl functions have been moved to core - Some functions have been made internal to rlgl - rlgl functions prefixed with rl*()
2021-03-19Removed trailing spacesRay
2021-03-18REVIEWED: Material params #1649Ray
Just assigned a fixed memory size for custom Material parameters in case of being required, so we shouldn't worry about allocating/freeing them.
2021-03-18REVIEWED: DrawLine3D() #1643Ray
2021-03-14Implement UnloadModelAnimations (#1648)Hristo Stamenov
2021-03-14Improve gltf support (#1647)Hristo Stamenov
* Implement a load values from accessor function. Added some more value types for the different GLTF attributes. Fixed crash when loading animated triangle. * Split GLTF model loading into separate functions for readability. * Fixed the already working models that I broke when introducing GLTFReadValue. Improved the example for gltf models to be able to switch between a few models. * Removed license from screen. It is pu inside a license file anyway. * Small improvements on the naming of functions Removed (*model). and replaced it with model->
2021-03-14WARNING: VERY BREAKING CHANGE: Renamed some enum values for consistencyRay
Some enums values have been renamed to be more consistent and also provide a more detailed description: - ShaderLocationIndex: LOC_VERTEX_POSITION -> SHADER_SHADER_LOC_VERTEX_POSITION - ShaderUniformDataType: UNIFORM_VEC2 -> SHADER_UNIFORM_VEC2 - MaterialMapType: MAP_ALBEDO -> MATERIAL_MAP_ALBEDO - PixelFormat: UNCOMPRESSED_GRAYSCALE -> PIXELFORMAT_UNCOMPRESSED_GRAYSCALE
2021-03-09Gltf model and animations exploring problems (#1635)Hristo Stamenov
* Added bone binding to whole mesh and not only set vertices. + Also added missed setting of the animation count. + Removed double ; on one line * Added more of the gltf sample models https://github.com/KhronosGroup/glTF-Sample-Models We need to make it working for all of them. * Binding to initial bind pose added. * Fix cube disappearing bug because lerpPercent could be Inf. * Fixed for rigged figure also
2021-03-02Some misc tweaksRay
2021-03-02REVIEWED: rlUnloadMesh() #1615Ray
2021-02-24Patch up GLTF Skeleton loading (#1610)Chris Sinclair
* Add support for u8 bone indicies when loading glTF * Fix segfault for glTF animations not keyframed at 0 When loading glTF animations we lerp between keyframes, and previously assume that if the frame we are considering has a later keyframe, there must be a previous keyframe. This is not true if the animation's first keyframe is some time into the animation. In this case we now effectively clamp to that first keyframe for any time prior to it. * Respect parent bones tranform when loading glTF animations We previously assumed that when loading glTF animations, the bones were ordered with those higher up the skeleton tree (i.e. closer to the root) came first in the list of nodes. This may not be true, so now we repeatedly loop, preparing each level of the skeleton tree one after the other, starting at the root level. This ensures that any parent transforms are applied before transforming any child bones. We also ensure that we have forced the loading of animation data before attempting to interpolate to generate the animation frames for use later, without this no animations are applied. Finally we remove the check that assumed the first node in the nodes list is the root, and use an invalid index value as the sentinal value for when a node has no parent. Previously this was 0, which made distinguishing between root nodes and children of the first node impossible.
2021-02-21[models] Move vboId ALLOC/FREE to rlgl module #1603Ray
Actually, it seems more logical that rlgl takes care of OpenGL data than the models module... Also, models module loaded vertex data is unloaded by models module.
2021-02-20Fix warnings generated by Visual Studio 2019 in new model loading code. (#1600)Jeffery Myers
Co-authored-by: Jeffery Myers <[email protected]>
2021-02-16check to make sure parent bone is not null before trying to compute its ↵Jeffery Myers
offset from the root (#1594)
2021-02-09Review some warnings and formattingraysan5
2021-02-06REVIEWED: Replace GetImageData() by LoadImageColors()raysan5
2021-02-05REMOVED: MeshNormalsSmooth() #1421raysan5
Current implementation is probably wrong and it should be reimplemented from scratch, in the meantime, I prefer to remove the function.
2021-02-02Update loading of gltf animation. (#1561)hristo
This is to account for GLTF info being more like instructions on how to build your animation instead of verbose description of each pose.
2021-01-28Gltf animation support (#1551)hristo
* Added example for gltf animation and split some functions for loading model animations into IQM and GLTF similar to how models are being loaded. * Removed wrongly duplicated function * Bone loading for gltf model (not working at this point) * Loading info about vertex to joint connection but animation is still not working * Skeleton and pose is correctly loaded. Need to communicate about interpolation in GLTF * The model almost looks like a real person on animation. * Fixed model loading with bones. Also updated license info on the model. * Cleaned up some code and updated examples. * Fix identation issues * Fix identation issues * Fix identation issues
2021-01-22ADDED: UploadMesh() #1529Ray
Upload mesh data to GPU and get VAO/VBO identifiers
2021-01-03Removed a repeating allocation of memory (#1507)hristo
Resolves #1495 This line allocated some memory that was already allocated in the beginning of the function and was essentially creating a leak.
2021-01-02Update year to 2021raysan5
2020-12-31 Avoid dereferencing a null pointer in the 'LoadMaterials' function in the ↵Victor Gallet
models module (#1498)
2020-12-24Replace TABS by 4 spacesraysan5
2020-12-23Remove trailing spacesraysan5