ShaderRect.h 543 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef SHADERRECT_H
  2. #define SHADERRECT_H
  3. #include "ShaderBase.h"
  4. /**
  5. * @brief 显示矩形RGBA图片
  6. *
  7. */
  8. class ShaderRect : public ShaderBase
  9. {
  10. public:
  11. ShaderRect();
  12. ~ShaderRect();
  13. /* 初始化形状 */
  14. GLuint initShape() override;
  15. /* 绘制图形 */
  16. void drawShape() override;
  17. private:
  18. GLuint m_VAO = 0; // 顶点数组对象的ID
  19. GLuint m_VBO = 0; // 顶点缓冲对象的ID
  20. GLuint m_EBO = 0; // 索引缓冲对象的ID
  21. };
  22. #endif // SHADERRECT_H