LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Montague on October 03, 2004, 15:30:03

Title: How to prevent the rendering to stop ?
Post by: Montague on October 03, 2004, 15:30:03
Hi !
I've just had a look at the simple example of LWJGL that make a square to rotate. And I'd like to know if it is possible to run this example without having the rendering that stop each time I use another window. In fact, I would like that the rendering go on when I use another window (if the window of the example is visible or partially visible). And if the window of the example is not visible, I would like that the calculation of the angle go on as if the window was active.
Can anyone tell me if it's possible and, if it is possible, how to change the Game.java file ?
Thanks.
Title: How to prevent the rendering to stop ?
Post by: Matzon on October 03, 2004, 17:47:35
The display stops rendering because of the check for isActive(). If you remove that check, and always assume it's active, then it will always continue to render.
Title: How to prevent the rendering to stop ?
Post by: renanse on October 22, 2004, 22:56:30
I have a similar issue yet we do not call isActive...  the problem is that if the window is made inactive, the lwjgl native code sets a flag saying that the window is minimized which in turn prevents the buffer swap from occuring in Display.update()...  See org_lwjgl_opengl_Display.cpp lines 332-336:

case WA_INACTIVE:
isMinimized = true;
isFocused = false;
break;
}


In lwjgl .90, the line "isMinimized = true;" was not there.

Why is it there now?  Can we change this?  The isActive() method is a much more elegant way of doing it, allowing more control by the programmer.
Title: How to prevent the rendering to stop ?
Post by: Matzon on October 25, 2004, 05:21:20
http://sourceforge.net/mailarchive/forum.php?thread_id=5828144&forum_id=11221

Elias comitted this change, can you confirm everything works as expected?
Title: How to prevent the rendering to stop ?
Post by: renanse on October 26, 2004, 15:46:38
Can I get a build that includes this fix?
Title: How to prevent the rendering to stop ?
Post by: Matzon on October 26, 2004, 20:15:34
can you try the 0.93 build: http://matzon.dk/brian/lwjgl/builds/lwjgl-win32-0.93.zip
Title: How to prevent the rendering to stop ?
Post by: renanse on October 27, 2004, 01:00:32
Looks like it works.  As soon as that is officially released, jME will be fixed in that respect as well.  Thanks!