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.

22 lines
501 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. #pragma once
  2. #include "glew.h"
  3. #include <map>
  4. #include <vector>
  5. class FBO
  6. {
  7. public:
  8. GLuint mFBO;
  9. std::map<std::string, GLuint> mBuffers;
  10. std::vector<GLenum> mDrawBuffers;
  11. public:
  12. FBO();
  13. //hdr/normal color
  14. void AttachColorBuffer(const char*bufferName,GLenum attachment,GLenum dataType,int width,int height);
  15. void AttachDepthBuffer(const char*bufferName, int width, int height);
  16. //complete fbo settings
  17. void Finish();
  18. void Bind();
  19. void Unbind();
  20. GLuint GetBuffer(const char*bufferName);
  21. };