this is my third thread in a short time, bear with me here guys, almost done
i’m stepping in and out of fullscreen to be able to show swing components properly, but when step back in, i either get really bad flickering, or a white screen. the code is
for the render loop
// Render single frame
do {
// The following loop ensures that the contents of the drawing buffer
// are consistent in case the underlying surface was recreated
do {
doRendering(start, true, true);
// Repeat the rendering if the drawing buffer contents
// were restored
} while (bufferStrategy.contentsRestored());
// Display the buffer
bufferStrategy.show();
// Repeat the rendering if the drawing buffer was lost
} while (bufferStrategy.contentsLost());
and when i step back in i do
mainFrame.setVisible(true);
mainFrame.setExtendedState(JFrame.MAXIMIZED_BOTH);
if(device.isFullScreenSupported())
device.setFullScreenWindow(mainFrame);
if(device.isDisplayChangeSupported())
device.setDisplayMode(best);