private static void reshape()

Started by basil, April 03, 2010, 20:42:24

Previous topic - Next topic

basil

as mentioned here http://lwjgl.org/forum/index.php/topic,3247.0.html ..

using lwjgl without org.lwjgl.opengl.Display.update() failes the

if ( parent_resized ) {
  reshape();
  parent_resized = false;
}


part. its necessary when using a AWT canvas with setParent(). but even then .. maybe its just my setup again, but sometimes, not always, when I resize the canvas, the display isn't resized accordingly. I assume that must be something about a missed
if ( parent_resized )
check due to swing, AWT, threaded stuff, whatnot or whatever.

I tried a few things like putting more into EDT, got a bit better but still not 100%. then helped myself with reflections, setAccessible(), invoke reshape() and a 2nd check for canvas resizes. resizing works perfectly .. but thats not the way it should be done. kind of a potential source for security exception.

is there any chance you guys make the org.lwjgl.opengl.Display.reshape() method public ?

spasi

Well, there's no reason to not use display.update after the latest change. Before exposing reshape, we should first focus on why it's problematic now and under what circumstances. There's no point in making an implementation detail public without good reason. Again, a test case would be great to have if you could provide one.

basil

agree.

even with proper Display.update() .. I get a weird resized cavas ... sometimes.