当前位置:网站首页>01 - QT OpenGL display OpenGL window
01 - QT OpenGL display OpenGL window
2022-07-03 19:18:00 【Qingsong 0527】
qmyopenglwidget.h
#ifndef QMYOPENGLWIDGET_H
#define QMYOPENGLWIDGET_H
#include <QWidget>
#include <QOpenGLWidget>
#include <QOpenGLFunctions_3_3_Core>
class QMyOpenglWidget : public QOpenGLWidget, QOpenGLFunctions_3_3_Core
{
Q_OBJECT
public:
explicit QMyOpenglWidget();
protected:
virtual void initializeGL();
virtual void resizeGL(int w, int h);
virtual void paintGL();
signals:
public slots:
};
#endif // QMYOPENGLWIDGET_H
qmyopenglwidget.cpp
#include "qmyopenglwidget.h"
QMyOpenglWidget::QMyOpenglWidget()
{
}
void QMyOpenglWidget::initializeGL()
{
initializeOpenGLFunctions();
}
void QMyOpenglWidget::resizeGL(int w, int h)
{
}
void QMyOpenglWidget::paintGL()
{
glClearColor(0.2f, 0.2f, 0.1f, 0.1f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}

边栏推荐
- The way to treat feelings
- Today I am filled with emotion
- Day18 - basis of interface testing
- The necessity of lean production and management in sheet metal industry
- Webrtc[41] - Analysis of the establishment process of webrtc transmission channel
- The space of C disk is insufficient, and the computer becomes stuck. Quickly expand the capacity of C disk to make the system more smooth
- Analysis of dart JSON encoder and decoder
- I study database at station B (4): DQL
- Free hand account sharing in September - [cream Nebula]
- Php based campus lost and found platform (automatic matching push)
猜你喜欢

FBI警告:有人利用AI换脸冒充他人身份进行远程面试

Why should the gradient be manually cleared before back propagation in pytorch?
![[wallpaper] (commercially available) 70 wallpaper HD free](/img/21/6802da1056a18157b15de85df60cf5.jpg)
[wallpaper] (commercially available) 70 wallpaper HD free

我們做了一個智能零售結算平臺

I study database at station B (4): DQL

Record: pymysql is used in pycharm to connect to the database

235. 二叉搜索樹的最近公共祖先【lca模板 + 找路徑相同】

【LeetCode】【SQL】刷题笔记

SSM integration - joint debugging of front and rear protocols (list function, add function, add function status processing, modify function, delete function)

Flutter网络和数据存储框架搭建 -b1
随机推荐
Hard disk monitoring and analysis tool: smartctl
Recommend a GIF processing artifact less than 300K - gifsicle (free download)
BUUCTF
Max of PHP FPM_ Some misunderstandings of children
为什么要做特征的归一化/标准化?
利用可视化结果,点击出现对应的句子
EGO Planner代码解析bspline_optimizer部分(1)
Record the errors reported when running fluent in the simulator
[proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD
达梦数据库的物理备份和还原简解
第二章:求a,b的最大公约与最小公倍数经典求解,求a,b的最大公约与最小公倍数常规求解,求n个正整数的的最大公约与最小公倍数
flask 生成swagger文档
Floating source code comment (38) parallel job processor
【数学建模】基于matlab船舶三自由度MMG模型【含Matlab源码 1925期】
我們做了一個智能零售結算平臺
235. 二叉搜索樹的最近公共祖先【lca模板 + 找路徑相同】
application
Sqlalchemy - subquery in a where clause - Sqlalchemy - subquery in a where clause
【疾病识别】基于matlab GUI机器视觉肺癌检测系统【含Matlab源码 1922期】
Random numbers in a long range, is that right- Random number in long range, is this the way?