简体   繁体   中英

Java 3D renders on vnc, not on monitor

I have a program using Java3D that I'm running on a Raspberry Pi. I've been running the Pi on my network and accessing it through VNC via another machine whilst I ironed out a few kinks in my program.

I now have it running, albeit a bit slowly, and wanted to try it in its eventual use case, by plugging the Pi into a monitor and running it standalone.

However, when I run the Pi on a monitor, the program will not start, and prints out the following error:

Canvas3D_createNewContext: couldn't make current

DefaultRenderingErrorListener.errorOccurred:
CONTEXT_CREATION_ERROR: Renderer: Error creating Canvas3D graphics context
graphicsDevice = X11GraphicsDevice[screen=0]
canvas = javax.media.j3d.Canvas3D[canvas0,0,0,252x231]

I don't know much about the rendering process in linux, but if anyone could suggest what might be different between what VNC does and what a normal X11 server does that could cause problems I'd be grateful.

I'm using Oracle Java 1.7.0_40 with Java 3D 1.5 on the latest release of Raspbian.

Thanks for reading.

The article Using Headless Mode in the Java SE Platform describes the limitations imposed on applications intended to run in headless mode. For applications that cannot be usefully converted, some alternatives are discussed here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM