Resizable seems a little buggy

Started by Minigame, July 01, 2014, 08:54:08 PM

Previous topic - Next topic

Minigame

This code is ready for execution in the main loop, but when I resize the frame the mouse pointer turns into a scroll pointer (2 ended arrow) and it seems like in-game / terrain clicking is completely whack. Am I doing something wrong?

            if (Display.wasResized()) {
               frameBuffer.resize(Display.getWidth(), Display.getHeight());
               frameBuffer.refresh();
               mouseYOffset = frameBuffer.getOutputHeight();
            }
            frameBuffer.clear(Color.BLACK);
                                // all other rendering stuff is under here

Oh.. and here's a screen shot of what happens on the login menu when the frame is resized (everything becomes distorted and placed / scaled awkwardly)


EgonOlsen

I've no idea about the mouse cursor. I'm not doing anything with it, so this has to be either an LWJGL or an OS issue. About the scaling...i've no idea either. Have you tried to print out the values of width and height to see if they actually match the window size?

Minigame

#2
Quote from: EgonOlsen on July 02, 2014, 08:27:48 AM
I've no idea about the mouse cursor. I'm not doing anything with it, so this has to be either an LWJGL or an OS issue. About the scaling...i've no idea either. Have you tried to print out the values of width and height to see if they actually match the window size?

After various testing I realized the in-game interfaces re-size and scale just fine... It's just the login screen that's glitching. Probably just a small bug somewhere in the rendering loop I'll have to hunt for...... It's rendered at -25, -25, due to the login screen being slightly too large for the frame - would that be the issue?

Edit: In resizable mode I also noticed that whenever I click the terrain to begin walking to the mouse-to-terrain-collision-location that it's all bugged up.

I've had resizable mode disabled for a long time due to numerous small bugs and finally have them pinned down to just these 2.. :$

EgonOlsen

Please try to change the fov slightly after resizing and see it that helps. That's not a real solution, i just would like to know what to look out for...