You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
474 B

5 years ago
  1. #pragma once
  2. #include "ggl.h"
  3. class FrameBufferObject {
  4. public:
  5. GLuint mFrameBufferObject;
  6. GLint mPrevFrameBuffer;
  7. std::map<std::string, GLuint> mBuffers;
  8. std::vector<GLenum> mDrawBuffers;
  9. public:
  10. FrameBufferObject();
  11. void AttachColorBuffer(const char*bufferName, GLenum attachment, int width, int height);
  12. void AttachDepthBuffer(const char*bufferName, int width, int height);
  13. void Finish();
  14. void Bind();
  15. void Unbind();
  16. GLuint GetBuffer(const char*bufferName);
  17. };