www.jpct.net
jPCT - a 3d engine for Java => Support => Topic started by: AGP on October 04, 2017, 03:30:02 am
-
Is this a jpct error? If so, what is it? I'm using the software renderer here.
-
It seems to be. Can you be more specific in what exactly triggers this?
-
I've tried replicating it during the game. Invariably, I will get it as I close it. Often during, but I can't seem to cause it to happen while running. But whenever I close, there it is.
-
Are you doing something like flush() on the TextureManager?
-
No. Do you know what I'm almost certain to be one of the causes? FrameBuffer.dispose().
-
Are you doing the dispose in another thread then?
-
Same thread as the gameloop and just before Frame.dispose().
-
I don't see how this can happen if everything happens in the same thread. Where does the actual rendering happen then?
-
private void loop() {
....
buffer.clear(java.awt.Color.black);
theWorld.renderScene(buffer);
theWorld.draw(buffer);
buffer.displayGLOnly();
canvas.repaint();
Thread.yield();
}
buffer.dispose();//CAUSES THE PROBLEM
this.dispose();
buffer.disableRenderer(IRenderer.RENDERER_OPENGL);
System.exit(0);
-
Try to disable the renderer before disposing it.