gltf loader: add a temporary loader without compression support#9426
Closed
mockersf wants to merge 1 commit intobevyengine:mainfrom
Closed
gltf loader: add a temporary loader without compression support#9426mockersf wants to merge 1 commit intobevyengine:mainfrom
mockersf wants to merge 1 commit intobevyengine:mainfrom
Conversation
alice-i-cecile
approved these changes
Aug 12, 2023
Shatur
reviewed
Aug 12, 2023
|
|
||
| None => CompressedImageFormats::NONE, | ||
| }; | ||
| // Overwrite the gltf loader with support for compressed formats. |
Contributor
There was a problem hiding this comment.
Maybe use if let above and insert only if GPU is found?
nicopap
approved these changes
Aug 13, 2023
nicopap
reviewed
Aug 13, 2023
Contributor
nicopap
left a comment
There was a problem hiding this comment.
It's still a footgun. Suppose someone loads a compressed format in FromWorld?
Member
|
Closing in favor of #9429 |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Aug 14, 2023
# Objective - When loading gltf files during app creation (for example using a FromWorld impl and adding that as a resource), no loader was found. - As the gltf loader can load compressed formats, it needs to know what the GPU supports so it's not available at app creation time. ## Solution alternative to #9426 - add functionality to preregister the loader. loading assets with matching extensions will block until a real loader is registered. - preregister "gltf" and "glb". - prereigster image formats. the way this is set up, if a set of extensions are all registered with a single preregistration call, then later a loader is added that matches some of the extensions, assets using the remaining extensions will then fail. i think that should work well for image formats that we don't know are supported until later.
cart
pushed a commit
that referenced
this pull request
Aug 14, 2023
# Objective - When loading gltf files during app creation (for example using a FromWorld impl and adding that as a resource), no loader was found. - As the gltf loader can load compressed formats, it needs to know what the GPU supports so it's not available at app creation time. ## Solution alternative to #9426 - add functionality to preregister the loader. loading assets with matching extensions will block until a real loader is registered. - preregister "gltf" and "glb". - prereigster image formats. the way this is set up, if a set of extensions are all registered with a single preregistration call, then later a loader is added that matches some of the extensions, assets using the remaining extensions will then fail. i think that should work well for image formats that we don't know are supported until later.
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.
Objective
FromWorldimpl and adding that as a resource), no loader was found.Solution