I'd like to use UrhoSharp to build a command-line tool that draws some stuff and saves the output to a PNG file.
I've figured out how to draw what I want in a window, and I can save it (after waiting for a couple of updates) with Graphics.TakeScreenshot
. But I'd prefer it to run without showing a window at all, so that I can use the tool in my build pipeline without windows popping up all the time.
I've also figured out that I can start the Urho engine in headless mode by adding AdditionalFlags = "-headless"
to my ApplicationOptions
. But I can't figure out how to trigger the 3D engine to run in this case, or where the output goes. It looks like the graphics subsystem may not be initialized at all in this mode.
Is there a way to make UrhoSharp render into an offscreen buffer of a specified size? Alternatively, it might be okay if I simply keep the window hidden; is there a portable way to do that?