1 Star 0 Fork 0

longPc/LearnOpenGL

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
main.cpp 515 Bytes
Copy Edit Raw Blame History
袁绪龙 authored 2024-04-25 10:14 . 初始化了自定义OpenglWidget;
#include <QApplication>
#include <QPushButton>
#include <QSurfaceFormat>
#include "main/mainwindow.h"
int main(int argc, char *argv[]) {
// mac下要加上这个,要不然自定义openglWidget会报错
QSurfaceFormat format;
format.setMajorVersion(3);
format.setMinorVersion(3);
format.setProfile(QSurfaceFormat::CoreProfile);
QSurfaceFormat::setDefaultFormat(format);
QApplication a(argc, argv);
MainWindow mainWindow;
mainWindow.show();
return QApplication::exec();
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yuanxulong/learn-open-gl.git
git@gitee.com:yuanxulong/learn-open-gl.git
yuanxulong
learn-open-gl
LearnOpenGL
main

Search