我有一个小程序,在某些计算机上我收到错误:
pixel format not accelerated
据我所知,如果计算机有一个较旧的openGL然后4.2,我就会收到此错误,现在我正在尝试
PixelFormat pf = new PixelFormat();
ContextAttribs contex = new ContextAttribs(3,2)
.withForwardCompatible(true)
.withProfileCore(true);
Display.create(pf,contex);
但我记得以下错误:
Exception in thread "Thread-3" java.lang.IllegalStateException: Function is not supported
at org.lwjgl.BufferChecks.checkFunctionAddress(BufferChecks.java:58)
at org.lwjgl.opengl.GL11.glMatrixMode(GL11.java:2065)
at Tanc.Game.setUpGL(Game.java:1364)
at Tanc.Game$1.run(Game.java:150)
清理
如何告诉LWJGL使用较低版本而不出错?