Scaling display contents when resized (lwjgl)

I’m trying to have all the contents of my display resize when the display is resized. Currently, this is my code:

if (Display.wasResized()) {
    this.width = Display.getWidth();
    this.height = Display.getHeight();
				
    GL11.glViewport(0, 0, this.width, this.height);
}

Currently, the original contents are still rendered, and the scaled contents are rendered over it. Is there any way to remove the “pre-scaled” content, or do I have to manually scale everything when I render?

Are you clearing the framebuffer?


glClear(GL_COLOR_BUFFER_BIT);

Wow… I had my glClear call in a different method, which I forgot to call. Thanks for pointing that out.