Get Actual Video Mode before starting the game

Hi people,



I'm new in JME and I'm going to use it at my work, so I will be here for a long time.  :smiley:



I'm having difficulties to know the current DisplayMode from JME before creating and standarGame.



I have to call manually to LWJGL to know the current Video Mode, and I don't want to use this. Because a want to delegate this work to JME (for future use of JOGL).



I currently use this code.



protected void getActualVideoMode(Mode videoMode) {
       DisplayMode dm=org.lwjgl.opengl.Display.getDisplayMode();
       videoMode.set(dm.getWidth(), dm.getHeight(), dm.getBitsPerPixel(), dm.getFrequency());
    }



I haved been searching on the wiki/forum and javadoc but I haven't found any solution.
This feature is implemented in JME?

You can use the java api for DisplayMode.

Search for GraphicsDevice, DisplayMode classes.

thanks!!



That's a fast reply.



I post the code for other people.



GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
          GraphicsDevice[] gs = ge.getScreenDevices();
          for (int j = 0; j < gs.length; j++) {
             GraphicsDevice gd = gs[j];
             System.out.println(gd.getDisplayMode().getWidth()+"x"+gd.getDisplayMode().getHeight());
          }