Framebuffers.cpp 634 B

123456789101112131415161718
  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(true)),
  5. ssao(TextureFormat::float32(1)), ssaoBlur(TextureFormat::float32(1)), shadow(TextureFormat::depth32()) {
  6. }
  7. void Framebuffers::resize(const Size& size) {
  8. world.resize(size);
  9. ssao.resize(size);
  10. ssaoBlur.resize(size);
  11. shadow.resize(size);
  12. }
  13. bool Framebuffers::init(const Size& size) {
  14. return world.init(size) || ssao.init(size) || ssaoBlur.init(size) || shadow.init(size);
  15. }