Author Topic: Resizable seems a little buggy  (Read 2453 times)

Offline Minigame

  • int
  • **
  • Posts: 55
    • View Profile
Resizable seems a little buggy
« on: July 01, 2014, 08:54:08 pm »
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)

« Last Edit: July 01, 2014, 10:17:59 pm by corey »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Resizable seems a little buggy
« Reply #1 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?

Offline Minigame

  • int
  • **
  • Posts: 55
    • View Profile
Re: Resizable seems a little buggy
« Reply #2 on: July 12, 2014, 03:26:34 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.. :$
« Last Edit: July 12, 2014, 03:30:44 am by corey »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Resizable seems a little buggy
« Reply #3 on: July 15, 2014, 09:53:30 pm »
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...