Utils/CloudView/main.cpp
杰仔 7e887aaeee feat(点云加载): 添加PLY文件格式支持并更新版本号至1.1.4
实现PLY文件加载功能,支持ASCII和二进制格式(大端/小端)
扩展文件对话框过滤器包含PLY格式
统一PLY和PCD文件的颜色处理逻辑
2026-04-10 20:13:04 +08:00

36 lines
1.0 KiB
C++

#include <QApplication>
#include <QSurfaceFormat>
#include <QIcon>
#include "CloudViewMainWindow.h"
#define APP_VERSION "1.1.4"
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
// 设置 OpenGL 格式 - 使用 2.1 版本以确保固定管线兼容
QSurfaceFormat format;
format.setDepthBufferSize(24);
format.setStencilBufferSize(8);
format.setVersion(2, 1); // 使用 OpenGL 2.1 以确保固定管线函数可用
format.setSamples(4); // 抗锯齿
QSurfaceFormat::setDefaultFormat(format);
// 设置应用信息
app.setApplicationName("CloudView");
app.setOrganizationName("CloudView");
app.setApplicationVersion(APP_VERSION);
// 设置应用程序图标
app.setWindowIcon(QIcon(":/logo.png"));
// 创建并显示主窗口
CloudViewMainWindow mainWindow;
mainWindow.setWindowTitle(QString("点云查看器 v%1").arg(APP_VERSION));
mainWindow.resize(1280, 720);
mainWindow.show();
return app.exec();
}