Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void setDisplay( java.lang.String displayName, java.lang.Integer width, java.lang.Integer height , java.lang.Boolean fullscreen ) throws LWJGLException{
- // Display.setTitle(displayName);
- // Display.setFullscreen(fullscreen);
- // Enable vsync if we can (due to how OpenGL works, it cannot be guarenteed to always work)
- // Display.setVSyncEnabled(true);
- DisplayMode dmode = new DisplayMode(width,height);
- Display.setDisplayMode(dmode);
- Display.setFullscreen(fullscreen);
- Display.setDisplayMode(displayMode);
- Display.setTitle(displayName);
- Display.create();
- // Create default display of 640x480
- // Display.create();
- GL11.glEnable(GL11.GL_DEPTH_TEST);
- // 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();
- GLU.gluPerspective(45, 1.0f, 10.f, 4000);
- GL11.glMatrixMode(GL11.GL_MODELVIEW);
- GL11.glLoadIdentity();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement