当前位置:网站首页>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);
}
边栏推荐
- [proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD
- 【光学】基于matlab涡旋光产生【含Matlab源码 1927期】
- math_ Taylor formula
- Integrated easy to pay secondary domain name distribution system
- 2022.2.14 Li Kou - daily question - single element in an ordered array
- Zhang Fei hardware 90 day learning notes - personal records on day 2, please see my personal profile / homepage for the complete
- Using the visualization results, click to appear the corresponding sentence
- Record: install MySQL on ubuntu18.04
- Yolov3 network model building
- [leetcode] [SQL] notes
猜你喜欢
[optics] dielectric constant calculation based on MATLAB [including Matlab source code 1926]
Record: writing MySQL commands
Common text labels
235. Ancêtre public le plus proche de l'arbre de recherche binaire [modèle LCA + même chemin de recherche]
Pytorch introduction to deep learning practice notes 13- advanced chapter of cyclic neural network - Classification
[disease identification] machine vision lung cancer detection system based on Matlab GUI [including Matlab source code 1922]
Free year-end report summary template Welfare Collection
We have built an intelligent retail settlement platform
Record the errors reported when running fluent in the simulator
Php based campus lost and found platform (automatic matching push)
随机推荐
I didn't cancel
KINGS
Luogu-p1107 [bjwc2008] Lei Tao's kitten
Free year-end report summary template Welfare Collection
[water quality prediction] water quality prediction based on MATLAB Fuzzy Neural Network [including Matlab source code 1923]
Foundation of ActiveMQ
High concurrency Architecture - separate databases and tables
Octopus online ecological chain tour Atocha protocol received near grant worth $50000
利用可视化结果,点击出现对应的句子
[proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD
Simulation scheduling problem of SystemVerilog (1)
What does a really excellent CTO look like in my eyes
SSM整合-前后台协议联调(列表功能、添加功能、添加功能状态处理、修改功能、删除功能)
Bad mentality leads to different results
OSPF - detailed explanation of stub area and full stub area
Smart wax therapy machine based on STM32 and smart cloud
Floating source code comment (38) parallel job processor
Differential constrained SPFA
Pytorch introduction to deep learning practice notes 13- advanced chapter of cyclic neural network - Classification
Summary of 90 day learning materials and notes of Zhang Fei's actual electronic hardware engineer