I’m running my J3d app on Windoze using the Java3d OpenGL version. When all the resources are loaded it goes to full screen mode and changes the resolution
/*
* ChangeRes.java
*
*/
import java.awt.*;
import javax.swing.*;
import java.awt.image.BufferStrategy;
/**
*
* @author Tim Bennett
*/
public class ChangeRes {
public ChangeRes() {
GraphicsDevice dev = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
GraphicsConfiguration gc = dev.getDefaultConfiguration();
DisplayMode mode = new DisplayMode(800, 600, 32, DisplayMode.REFRESH_RATE_UNKNOWN);
JFrame frame = new JFrame(gc);
frame.setUndecorated(true);
frame.setIgnoreRepaint(true);
frame.show();
dev.setFullScreenWindow(frame);
if(dev.isDisplayChangeSupported()) dev.setDisplayMode(mode);
BufferStrategy bufferStrategy = frame.getBufferStrategy();
}
public static void main( String[] args ) {
new ChangeRes();
}
}
This works fine for me but will this work just as well on other platforms or with the DirectX version of Java3d? The reason I ask is I saw a post from soneone who said he had used a similiar method and it worked with OpenGL and not DirectX.
Thanks 8)