Results 1 to 1 of 1
- 10-08-2011, 04:45 PM #1Member
- Join Date
- Aug 2011
- Rep Power
BufferStrategy disabling in Full Screen mode
I have a game that can run both windowed and full screen modes, and I'm attempting to use BufferStrategy based painting on it (using getGraphics and show methods) when the game is running. When it's not, I disable the BS (using bs.dispose) and call the painting methods myself as I don't need a rendering loop anymore.
My issue is that paint methods such as JComponent.paintImmediately(Rectangle r) stop working for my game JPanel in full screen mode after I use and dispose a BufferStrategy. If I return to windowed mode and back to full screen mode, then they start working. This does not happen when I run the game in windowed mode - game starts, rendering loop keeps repainting using BufferStrategy - game ends - BS disposed - paint methods run OK.
The game code is pretty complex and lengthy - but I've gone through all tutorials & javadocs for the case and none helped. Any ideas?
- By Willi in forum AWT / SwingReplies: 7Last Post: 10-14-2009, 08:10 PM
- By Willi in forum AWT / SwingReplies: 4Last Post: 10-13-2009, 02:10 PM
- By Java Tip in forum java.awtReplies: 0Last Post: 06-23-2008, 11:24 PM
- By valery in forum New To JavaReplies: 1Last Post: 08-03-2007, 06:08 PM
- By Jack in forum Advanced JavaReplies: 2Last Post: 07-02-2007, 05:49 AM