Displays the right display mode with the logger

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9897 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
jul..om 12 years ago
parent b76bffcd2f
commit 23fd08ac45
  1. 29
      engine/src/jogl/com/jme3/system/jogl/JoglDisplay.java

@ -46,7 +46,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLContext;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
@ -64,28 +63,11 @@ public class JoglDisplay extends JoglAbstractDisplay {
return Type.Display;
}
/*protected DisplayMode getFullscreenDisplayMode(DisplayMode[] modes, int width, int height, int bpp, int freq){
for (DisplayMode mode : modes){
if (mode.getWidth() == width
&& mode.getHeight() == height
&& (mode.getBitDepth() == DisplayMode.BIT_DEPTH_MULTI
|| mode.getBitDepth() == bpp
|| (mode.getBitDepth() == 32 && bpp==24))
&& mode.getRefreshRate() == freq){
return mode;
}
}
return null;
}*/
protected void createGLFrame(){
//Container contentPane;
if (useAwt){
frame = new Frame(settings.getTitle());
//contentPane = frame;
}else{
frame = new JFrame(settings.getTitle());
//contentPane = ((JFrame)frame).getContentPane();
}
frame.setResizable(false);
frame.add(canvas);
@ -122,7 +104,8 @@ public class JoglDisplay extends JoglAbstractDisplay {
canvas.setVisible(true);
final GLContext context = canvas.getContext();
//this is the earliest safe opportunity to get the context
//final GLContext context = canvas.getContext();
/*canvas.invoke(true, new GLRunnable() {
@Override
@ -242,10 +225,10 @@ public class JoglDisplay extends JoglAbstractDisplay {
}
logger.log(Level.INFO, "Selected display mode: {0}x{1}x{2} @{3}",
new Object[]{frame.getWidth(),
frame.getHeight(),
0,
0});
new Object[]{gd.getDisplayMode().getWidth(),
gd.getDisplayMode().getHeight(),
gd.getDisplayMode().getBitDepth(),
gd.getDisplayMode().getRefreshRate()});
}
private void initInEDT(){

Loading…
Cancel
Save