Egon, you stubborn (occasionally likeable) man, do you think it's odd jpct still calls Windows 7 an "unknown Windows version?"
Also, is it possible to undo calling an enableCanvasRenderer() call? Does it take disabling the renderer and reenabling it (I'm trying to do the hardware fullscreen-only bit on my game)?
Where am i printing the windows version?
Right after "adding lightsource."
Is it possible to undo calling an enableCanvasRenderer() call? Does it take disabling the renderer and reenabling it (I'm trying to do the hardware fullscreen-only bit on my game)?
In which code? I can't find anything that prints out a Windows version.
About the undo...i'm not sure. You can try to disable it using the normal disable/enable-sequence, but i'm not sure how well this will work. Another option is to create a new framebuffer instead.
Must be lwjgl, then.
Thanks for the suggestion.
I realize this is an lwjgl question, but how do I hide the Display once created? Neither Display.releaseContext() nor Display.destroy() does it, so I'm at a loss.
Actually, buffer.disableRenderer(IRenderer.RENDERER_OPENGL); should do this!?
This is a block in the constructor inside a block that has tested for hardware. Neither the try (the fullscreen with hardware) nor the catch (the windowed with hardware after failing at fullscreen) work. How come?
if (engineData.fullScreen) {
GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
this.setUndecorated(true);
this.setIgnoreRepaint(true);
device.setFullScreenWindow(this);
device.setDisplayMode(new java.awt.DisplayMode(engineData.width, engineData.height, 32, java.awt.DisplayMode.REFRESH_RATE_UNKNOWN));
if (!device.isDisplayChangeSupported())
System.err.println("No support for current mode!");
try {
buffer.disableRenderer(IRenderer.RENDERER_OPENGL);
buffer.dispose();
buffer = new FrameBuffer(engineData.width, engineData.height, FrameBuffer.SAMPLINGMODE_HARDWARE_ONLY);
buffer.enableRenderer(IRenderer.RENDERER_OPENGL);
buffer.disableRenderer(IRenderer.RENDERER_SOFTWARE);
Display.create();
Display.setDisplayModeAndFullscreen(new org.lwjgl.opengl.DisplayMode(engineData.width, engineData.height));
}
catch (Exception e) {System.err.println("Problem: "+e.getMessage());
this.remove(awtGlCanvas);
buffer.disableRenderer(IRenderer.RENDERER_OPENGL);
try {Display.releaseContext();}catch (Exception ex) {System.err.println("\n\nProblem?\n");}
Display.destroy();
awtGlCanvas = buffer.enableGLCanvasRenderer();
engineData.fullScreen = false;//AT LEAST PROCEED IN WINDOWED MODE}
this.add(awtGlCanvas);
//buffer.disableRenderer(IRenderer.RENDERER_OPENGL);
//buffer.enableRenderer(IRenderer.RENDERER_OPENGL);
device.setFullScreenWindow(null);
this.setUndecorated(false);
this.setVisible(true);
}
}
else this.setVisible(true);//IF NOT engineData.fullScreen