12345678910111213141516171819 |
- #include "client/rendering/Framebuffers.h"
- Framebuffers::Framebuffers(const WindowSize& size) :
- world(size, Framebuffer::POSITION | Framebuffer::NORMAL | Framebuffer::COLOR | Framebuffer::RED | Framebuffer::DEPTH),
- ssao(size, Framebuffer::RED),
- ssaoBlur(size, Framebuffer::RED),
- shadow(size, Framebuffer::DEPTH) {
- }
- void Framebuffers::resize(uint width, uint height) {
- world.resize(width, height);
- ssao.resize(width, height);
- ssaoBlur.resize(width, height);
- shadow.resize(width, height);
- }
- bool Framebuffers::hasError() const {
- return world.hasError() || ssao.hasError() || ssaoBlur.hasError() || shadow.hasError();
- }
|