Am I the only one who is still getting this bug?

I read in the 1.4.2 beta notes that the bug that causes a whie scren to appear an you have to alt tab in order to get to the program was fixed. It happens to me quite often when I launch my full screen app. Anyone else still experiencing this prob? I am using a native timer so could that be the source of this?

Meh, basically fullscreen is going to be broken till 1.5. I think theres a way to get it going IN to fullscreen properly (i’m not convinced), but you can’t switch back and forth or any of the stuff that I wanted.

Luckily you can program very easily for windowed/fullscreen with BufferStrategy and just wait for the update. You just gotta put some extra stuff in there to get the frame insets to translate your final buffer flip, and you can pretty much ignore if your in fullscreen or not in the rest of the code.

Or you could learn some OpenGL and use LWJGL. :stuck_out_tongue:

edit: for fun since im on the phone ill post my code :stuck_out_tongue: i was using something like this, i had buffer surfaces which could be a normal back buffer, or a more complex circular buffer, but when i was done drawing to those (its just an offscreen image) i would need to flip

  public void showSurface() {
        BufferStrategy bufStrat = frame.getBufferStrategy();
        Insets insets = frame.getInsets();

        if ( ! bufStrat.contentsLost() ) {
              Graphics g = null;
                    
              try {
                    g = bufStrat.getDrawGraphics();
                    g.translate( insets.left, insets.top );
                    surface.drawBuffer( g ); // draws my offscreen image
              } finally {
                    g.dispose();
              }
                    
              bufStrat.show();
        }
  }

What are you using for the timer? Wouldn’t you still get the white sceen with this code?
Its a shame that it is still not fixed. I am writting the code properly (like I have seen others on this forum suggest) so I am guesing that hen 1.5 gets released, or the final version fo 1.4.2, then everything will work fine.

I wasn’t dealing with the timer stuff, it was one of those things I wasn’t going to deal with until I had to, though, now that I’m using LWJGL I don’t have to worry about it.

That code was just dealing with how you can easier write your code for windowed mode but have it setup so you can switch to fullscreen when it’s fixed without lifting a finger. (and you could write some windowed/fullscreen switching methods)

I think it’s stuck waiting for 1.5 because they ran into some problems that can only be fixed through some reworking of major parts of the AWT. Not something you wanna screw with on a current version and break all kinds of things.

edit: just for fun, are you sunchronizing on Frame.getTreeLock() (i think thats it anyways) when you create the strategy? That was a workaround if I remember correctly. Theres some old threads on here detailing it a bit, but I can’t remember exactly what to do other then synchronized ( frame.getTreeLock() ) {//some fullscreen code} being in there somewhere

…ah, except the LWJGL is currently stumbling over the white-screen bug at the moment, which seems to manifest itself on TNT2/AMD systems. Apparently. More info when we find a cure.

Cas :slight_smile:

Don’t pay any attention to the man behind the curtain! ;D

I wanna say that sounds more like a hardware problem then anything wrong with LWJGL considering it’s a known issue with AMD/TNT2’s/opengl, but he is playing CS on that machine.

;/