feat(render): 实现高性能OpenGL渲染面板
- 添加ModelGLPanel类支持离屏OpenGL渲染 - 集成LWJGL3.3.6版本并更新相关依赖 - 实现模型树节点转换功能 - 添加纹理读取与显示错误处理机制 - 引入CommonMark库支持Markdown解析 -优化物理系统注释信息 - 禁用部分调试日志输出 - 添加测试用例TestModelGLPanel
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
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);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user