#include "renderTarget.hpp"
#include <cstring>

namespace render::kernel
{

RenderTarget::RenderTarget(uint32_t width, uint32_t height)
{
    SceGxmRenderTargetParams params;
    memset(&params, 0, sizeof(SceGxmRenderTargetParams));
    params.width = width;
    params.height = height;
    params.scenesPerFrame = 1;
    params.driverMemBlock = -1;

    sceGxmCreateRenderTarget(&params, &this->target);
}

RenderTarget::~RenderTarget()
{
    sceGxmDestroyRenderTarget(this->target);
}

SceGxmRenderTarget *RenderTarget::GetTarget()
{
    return this->target;
}

} // namespace render::kernel
