Commit Graph

189 Commits

Author SHA1 Message Date
raysan5 ef858b0dbb Review examples 2021-10-14 13:37:22 +02:00
raysan5 51b147cd32 Update models_loading_vox.c 2021-10-13 21:08:58 +02:00
raysan5 f9d4601057 Create LICENSE 2021-10-12 21:26:41 +02:00
raysan5 f1659d78d3 Reviewed models examples paths 2021-10-12 21:01:49 +02:00
raysan5 d92531b81d Rename examples for consistency 2021-10-12 20:23:59 +02:00
raysan5 670eab8b17 Review comments 2021-10-12 20:23:46 +02:00
raysan5 599d6e810f REVIEWED: models resources structure 2021-10-12 12:47:50 +02:00
raysan5 75b5cc0084 REMOVED: EXAMPLE: models_gltf_animation 2021-10-12 12:47:10 +02:00
raysan5 9a568654be REMOVED: EXAMPLE: models_material_pbr 2021-10-12 12:46:41 +02:00
Ray bb2763cc1f Update models_rlgl_solar_system.c 2021-10-07 16:08:39 +02:00
Ray f869229b7f Minor format tweaks 2021-10-03 12:09:59 +02:00
Chris 9882796df0 Rename BRDG typo to BDRF (#2028) 2021-10-02 14:07:42 +02:00
procfxgen a422d2fc8b Vox loaded (#1981)
* new models_magicavoxel_loading example

* Portable header-only file "magicavoxel_loader.h" for MagicaVoxel loader example.

* models_magicavoxel_loading example added to CMakeLists.txt and Makefile

* fix models_magicavoxel_loading example for linux.

* * vox_loader into "src/external/vox_loader.h"
 * vox file support for "models.c"
 * updated example "models/models_magicavoxel_loading.c"

* * Fix Vox_FreeArrays (removed memory leak)

* * removed magicavoxel_loader.h

* * Revert vs2019 solution

* * vox_loader.h -> Support custom memory allocators
* vox_loader.h -> Reverse Y<>Z for left to right handed system
* models/models_magicavoxel_loading.c -> fix model center

* * vox_loader.h -> Removed Raylib dependencies

* * Changed Vox_LoadFileName to Vox_LoadFromMemory
2021-09-10 15:24:01 +02:00
procfxgen dfc465ca6d new models_magicavoxel_loading example (#1940)
* new models_magicavoxel_loading example

* Portable header-only file "magicavoxel_loader.h" for MagicaVoxel loader example.

* models_magicavoxel_loading example added to CMakeLists.txt and Makefile

* fix models_magicavoxel_loading example for linux.

* * vox_loader into "src/external/vox_loader.h"
 * vox file support for "models.c"
 * updated example "models/models_magicavoxel_loading.c"

* * Fix Vox_FreeArrays (removed memory leak)

* * removed magicavoxel_loader.h

* * Revert vs2019 solution
2021-09-04 19:55:09 +02:00
Ray 3d33c559e7 REVIEWED: Examples compilation 2021-08-26 00:14:34 +02:00
raysan5 7013e60926 Update models_rlgl_solar_system.c 2021-07-31 18:44:07 +02:00
raysan5 aeb1a0da84 REVERTED: Removed the need for rlMatrix
Now rlgl uses the `Matrix` type, just make sure it has been previously defined somewhere... I don't like this approach but it's probably the easier one for the users... still looking for a better solution... maybe using something like
`#define MATRIX_TYPE`, so it can be checked in other modules.
2021-07-30 12:54:54 +02:00
raysan5 db4cfc9fbd Reviewed resources licenses 2021-07-16 16:10:35 +02:00
Hristo Stamenov 71700254b4 Major revamp gltf (#1849)
* Added my own model and license to Raylib exclusively created by me and provided for use in the examples (and other projects if anyone decides to)

* Use animation vertices on initial load if possible.

* Added girl model to model example

* Revamped GLTF model loading as it was wrong by default. Also updated some comments.

GLTF models were loaded only by mesh but they should be loaded recursively by hierarchical nodes because tehre are some static node transformations that are to be applied to the vertices. It also resulted in more meshes being included in some models.

It is the correct way of loading GLTF and what is suggested in the official examples.

Currenlty limiting to only one scene but more can be included later.

* Refactored the new names and structure of extracted functions.

* Safer and easier read value.

* Made reading easier for accessor->bufferView->buffer in GLTF.

Now there is no need to check for supported types or anything.

* Correct inclusion of limits.h in the cases of MSVC based compilers vs the world

* Removed weird example file
2021-06-26 13:22:00 +02:00
Ray e0720a0a55 WARNING: REVIEWED: Default shader uniform names
When a shader is loaded, by default, several locations are tried to be set automatically.
2021-06-25 13:35:43 +02:00
Ray 7203acdef9 Minor format tweaks 2021-06-23 09:59:11 +02:00
Ray 7e68e733f5 Update models_material_pbr.c 2021-06-03 21:04:23 +02:00
Ray 0565fb9fb6 Update models_mesh_picking.c 2021-06-03 20:58:04 +02:00
Ray 121c689b78 Review code formatting 2021-06-03 20:25:28 +02:00
Crydsch edeaff4bd4 Better collisions (#1803)
* review collisions ray-box and ray-sphere

* Applied raysan's refactor
Improved GetRayCollisionBox

* Replace GetRayCollisionGround with GetCollisionQuad

* Update example core_3d_picking

* Update example models_loading

* Fixed issues after merge

* remove debug stuff

Co-authored-by: Cry dsch <chris.obo@gmx.net>
2021-06-03 20:15:27 +02:00
Ray d39d26f275 Update models_loading.c 2021-05-31 18:36:03 +02:00
Ray 1c5de9721a WARNING: BREAKING: RENAMED: RayHitInfo to RayCollision #1781
- RENAMED: RayHitInfo to RayCollision
- RENAMED/REDESIGNED: Multiple Ray collision functions to be more consistent and return RayCollision data -WIP-
2021-05-31 11:41:56 +02:00
Hristo Stamenov 470574517a Implement vertex color attribute for GLTF and IQM (#1790)
Added a simple cube with vertex colors for testing both.
2021-05-26 20:23:13 +02:00
Ray 1c7c8c682c REVIEWED: models_skybox #1792 #1778 2021-05-26 20:21:37 +02:00
Ray b36422083e Remove headers from shaders 2021-05-22 16:09:34 +02:00
Ray e401d5c48e WARNING: RENAMED: MeshBoundingBox() -> GetMeshBoundingBox()
Renamed for consistency with other function in raylib.
2021-05-20 19:24:28 +02:00
Lambert Wang 2545f62565 Added support for additional mouse buttons (#1753)
* Added support for additional mouse buttons

* Renamed mouse button enum

Co-authored-by: Lambert Wang <lambert.ww@gmail.com>
2021-05-08 18:26:24 +02:00
Jeffery Myers b663724293 Generate a mesh in client code. (#1735) 2021-04-26 17:30:07 +02:00
Ray dcf52c132f Remove trail spaces 2021-04-22 18:55:24 +02:00
Ray 1161df0ee4 Added screenshots 2021-04-22 18:34:33 +02:00
raysan5 46650b5fb1 Reviewed skybox and pbr examples 2021-04-02 15:41:44 +02:00
raysan5 51f3129c5d Reviewed examples 2021-04-02 15:34:32 +02:00
raysan5 ccdf7ff335 REDESIGN: Move GenTexture*() functions to PBR example #721
Removed functions from rlgl module.
2021-04-02 14:29:33 +02:00
raysan5 8f3e91ae83 REVIEWED: models_gltf_model #1684 2021-03-28 20:15:57 +02:00
Ray c6828070dc Update models_yaw_pitch_roll.c 2021-03-26 00:11:48 +01:00
Ray 60bfee4a7d Added security check for render batch #1670 2021-03-23 23:45:14 +01:00
Jeffery Myers e48b9a6da1 [Examples] Warning fixes (pt 1) (#1668)
* Fix some warnings in examples.

* cleanups from review

Co-authored-by: Jeffery Myers <JefMyers@blizzard.com>
2021-03-23 07:51:52 +01:00
Ray 75882f3254 Delete Avocado.glb 2021-03-20 00:02:28 +01:00
Ray 442abaab72 Updated example assets 2021-03-19 22:39:39 +01:00
Ray be8d5a7ae2 RENAMED: camera.type -> camera.projection 2021-03-19 20:14:14 +01:00
Ray 07d82a91c5 WARNING: BREAKING: RENAMED: camera.type to camera.projection 2021-03-19 13:56:46 +01:00
Ray e5834210d3 Update models_skybox.c 2021-03-17 19:40:59 +01:00
Hristo Stamenov f9b79403d1 Improve gltf support (#1647)
* 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-14 12:09:31 +01:00
Ray 01e28263be WARNING: VERY BREAKING CHANGE: Renamed some enum values for consistency
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-14 11:05:51 +01:00
Hristo Stamenov 5c2983f510 Gltf model and animations exploring problems (#1635)
* 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-09 00:11:08 +01:00