-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Allow using RenderPlugin
and WinitPlugin
with WindowPlugin
being disabled
#19042
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…`CameraDriverNode`
Generally pretty reasonable idea. Can you explain your use case here? I assume this is for headless testing or something? |
I was trying to make a test for programatic detection of the memory leaks when using |
@alice-i-cecile the test for render asset leak detection is up |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally a few issues here with this approach even if one does want to use headless rendering, but I'm not sure this makes sense overall. I'm not opposed to more decoupling, but bevy_window
barely adds any behavior in the first place as is intended to serve as an interface for bevy_winit
. Further, even in the headless scenario, there may be instances where the user wants to mock input. Using events is a form of decoupling already and it seems relatively harmless to register them even if a window is not being created. In addition to adding a lot of cruft in terms of guards, I'm not sure the juice is worth the squeeze here.
@alice-i-cecile what happened? |
@tychedelia i think i have fixed the 3 complaints that you raised, and created a test that takes a screenshot through a headless app but the image still comes out completely black, so there must be somewhere else that i went to hard that still needs proper treatment |
sometimes my reading skills are just... so you mean to just do |
I'm a little bit skeptical of the value of this use case after @tychedelia's comments. Sorry for not being more communicative: feel free to reopen and argue your case. |
I've tried again without disabling Window plugin and got it to work, and now I don't remember what block I hit to lead me into going into this track |
Objective
Allow using
RenderPlugin
andWinitPlugin
on apps that haveWindowPlugin
disabled.Solution
Create guards for systems and methods that rely on resources inserted by
WindowPlugin
.Testing
Doing experiments for #19311