How do I make an LWJGL window resizable?

Bartvbl picture Bartvbl · Mar 5, 2011 · Viewed 7.6k times · Source

I am trying to make the window of my java game resizable, which uses the LWJGL library. According to some forum questions that date back from 2007 this is only possible with a workaround. Is this still the case today? And what is the way to go?

Answer

randfur picture randfur · Apr 14, 2012

The Display class has the option for enabling resizing. http://lwjgl.org/javadoc/org/lwjgl/opengl/Display.html#setResizable(boolean)

You can get the width and height at anytime with getWidth() and getHeight().