Skip to content

Add Gltf ModelTemplate#207

Merged
fabmax merged 9 commits intokool-engine:mainfrom
dragbone:gltf-model-template
May 8, 2026
Merged

Add Gltf ModelTemplate#207
fabmax merged 9 commits intokool-engine:mainfrom
dragbone:gltf-model-template

Conversation

@dragbone
Copy link
Copy Markdown
Contributor

Summary:

  • Add release checks and bool to enabled/disable releasing of geometry to Mesh
  • Move Model generation from GltfFile to new ModelTemplate
  • Cache geometry and shader in ModelTemplate

Note: Mesh hasn't checked if its geometry has been released until now. The added release checks in Mesh will probably break some cases that "worked" with async rendering but would probably have failed on non-async backends.

Comment thread kool-core/src/commonMain/kotlin/de/fabmax/kool/scene/Mesh.kt Outdated
return ModelGenerator().makeModel(cfg)
}

private inner class ModelGenerator {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume not much else has changed here apart from the Mesh.releaseGeometry flag?

It's a bit hard to see because it's shown as new code due to the move (but moving is fine)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There shouldn't be any other changes, I'll try to create a diff of the moved code with the current main branch to ensure there aren't any changes I have missed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were more changes than I remembered. I created a commit which shows a partial diff to the main branch:
dragbone@8a45384

@dragbone dragbone marked this pull request as ready for review May 8, 2026 17:48
@dragbone dragbone requested a review from fabmax May 8, 2026 17:51
@fabmax fabmax merged commit ffac2d6 into kool-engine:main May 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants