Multiple cgltf Nodes Import and Meshes, Skysphere#21
Open
TimeTravelerFromNow wants to merge 4 commits into
Open
Multiple cgltf Nodes Import and Meshes, Skysphere#21TimeTravelerFromNow wants to merge 4 commits into
TimeTravelerFromNow wants to merge 4 commits into
Conversation
|
Cool project! If you aren't you definitely should be using a sanitizer. It catches 95% of the dumb memory mistakes one might accidentally do. Otherwise it's mostly about using a debugger to track down when/where it happened. |
drm unsafe sky texture removed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request to gunslinger framework for this example
Multiple cgltf Nodes with base_color_texture Import, Skysphere matrix function
Introduces structs for mirroring the cgltf file format during an import into gs. The slot arrays in gs_gfxt_scene_t will be used to render each nodes' singular mesh.
vlc-record-2024-07-23-22h25m20s-2024-07-23.22-24-26.mp4-.mp4
Todos
gs/util/gs_gfxt.hthis is hardcoded withgs_gfxt_scene_new()). Not so greatgs_gfxt_pbr_free(gs_gfxt_pbr_t* pbr_info)to free unused texture data.Ambitions
Some sort of node management. Not sure how to go about this, but I intend to draw inspiration from this article:
Evolve Your Hierarchy: Mick West - Gamedev.net. It discusses problems with node graphs and suggests a component manager system instead. I think this could inspire a unique solution in gunslinger.
Tripping points
renderablesinitially when writing importing code but I was flailing trying to understand how to usegs_gfxt_raw_data_func_desc_ts. (Was trying to point meshes to materials with the handles and causes seg faults left and right). Settled on usinguint32_thandles to thegs_slot_array(gs_gfxt_material_t).gs_slot_map. Not sure if I was structuring data wrong, but I was getting issues with nearby memory getting overwritten. So for the new structs I usedgs_dyn_arrayfor textures andgs_slot_arrayfor custom structs and the problems went away.