I thought about the clearing, but it is not.
After some trials,i came to the conclusion that it only happens when, once the game has started, i resize the window without fullscreen.
The code i use for that task is the one given in lwjgl's webpage examples:
setDisplayMode with no full screen
if (!fullscreen) {
Display.setDisplayMode(new DisplayMode(width, height));
updateScreen();//Explained below
return;
}
updateScreen()
final int rw = (int) (Display.getWidth() / scale());
final int rh = (int) (Display.getHeight() / scale());
final float x = vx;
final float y = vy;
final float w = x + rw;
final float h = y + rh;
glViewport(0, 0, (int)(Display.getWidth()), (int)(Display.getHeight()));
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(x, w, y, h, 1.f, -1.f);
glMatrixMode(GL_MODELVIEW);
It also happens using normal textures but only if, after resizing the screen, i change its scale to >1< . I suppose this also happens to list, but for some (buggy reason) i cant display a list after resizing and scaling to 1:
scaleScreen()
public void scaleScreen(float scale) {
this.scale = scale;
updateScreen(); //Same method as described above.
}