Framebuffers.cpp 608 B

1234567891011121314151617181920
  1. #include "client/rendering/Framebuffers.h"
  2. Framebuffers::Framebuffers() :
  3. world(TextureFormat::float32(3), TextureFormat::float32(3), TextureFormat::color8(4), TextureFormat::float32(1),
  4. TextureFormat::depth32()),
  5. ssao(TextureFormat::float32(1)),
  6. ssaoBlur(TextureFormat::float32(1)),
  7. shadow(TextureFormat::depth32()) {
  8. }
  9. void Framebuffers::resize(const Size& size) {
  10. world.resize(size);
  11. ssao.resize(size);
  12. ssaoBlur.resize(size);
  13. shadow.resize(size);
  14. }
  15. bool Framebuffers::init(const Size& size) {
  16. return world.init(size) || ssao.init(size) || ssaoBlur.init(size) || shadow.init(size);
  17. }