#include "client/rendering/Framebuffers.h"

Framebuffers::Framebuffers() :
world(TextureFormat::float32(3), TextureFormat::float32(3), TextureFormat::color8(4), TextureFormat::float32(1),
TextureFormat::depth32()),
ssao(TextureFormat::float32(1)),
ssaoBlur(TextureFormat::float32(1)),
shadow(TextureFormat::depth32()) {
}

void Framebuffers::resize(const Size& size) {
    world.resize(size);
    ssao.resize(size);
    ssaoBlur.resize(size);
    shadow.resize(size);
}

bool Framebuffers::init(const Size& size) {
    return world.init(size) || ssao.init(size) || ssaoBlur.init(size) || shadow.init(size);
}