Files
window-axis-innovators-box/src/main/java/com/chuangzhou/vivid2D/test/TestModelGLPanel.java

30 lines
1.1 KiB
Java
Raw Normal View History

package com.chuangzhou.vivid2D.test;
import com.chuangzhou.vivid2D.render.ModelGLPanel;
import com.chuangzhou.vivid2D.render.model.Model2D;
import javax.swing.*;
public class TestModelGLPanel {
private static final String MODEL_PATH = "C:\\Users\\Administrator\\Desktop\\trump_texture.model";
public static void main(String[] args) {
SwingUtilities.invokeLater(() -> {
JFrame frame = new JFrame("ModelGLPanel Demo");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//com.chuangzhou.vivid2D.render.model.Model2D model = com.chuangzhou.vivid2D.render.model.Model2D.loadFromFile(MODEL_PATH);
ModelGLPanel glPanel = null;
try {
Model2D model2D = new Model2D("Hi");
glPanel = new ModelGLPanel(MODEL_PATH, 800, 600);
} catch (Exception e) {
throw new RuntimeException(e);
}
frame.add(glPanel);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
});
}
}