Offscreen surfaces are not supported

I try to run my JME application within a vmware virtual maschine(Windows Server) and I get the following error:

Nov 17, 2021 7:54:02 AM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.2-stable
 * Branch: HEAD
 * Git Hash: f85624a
 * Build Date: 2018-01-21
Nov 17, 2021 7:54:02 AM com.jme3.system.lwjgl.LwjglOffscreenBuffer initInThread
SEVERE: Offscreen surfaces are not supported.

The VM is hosted on a server maschine without a physical graphic card.

It is in general not possible to run a jme application within a VM?

I saw there’re some threads out there about this subject but no of them is answering my question.

I don’t really know the answer to your question… But you could try LWJGL 3 (or if that is what you are using, then LWJGL 2) if it fares any better…

I copied the libraries from the SDK. How can I figure out which LWJGL version I use?
But my jme is running wihtin eclipse RCP/AWT application, I thought that’s not compatible with AWT.

What’s might be the reason for this error on a vm? Missing GPU e.g.?

Probably GPU capabilities are lacking.

Some AWT stuff is fine to use with LWJGL 3. You can try it by replacing *lwjgl with *lwjgl3 JAR.

1 Like

Completely lacking.

I think without OpenGL you are going to have a problem running an OpenGL game engine. I don’t know if there is a software OpenGL implementation that could fix your issues… it would be slow.

Slow shouldn’t be the problem. I just use it for SWTBot tests. I only want to test the AWT/SWT components and not jmonkey but it has to start during the appilcation start up and of course not throwing any errors.

So create a version without jme, I guess.

It’s so deeply integrated in the system, that’s not possible.

I’m just having trouble following.

Either JME isn’t important for the tests and so just don’t start it. Or JME needs to be started for the tests and you will need some form of OpenGL.

Since most of us are writing games for a computer with a GPU, you may have to consult google for software-only OpenGL implementations for running without a GPU.

For the UI tests JME will not be tested but during the tests the application controls the jme/AWT panel. For example the scene graph will be manipulate from many different method outside jmonkey. The application is highly interacting with jmonkey. I can’t remove jme dependecies. To mock everything would be made a huge effort and the application even more complicated than it already is. Therefore I hoped for easy a solution. I’m not writing a game, I just use jme to display medical stuff.

I will try to get running opengl on a vmware.

If you have vmware workstation pro, opengl 3 is supported. That is how I test my linux builds.

I found this option but it’s deactivated probably because there’s not existing any physical graphic card. Is just a server machine in a data center.

At least some solutions emulate this with just CPU. Slow but at least the support is there.

Do you have an example for such an emulator? I found Open GL ES Emulator. May be that could be the right man for this job.

VMWare seems to at least support 3D acceleration through a real graphics card.

So then it would be down to finding an emulator for Windows Server itself it is running. And there should be something called “softGPU” by quick Googling. But I don’t have any experience on this.

I got started JME on my VMWare(without any graphic card) with this tool: Releases · pal1000/mesa-dist-win · GitHub