i have my app running under mac os x. now we tried it on windows. here’s the exception:
net.java.games.jogl.GLException: Surface already unlocked
at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.unlockSurfa
ce(WindowsOnscreenGLContext.java:192)
at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.free(Window
sOnscreenGLContext.java:134)
at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:271)
at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:194)
at net.java.games.jogl.GLCanvas.display(GLCanvas.java:82)
at net.xytanics.games.engine.Viewport.draw(Viewport.java:191)
at net.xytanics.games.smsrace.Controller$TickTimerTask.run(Controller.ja
va:88)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
the difference i see in the init() method is this:
mac: net.java.games.jogl.GLCanvas[canvas0,0,22,800x578]
win: net.java.games.jogl.GLCanvas[canvas0,4,23,792x573,invalid]
the ‘invalid’ looks really bad there. any idea, what i have to do to the canvas to make it valid?
here’s my construction:
Frame frame = new Frame("Viewport Frame");
DisplayMode bMode = aDevice.getDisplayMode();
frame.setBounds((int) (bMode.getWidth() - bounds.size.width) >> 1, (int) (bMode.getHeight() - bounds.size.height) >> 1, (int) bounds.size.width, (int) bounds.size.height);
GLCapabilities capabilities = new GLCapabilities();
canvas = GLDrawableFactory.getFactory().createGLCanvas(capabilities);
canvas.addGLEventListener(this);
frame.add(canvas);
frame.show();
do i have to add frame.setVisible(true) or something like it?