Removed 2D OpenGL initialization code from Display. It messes with the implicit, but well-defined, opengl default state and doesn't fit well with multiple context types (gl3 and d3d)
This commit is contained in:
parent
65309d759c
commit
abd3f75d6c
|
@ -782,14 +782,6 @@ public final class Display {
|
|||
}
|
||||
|
||||
private static void initContext() {
|
||||
// Put the window into orthographic projection mode with 1:1 pixel ratio.
|
||||
// We haven't used GLU here to do this to avoid an unnecessary dependency.
|
||||
GL11.glMatrixMode(GL11.GL_PROJECTION);
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glOrtho(0.0, current_mode.getWidth(), 0.0, current_mode.getHeight(), -1.0, 1.0);
|
||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glViewport(0, 0, current_mode.getWidth(), current_mode.getHeight());
|
||||
// Clear window to avoid the desktop "showing through"
|
||||
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
|
||||
update();
|
||||
|
|
Loading…
Reference in New Issue