#include #include #include #include "CloudViewMainWindow.h" #define APP_VERSION "1.0.2" 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(); }