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.


Messages - TimmerCA

Pages: [1]
1
Support / Re: Make Window Resizable?
« on: March 23, 2012, 03:14:52 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:

Code: [Select]
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?
« on: March 22, 2012, 03:14:42 am »
I see where I can make my jPCT game full-screen:

Code: [Select]
Config.glFullscreen = true;
But where can I make the window resizable?

Pages: [1]