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

边栏推荐
- 【光学】基于matlab介电常数计算【含Matlab源码 1926期】
- How can I avoid "div/0!" Errors in Google Docs spreadsheet- How do I avoid the '#DIV/0!' error in Google docs spreadsheet?
- What does a really excellent CTO look like in my eyes
- This Chinese numpy quick look-up table is too easy!
- [academic related] how to find the innovation of top papers? Chinese universities won the CVPR Best Student Thesis Award for the first time
- TFs and SVN [closed] - TFs vs SVN [closed]
- Flask generates swagger documents
- 第二十章:y= sin(x)/x,漫步坐标系计算,y= sin(x)/x 带廓幅图形,奥运五环,小球滚动与弹跳,流水显示,矩形优化裁剪,r个皇后全控nxn棋盘
- Flume learning notes
- 235. 二叉搜索樹的最近公共祖先【lca模板 + 找路徑相同】
猜你喜欢

Merge K ascending linked lists

FBI warning: some people use AI to disguise themselves as others for remote interview
![[new year job hopping season] test the technical summary of interviewers' favorite questions (with video tutorials and interview questions)](/img/4e/a51365bb88b1fc29d1c77fcdde5350.jpg)
[new year job hopping season] test the technical summary of interviewers' favorite questions (with video tutorials and interview questions)

Record: MySQL changes the time zone
![[optics] vortex generation based on MATLAB [including Matlab source code 1927]](/img/9b/b7f462e2ecbff0cee35e7de5c80cf7.jpg)
[optics] vortex generation based on MATLAB [including Matlab source code 1927]

为什么要做特征的归一化/标准化?

Day18 - basis of interface testing

Nous avons fait une plateforme intelligente de règlement de détail

Driveseg: dynamic driving scene segmentation data set

【学术相关】顶级论文创新点怎么找?中国高校首次获CVPR最佳学生论文奖有感...
随机推荐
01. Preparation for automated office (free guidance, only three steps)
How to design a high concurrency system
Webrtc[41] - Analysis of the establishment process of webrtc transmission channel
Pytorch introduction to deep learning practice notes 13- advanced chapter of cyclic neural network - Classification
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
论文阅读 GloDyNE Global Topology Preserving Dynamic Network Embedding
Why should we do feature normalization / standardization?
Why should the gradient be manually cleared before back propagation in pytorch?
Today I am filled with emotion
High concurrency Architecture - distributed search engine (ES)
These problems should be paid attention to in the production of enterprise promotional videos
Summary of 90 day learning materials and notes of Zhang Fei's actual electronic hardware engineer
EGO Planner代码解析bspline_optimizer部分(1)
math_泰勒公式
If the warehouse management communication is not in place, what problems will occur?
Simple solution of physical backup and restore of Damon database
Work Measurement - 1
我眼中真正优秀的CTO长啥样
What is the content of game modeling
Compared with 4G, what are the advantages of 5g to meet the technical requirements of industry 4.0