The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

+2 votes

Context

I'm migrating from Godot 3 to Godot 4 and everything is going well, except one thing.

I used to add the command-line --no-window so that I didn't have any window.

Using --headless in Godot 4 doesn't show the window either, and that part is fine.

My issue

But the issue arises because I still want the rendering to be done.
Because I have a script that is passing the image (in _process(delta)) (using tree.root.get_viewport().get_texture().get_image()).

I tested and it works fine with the window.

But with --headless, the rendering server is now "Dummy", so I don't have any image.

What I tried

Also, I don't even get the _process(delta), or even the _physics_process(delta) callbacks.

I tried a few things, but it seems like you can't hide the main window (I might have lived with a glitch making the window show and hide after the splash screen, but I can't even do that).

I tried the solution from this post: https://godotengine.org/qa/141103/normal-rendering-without-game-window-for-ai-training?show=141103#q141103

But it doesn't work, because I don't even get the _physics_process(delta) callback, and I tried everywhere I could (for example _ready()), but then it didn't work because as I mentioned above, it says it can't render with the Dummy rendering server.

So I tried changing the rendering server, but any rendering server has a window.

So I guess my question is

Can I have a rendering server without a window in Godot 4?

Or it could be

Can I make the render of a viewport without the rendering server?
With a GDExtension perhaps?

Or it could (also) be

Can I make a custom rendering server that's exactly the same as Vulkan (for example), but just doesn't have a window?

Thanks

Godot version 4.0.0
in Engine by (14 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.