34 lines
984 B
C++
34 lines
984 B
C++
#include <QApplication>
|
|
#include <QSurfaceFormat>
|
|
#include <QIcon>
|
|
#include "CloudViewMainWindow.h"
|
|
|
|
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("1.0.1");
|
|
|
|
// 设置应用程序图标
|
|
app.setWindowIcon(QIcon(":/logo.png"));
|
|
|
|
// 创建并显示主窗口
|
|
CloudViewMainWindow mainWindow;
|
|
mainWindow.setWindowTitle("点云查看器 v1.0.1");
|
|
mainWindow.resize(1280, 720);
|
|
mainWindow.show();
|
|
|
|
return app.exec();
|
|
}
|