ShaderRect.h 490 B

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