我在从 Java3d 打印图形时遇到了一些麻烦,某些计算机(基于 Intel 的显卡)在打印时完全崩溃。我得到了这个例外。
javax.media.j3d.IllegalRenderingStateException: GL_VERSION
at javax.media.j3d.NativePipeline.createNewContext(Native Method)
at javax.media.j3d.NativePipeline.createNewContext(NativePipeline.java:2736)
at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:4895)
at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:2421)
at javax.media.j3d.Renderer.doWork(Renderer.java:895)
at javax.media.j3d.J3dThread.run(J3dThread.java:256)
DefaultRenderingErrorListener.errorOccurred:
CONTEXT_CREATION_ERROR: Renderer: Error creating Canvas3D graphics context
graphicsDevice = Win32GraphicsDevice[screen=0]
canvas = visualization.show3D.show.print.OffScreenCanvas3D[canvas0,0,0,3000x2167,invalid]
Java 3D ERROR : OpenGL 1.2 or better is required (GL_VERSION=1.1)
Java Result: 1
我知道它说我必须升级到 OpenGL 1.2 但检查后我已经安装了 1.5(错误消息不准确)
String glVersion = (String)getCanvas3D().queryProperties().get("native.version");
我试图捕捉 IllegalRenderingStateException 但它不起作用,JVM 无论如何都会崩溃。没有人知道如何在基于英特尔的显卡上使用打印功能吗?