#pragma once
#include <glad/gles2.h>
struct AHardwareBuffer;

class RenderTarget
{
    AHardwareBuffer* hardwareBuffer = nullptr;
    GLuint m_framebuffer = 0;
    GLuint texture = 0;
public:
    bool create(uint32_t width, uint32_t height);
    bool create_exported(uint32_t width, uint32_t height);
    [[nodiscard]] AHardwareBuffer* hardware_buffer();
    [[nodiscard]] GLuint framebuffer() const;
    void bind();
    void unbind();
    void destroy();
};
