Skip to main content

[JAVA3D-INTEREST] Re: Offscreen render using java.awt.headless

4 replies [Last post]

Kevin Rushforth said:

> Java 3D does not work with headless AWT. It requires OpenGL which
> requires a window system to run.

Can Java3D run on a system without a physical display?
Isn't it possible to run OpenGL in a purely offscreen
mode? Perhaps using Mesa for OpenGL and a fake display?

Thanks for your help,

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-03-17

The only way Java 3D could run on a system without a physical display is if that system ran a virtual X server (e.g., something like VNC) that also supported the GLX extension and OpenGL library. I am not aware of any such implementations.

In the future, we are exploring the possibility of a headless OpenGL for Pbuffer-only rendering, but that will require driver support from the graphics card manufacturers.

-- Kevin

Joined: 2006-05-05

There are many offscreen rendering issues discussed both in Java3D and
JOGL forums. The ability to render offsceen in a headless environment is
very important for server side applications that need to deliver rendered
3D image to almost any type of devices with a browser. For AWT based
applications such as server side charting applicatioons, there are solutions
under Unix system to perform headless rendering without an X-Server.
For server side 3D offscreen rendering even with X-Server present, it would
be very difficult to deploy the application to an application server without
starting the application server in front of the console (to enable xhost).

Based on the JOGL discussion forum, the PBuffer support from the video
drivers are very limited. nVidia's driver is supported but in its early

JOGL already supports PBuffer rendering and is ready to take advantae of it
when the driver is ready. I would urge the PBuffer to be supported by
Java3D as early as possible. Can this feature make it to 1.3.2 beta?
When PCI-Express card is widely adopted, the down stream bandwidth
contraint imposed by AGP can be eliminated. The equal bandwidth
provided by the PCI-Express interface provides a good platform to put the
PBuffer into very good use. I believe a lot of applications can take
advantage of this feature not just the server side rendering applications.

-- Scott

Joined: 2004-03-17

Java 3D already does take advantage of Pbuffers on Unix for OffScreen rendering. We plan to start using it on Windows to improve performance (although whether that will make the 1.3.2 release is still up in the air).

However, that doesn't solve the problem being discussed in this thread. OpenGL Pbuffers are created via GLX or wgl, and require a window system to be running. At the upcoming OpenGL ARB meeting, Sun is going to present a new extension, called GLP, which will allow Pbuffer-based rendering without a window system, although you still need some sort of centralized mechanism for resource allocation and access control if you want to use the graphics card as a sharable resource. This GLP extension will only really be useful when and if the major graphics vendors support it in their drivers. Absent this, some sort of psuedo-window-system (ala VNC, but with support for the GLX extension) will be needed.

Btw, I agree that this is an interesting problem to be solved, but a general solution will take time (and interest from the graphics vendors).

-- Kevin

Joined: 2006-05-05

Based on the following technical document, it is possible
to some extent to configure Solaris to start an X-server
as non root user to run servlet based server side rendering.

I am still fighting to get a similiar configuration to work
properly under Linux. Because of the security issue which
was caused by the fact that it's a combination of open
source libraries been integerated together, every compoent
requires its own security manager that it is not possible
to setup a trusted integrated environment such as Solaris

Does anyone in this forum already get a similiar setup
to work properly under Linux? Please share with us if
you get the Linux environment to work properly.

Under Windows/Mac OS X, this won't be an issue because
the Windows environemnt is already present.

-- Scott