I’m building application that render 3D scene offscreen.
I’ve implemented the code by render to texture and it’s working fine on my local machine.
The application will open a window but it will be just a black screen while it’s generating the images in the background.
Now I’m trying to put the application to AWS cloud and run it.
But I’m getting this error:
Could not create window, root cause: ‘No available video device’
Is there any way I can run urho3D application on cloud without GPU and still render to texture?
It seems the headless mode will disable all the rendering.
You didn’t say which OS you are using in your setup. We had encountered exactly this error when we first test running our sample apps on Travis (Linux VM) and later on AppVeyor (Windows Server VM). To keep SDL happy, the VM needs a “virtual display” (we do not run the app in headless mode). As it turns out this is such a common requirement for CI servers that both Travis and AppVeyor provide a handy script to call to enable the “X virtual framebuffer” while on Linux and “desktop” while on Windows. It will be slow for sure without a real GPU but they do run successfully nevertheless after that. Probably if you search using a right keyword, you can find the equivalent script for AWS. HTH.
You are doing real time rendering if you are rendering a 3D scene. To render it to an image instead of a screen/window doesn’t AFAIK make it much faster or slower. Of course, if you just do it rarely and not at 30fps, it probably really doesn’t matter.