Framebuffers.cpp 632 B

12345678910111213141516171819
  1. #include "client/rendering/Framebuffers.h"
  2. Framebuffers::Framebuffers(const Size& size) :
  3. world(size, Framebuffer::POSITION | Framebuffer::NORMAL | Framebuffer::COLOR | Framebuffer::RED | Framebuffer::DEPTH),
  4. ssao(size, Framebuffer::RED),
  5. ssaoBlur(size, Framebuffer::RED),
  6. shadow(size, Framebuffer::DEPTH) {
  7. }
  8. void Framebuffers::resize(int width, int height) {
  9. world.resize(width, height);
  10. ssao.resize(width, height);
  11. ssaoBlur.resize(width, height);
  12. shadow.resize(width, height);
  13. }
  14. bool Framebuffers::hasError() const {
  15. return world.hasError() || ssao.hasError() || ssaoBlur.hasError() || shadow.hasError();
  16. }