#pragma once #include "OpenGlExtensions.h" #include namespace ZL { class FrameBuffer { private: GLuint fbo = 0; GLuint textureID = 0; int width, height; public: FrameBuffer(int w, int h); ~FrameBuffer(); // Запрещаем копирование, как в VBOHolder FrameBuffer(const FrameBuffer&) = delete; FrameBuffer& operator=(const FrameBuffer&) = delete; void Bind(); // Начать рендер в этот буфер void Unbind(); // Вернуться к обычному рендеру в экран GLuint getTextureID() const { return textureID; } int getWidth() const { return width; } int getHeight() const { return height; } }; } // namespace ZL