12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #ifndef PLAYEROPENGLWIDGET_H
- #define PLAYEROPENGLWIDGET_H
- #include <QOpenGLWidget>
- #include <QOpenGLFunctions_3_3_Core>
- #include <GL/gl.h>
- #include "ShaderRect.h"
- /**
- * @brief
- *
- */
- class PlayerGLWidget : public QOpenGLWidget, protected QOpenGLFunctions_3_3_Core
- {
- Q_OBJECT
- public:
- explicit PlayerGLWidget(QWidget *parent = nullptr);
- ~PlayerGLWidget();
- /* 显示RGBA图片 */
- void showOneRGBAImage(const QImage& image);
-
- private:
-
- protected:
- void initializeGL() override;
- void resizeGL(int w, int h) override;
- void paintGL() override;
- private:
- // GLuint m_VAO1 = 0; // 顶点数组对象的ID
-
- ShaderBase* m_shaderCurr = nullptr; /* 当前使用的着色器对象 */
- ShaderBase* m_shaderRGBA = nullptr; /* 显示RGBA图片的着色器对象 */
- };
- #endif /* PLAYEROPENGLWIDGET_H */
|