framebuffer.hpp 509B

12345678910111213141516171819202122232425262728
  1. #ifndef N_FRAMEBUFFER_H_
  2. #define N_FRAMEBUFFER_H_
  3. #include "gl_core_3_3.h"
  4. #include <glm/glm.hpp>
  5. #include <GL/gl.h>
  6. #include <vector>
  7. #include "shader.hpp"
  8. class Framebuffer {
  9. private:
  10. unsigned int fbuffer;
  11. unsigned int image;
  12. unsigned int buffers[2];
  13. unsigned int vertCount;
  14. Shader* shader;
  15. public:
  16. Framebuffer( int w, int h );
  17. ~Framebuffer();
  18. void setShader( std::string );
  19. void draw();
  20. void resize( int w, int h );
  21. void bind();
  22. void unbind();
  23. };
  24. #endif