123456789101112131415161718192021222324252627 |
- #ifndef LAYERED_FRAMEBUFFER_H
- #define LAYERED_FRAMEBUFFER_H
- #include <GL/glew.h>
- class LayeredFramebuffer final {
- GLuint texture;
- GLuint buffer;
- public:
- LayeredFramebuffer();
- ~LayeredFramebuffer();
- LayeredFramebuffer(const LayeredFramebuffer&) = delete;
- LayeredFramebuffer(LayeredFramebuffer&&) = delete;
- LayeredFramebuffer& operator=(const LayeredFramebuffer&) = delete;
- LayeredFramebuffer& operator=(LayeredFramebuffer&&) = delete;
- void init(int width, int height, int depth);
- void bindAndClear();
- void bindTextureTo(int unit) const;
- void bindLayer(int layer);
- bool hasError() const;
- };
- #endif
|