Files
opengl-learn/qopengltest/glwidget.h
2025-12-18 09:26:50 +08:00

31 lines
656 B
C++

#pragma once
#include <QOpenGLVersionProfile>
#include <QtGui/QOpenGLFunctions_3_3_Core>
#include <QtWidgets/qopenglwidget.h>
#include <QtWidgets/qwidget.h>
class Shader {
public:
Shader(const std::string& vpath, const std::string& fpath) {
}
private:
unsigned int ID;
};
class GLWidget: public QOpenGLWidget,
protected QOpenGLFunctions_3_3_Core {
Q_OBJECT
public:
explicit GLWidget(QWidget* parent = nullptr);
~GLWidget() override;
protected:
void initializeGL() override;
void resizeGL(int w, int h) override;
void paintGL() override;
// void keyPressEvent(QKeyEvent* e) override;
private:
};