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

边栏推荐
- Buuctf's different flags and simplerev
- Ego planner code parsing Bspline_ Optimizer section (2)
- 【Proteus仿真】用24C04与1602LCD设计的简易加密电子密码锁
- Yolov3 network model building
- This Chinese numpy quick look-up table is too easy!
- Streaming media server (16) -- figure out the difference between live broadcast and on-demand
- Zhang Fei hardware 90 day learning notes - personal record on day 6. Please see my personal profile / homepage for the complete record
- Dynamic planning -- expansion topics
- Pecan — @expose()
- Record: solve the problem that MySQL is not an internal or external command environment variable
猜你喜欢

EGO Planner代码解析bspline_optimizer部分(3)
![[proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD](/img/51/209e35e0b94a51b3b406a184459475.png)
[proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD

2020 intermediate financial management (escort class)

Day18 - basis of interface testing
![235. Ancêtre public le plus proche de l'arbre de recherche binaire [modèle LCA + même chemin de recherche]](/img/f5/f2d244e7f19e9ddeebf070a1d06dce.png)
235. Ancêtre public le plus proche de l'arbre de recherche binaire [modèle LCA + même chemin de recherche]

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

Integrated easy to pay secondary domain name distribution system
![[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]

application

PyTorch中在反向传播前为什么要手动将梯度清零?
随机推荐
第二章:求长方体数组,指定区间内的完全数,改进指定区间内的完全数
How can I avoid "div/0!" Errors in Google Docs spreadsheet- How do I avoid the '#DIV/0!' error in Google docs spreadsheet?
Flutter network and data storage framework construction-b1
Merge K ascending linked lists
P1891 crazy LCM (Euler function)
Free year-end report summary template Welfare Collection
Integrated easy to pay secondary domain name distribution system
How to build an efficient information warehouse
Why should we do feature normalization / standardization?
What is the content of game modeling
[proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD
【水质预测】基于matlab模糊神经网络水质预测【含Matlab源码 1923期】
Comments on flowable source code (37) asynchronous job processor
Buuctf's different flags and simplerev
KINGS
Max of PHP FPM_ Some misunderstandings of children
OSPF - detailed explanation of stub area and full stub area
UE source code analysis: uccharactermovementcomponent - rootmotion
PyTorch中在反向传播前为什么要手动将梯度清零?
What does a really excellent CTO look like in my eyes