123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #ifndef PLAYEROPENGLWIDGET_H
- #define PLAYEROPENGLWIDGET_H
- #include <QOpenGLWidget>
- #include <QOpenGLFunctions_3_3_Core>
- #include <gl/gl.h>
- #include <qopenglext.h>
- /**
- * @brief
- *
- */
- class PlayerGLWidget : public QOpenGLWidget, protected QOpenGLFunctions_3_3_Core
- {
- Q_OBJECT
- public:
- explicit PlayerGLWidget(QWidget *parent = nullptr);
- ~PlayerGLWidget();
- private:
-
- protected:
- void initializeGL() override;
- void resizeGL(int w, int h) override;
- void paintGL() override;
- private:
- GLuint VAO1 = 0; // 顶点数组对象的ID
- GLuint VBO1 = 0; // 顶点缓冲对象的ID
- GLuint EBO1 = 0; // 索引缓冲对象的ID
- GLuint shaderProgram = 0; // 着色器程序对象的ID
- };
- #endif /* PLAYEROPENGLWIDGET_H */
|