#include "sokol_setup.h"

namespace fn::gfx {

sg_environment make_environment() {
    sg_environment env{};
    env.defaults.color_format = SG_PIXELFORMAT_RGBA8;
    env.defaults.depth_format = SG_PIXELFORMAT_DEPTH_STENCIL;
    env.defaults.sample_count = 1;
    return env;
}

sg_swapchain make_swapchain(int width, int height) {
    sg_swapchain sw{};
    sw.width = width;
    sw.height = height;
    sw.sample_count = 1;
    sw.color_format = SG_PIXELFORMAT_RGBA8;
    sw.depth_format = SG_PIXELFORMAT_DEPTH_STENCIL;
    sw.gl.framebuffer = 0;  // default framebuffer of current GL context
    return sw;
}

}  // namespace fn::gfx
