How to prevent the rendering to stop ?

Started by Montague, October 03, 2004, 15:30:03

Previous topic - Next topic

Montague

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.

Matzon

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.

renanse

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.

Matzon


renanse

Can I get a build that includes this fix?


renanse

Looks like it works.  As soon as that is officially released, jME will be fixed in that respect as well.  Thanks!