[FIXED] Display Mode dimensions not updated when parent canvas resizes

Started by CodeBunny, May 31, 2011, 11:44:53

Previous topic - Next topic

CodeBunny

Basically, when I pop the Display onto a canvas in a JFrame, and resize the JFrame, I can have the area I render to resize with the canvas if I make calls to glViewport that reference the size of the canvas.
glViewport(0, 0, parent.getWidth(), parent.getHeight());


However, if I make that call reference the dimensions in the DisplayMode (which I would hope would return the same values), like this:
glViewport(0, 0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight());


Then the values return by getWidth() and getHeight() haven't changed from their initial settings, and I'm rendering to the same section of the canvas as before.

This seems like a bug - obviously, the DisplayMode's dimensions have changed, because the enlarged canvas means I can render to a bigger area. Could this be fixed in the next release?

CodeBunny


kappa

Quote from: CodeBunny on May 31, 2011, 14:01:21
In hindsight, this should be in Bug Reports / RFE.

Moved to bug section.

I'm not sure but i'm guessing this is related to this bug.

CodeBunny

My impression of the bug is that it seems like the Display is adjusted but the settings in the DisplayMode are not updated to reflect the new dimensions. DisplayMode.getWidth() and getHeight() return the same values as before the resize, even though the Display is rendered on a larger canvas.

Obviously, this is just an guess based on a few minor runs - nothing involving a Mouse or anything like that.

spasi


CodeBunny


spasi

Depends on how quickly we'll get feedback on the OpenGL ES implementation. The NV video extensions need to be tested as well. We'll take our time I guess, no other features or fixes have been implemented since the last release.

CodeBunny

K.

I did some tests with the Mouse, and Mouse behavior works perfectly fine with a resizing Canvas. The only bug I'm seeing is in how the DisplayMode's dimensions are reported.

spasi

Quote from: CodeBunny on May 31, 2011, 18:21:58The only bug I'm seeing is in how the DisplayMode's dimensions are reported.

What do you mean?

CodeBunny

The bug I mentioned at the start of this thread - when the Canvas a Display is on is resized, the DisplayMode's dimensions are not updated. Kappa pointed to another bug he was guessing was related, and I was saying that the mouse worked fine for me after some initial testing.