|
This post was updated on .
Isn't the expected behavior that it returns to windowed mode resolution? I'm not quite sure where to implement the change. I tried setting the viewport in reshape() which did not change anything. Do I have to implement displayChanged()?
Edit: I tried saving the resolution before going into fullscreen inside the keylistener that listens for pressing f. After switching out, I check if we are still in fullscreen, if not, I do glWindow.setSize() with the previously saved values. I get the following console output:
01. [set fullscreen pre]: 0/0 1920x1200, f true, a false, [ l 0, r 0 - t 0, b 0 - 0x0]
02. window resized: 0/0 640x480
03. window resized: 0/0 640x480
04. Back out of fullscreen. Set: 640, 480
05. Thread[main-Animator,5,main] GearsES2.reshape 0/0 640x480, swapInterval 1, drawable 0x3400002, msaa false, tileRendererInUse null
06. >> angle 176.0, [l -1.3333334, r 1.3333334, b -1.0, t 1.0] 2.6666667x2.0 -> [l -1.3333334, r 1.3333334, b -1.0, t 1.0] 2.6666667x2.0
07. [set fullscreen post]: 0/0 640x480, f false, a false, [ l 0, r 0 - t 0, b 0 - 0x0]
08. window resized: 0/0 1920x1200
09.Thread[main-Animator,5,main] GearsES2.reshape 0/0 1920x1200, swapInterval 1, drawable 0x3400002, msaa false, tileRendererInUse null
10. >> angle 184.0, [l -1.6, r 1.6, b -1.0, t 1.0] 3.2x2.0 -> [l -1.6, r 1.6, b -1.0, t 1.0] 3.2x2.0
11. QUIT Window Thread[main-Display-.x11_:0-1-EDT-2,6,main]
As you can see, in the first line, we are in fullscreen, we exit and the window is resized to 640x480 (line 02&03).
I added the 'Back out of fullscreen' message (04), after which I call glWindow.setSize().
We see that the thread issues a reshape to 640x480 (05).
However in line 08 and 09 it is once again reshaped to 1920x1200.
I don't understand where and why 08 and 09 happen.
|