package Hexel.rendering;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
import javax.swing.JFrame;
public class Window {
public GLCanvas canvas;
public GLCanvas getCanvas() {
return this.canvas;
}
public JFrame frame;
public JFrame getFrame() {
return this.frame;
}
public Window() {
GLProfile glp = GLProfile.getMinimum(true);
GLCapabilities caps = new GLCapabilities(glp);
caps.setDepthBits(24);
this.canvas = new GLCanvas(caps);
this.frame = new JFrame("Hexel");
this.frame.setSize(1280, 800);
this.frame.add(this.canvas);
this.frame.setVisible(true);
this.frame.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
}
}