www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Minigame on July 01, 2014, 08:54:08 pm

Title: Resizable seems a little buggy
Post by: Minigame 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)

(http://i.imgur.com/GFiCVOu.jpg)
Title: Re: Resizable seems a little buggy
Post by: 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?
Title: Re: Resizable seems a little buggy
Post by: Minigame 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.. :$
Title: Re: Resizable seems a little buggy
Post by: EgonOlsen 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...