Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - TimmerCA

#1
Support / Re: Make Window Resizable?
March 23, 2012, 03:14:52 AM
Quote from: AGP on March 23, 2012, 02:46:18 AM
Usually I make my programs read a configuration file which either specifies a resolution (which the user can change) or has something like fullscreen=true and getCurrentResolution in place of the numerical values, which initializes the app in fullscreen and with the current resolution. If you notice, most games tell you after you change their resolution that in order to see the change you'll have to restart the game. So just do that.

In pure LWJGL, I can easily do this, and since jPCT is based on LWJGL, I thought it should be possible here.  I have the following code in my game loop:

if (Display.wasResized()) {
  GL11.glViewport(0, 0, Display.getWidth(), Display.getHeight());
  scene.resize();
  gui.resize();
}


Where scene is a custom object I've created that holds all my game objects, and gui is a TWL GUI Widget that contains all my 2D game controls.  Why wouldn't this port over to jPCT well?
#2
Support / Make Window Resizable?
March 22, 2012, 03:14:42 AM
I see where I can make my jPCT game full-screen:

Config.glFullscreen = true;

But where can I make the window resizable?