Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make an LWJGL window resizable?

Tags:

java

lwjgl

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?

like image 936
Bartvbl Avatar asked Mar 05 '11 21:03

Bartvbl


1 Answers

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().

like image 103
randfur Avatar answered Sep 19 '22 16:09

randfur