Jump to content

  • Log In with Google      Sign In   
  • Create Account

Lane Spangler

Member Since 08 Mar 2012
Offline Last Active May 07 2013 04:47 PM

#4941656 Scaling game to different resolutions (LWJGL)

Posted by Lane Spangler on 20 May 2012 - 09:36 AM

Ok, I fixed it. The issue was that I was using the current resolution to position game objects instead of the 1920x1080 resolution. So for example I would do
Paddle P1 = new Paddle(0, Display.getDisplayMode().getHeight()/2);
\
When I should be doing
Paddle P1 = new Paddle(0, 540);



#4940759 Scaling game to different resolutions (LWJGL)

Posted by Lane Spangler on 16 May 2012 - 02:44 PM

I thought this as well. When I do that it does achieve the desired effect except the game no longer fits the game window. For example, in a 1024x576 window using

GL11.glOrtho(0.0D, 1920.0D, 0.0D, 1080.0D, 1.0D, -1.0D);
The game is fit to roughly the bottom left corner of the window. It seems to have scaled correctly at least.


PARTNERS