Minimize display in LWJGL

I am working on a game that uses LWJGL , and I need a way to minimize display using the method. Is there any way to do this?

+4
source share
1 answer

The easiest way to do this is to include LWJGL in JPanel, Canvas, or something similar. This will allow you full control over how you resize your OpenGL layer, etc. You can even have your own "OpenGL controls" if you want to get started with it. here and here are two good examples. The vital part of it is quite simple:

Display.setParent(myAwtOrSwingControl);

After that you can install:

myFrame.setState ( Frame.ICONIFIED );

, .

+2

Source: https://habr.com/ru/post/1618826/


All Articles