Package com.golden.gamedev.engine.graphics

Examples of com.golden.gamedev.engine.graphics.FullScreenMode


      }
     
      // time to create the graphics engine
      if (fullscreen) {
        // fullscreen mode
        FullScreenMode mode = null;
        try {
          mode = new FullScreenMode(d, bufferstrategy);
          mode.getFrame().removeWindowListener(
                  WindowExitListener.getInstance());
          mode.getFrame().addWindowListener(this);
         
          this.gfx = mode;
        }
        catch (Throwable e) {
          e.printStackTrace();
         
          JOptionPane.showMessageDialog(null,
                  "ERROR: Entering FullScreen Mode\n" + "Caused by: "
                          + e.toString(),
                  "Graphics Engine Initialization",
                  JOptionPane.ERROR_MESSAGE);
          // fail-safe
          fullscreen = false;
         
          if (mode != null) {
            mode.cleanup();
          }
        }
      }
     
      if (!fullscreen) {
        // windowed mode
        WindowedMode mode = new WindowedMode(d, bufferstrategy);
        mode.getFrame().removeWindowListener(
                WindowExitListener.getInstance());
        mode.getFrame().addWindowListener(this);
       
        this.gfx = mode;
      }
     
      this.game = game;
View Full Code Here

TOP

Related Classes of com.golden.gamedev.engine.graphics.FullScreenMode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.