space-game001/src/render/FrameBuffer.h
Vladislav Khorev 519d780b3c Clean up
2026-05-01 20:01:06 +03:00

31 lines
698 B
C++

#pragma once
#include "render/OpenGlExtensions.h"
#include <memory>
namespace ZL {
class FrameBuffer {
private:
GLuint fbo = 0;
GLuint textureID = 0;
int width, height;
bool useMipmaps;
public:
FrameBuffer(int w, int h, bool useMipmaps = false);
~FrameBuffer();
FrameBuffer(const FrameBuffer&) = delete;
FrameBuffer& operator=(const FrameBuffer&) = delete;
void Bind();
void Unbind();
void GenerateMipmaps();
GLuint getTextureID() const { return textureID; }
int getWidth() const { return width; }
int getHeight() const { return height; }
};
} // namespace ZL