Hey, I’m changing the DisplayMode of my Display while rendering (Like in an Options Menu) with Display.setDisplayMode(dm);
The Problem i get from this is, that the Gui I have doesn’t get resized so that it fits the Display, it just stays at it’s previous size (800x600 by default).
If i set some other DisplayMode at the beginning it works fine but when I change it while the Display is created it just gets messed up.
my init Code:
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadIdentity();
GL11.glOrtho(0, 800, 0, 600, -1, 1);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glLoadIdentity();
and when i change the displaymode and render a white Quad (0,0,800,600) it shows up like this:
Any ideas how to fix it?
Edit: after Changing the DisplayMode calling GL11.glViewPort(0,0,Display.getWidth(),Display.getHeight); fixed it