当前位置:网站首页>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);
}

边栏推荐
- EGO Planner代码解析bspline_optimizer部分(3)
- BUUCTF
- The earliest record
- Sentinel source code analysis part II - sentinel dashboard console startup and configuration
- I didn't cancel
- What does a really excellent CTO look like in my eyes
- 【学术相关】顶级论文创新点怎么找?中国高校首次获CVPR最佳学生论文奖有感...
- How to design a high concurrency system
- How to build an efficient information warehouse
- Webrtc[41] - Analysis of the establishment process of webrtc transmission channel
猜你喜欢

What is the content of game modeling

During MySQL installation, the download interface is empty, and the components to be downloaded are not displayed. MySQL installer 8.0.28.0 download interface is empty solution

Driveseg: dynamic driving scene segmentation data set

application
![[water quality prediction] water quality prediction based on MATLAB Fuzzy Neural Network [including Matlab source code 1923]](/img/aa/9980acc9839f067202d46faabbf029.png)
[water quality prediction] water quality prediction based on MATLAB Fuzzy Neural Network [including Matlab source code 1923]
![[disease identification] machine vision lung cancer detection system based on Matlab GUI [including Matlab source code 1922]](/img/fc/00835b95537cf889588502a3d13bc9.png)
[disease identification] machine vision lung cancer detection system based on Matlab GUI [including Matlab source code 1922]

OSPF - detailed explanation of stub area and full stub area

我眼中真正优秀的CTO长啥样

2020 intermediate financial management (escort class)

Counting from the East and counting from the West will stimulate 100 billion industries. Only storage manufacturers who dare to bite the "hard bone" will have more opportunities
随机推荐
Work Measurement - 1
QT -- qfile file read / write operation
math_ Taylor formula
【Proteus仿真】用24C04与1602LCD设计的简易加密电子密码锁
Hard disk monitoring and analysis tool: smartctl
Summary of composition materials for 2020 high-frequency examination center of educational resources
Record: pymysql is used in pycharm to connect to the database
The way to treat feelings
High concurrency Architecture - separate databases and tables
Buuctf's different flags and simplerev
[water quality prediction] water quality prediction based on MATLAB Fuzzy Neural Network [including Matlab source code 1923]
Integrated easy to pay secondary domain name distribution system
EGO Planner代码解析bspline_optimizer部分(3)
我眼中真正优秀的CTO长啥样
Flutter network and data storage framework construction-b1
Basic principle of LSM tree
If the warehouse management communication is not in place, what problems will occur?
Ctrip will implement a 3+2 work system in March, with 3 days on duty and 2 days at home every week
第二十章:y= sin(x)/x,漫步坐标系计算,y= sin(x)/x 带廓幅图形,奥运五环,小球滚动与弹跳,流水显示,矩形优化裁剪,r个皇后全控nxn棋盘
论文阅读 GloDyNE Global Topology Preserving Dynamic Network Embedding