/**
 * @file vulkan_base.h
 * @author Piotr Krygier (everyonecancode@gmail.com)
 * @brief Vulkan wrapper functions used by other parts of Graphics component
 * @version 0.1
 * @date 2022-05-13
 *
 * @copyright Copyright (c) 2022
 *
 */

#ifndef GRAPHICS_VULKANBASE_H
#define GRAPHICS_VULKANBASE_H

#include <vulkan/vulkan.h>

#include "utilities/commons.h"
#include "graphics_context.h"

/**
 * @brief Initialize Vulkan backend for buffers and stuff
 *
 * @param context Graphics context handle
 * @return rse_err_t 0 on success. Status code on failure
 */
rse_err_t vulkan_init(struct graphics_context_t* context);

/**
 * @brief Initialize Vulkan backend with descriptors
 *
 * @param context Graphics context handle
 * @return rse_err_t 0 on success. Status code on failure
 */
rse_err_t vulkan_run(struct graphics_context_t* context);

/**
 * @brief Deinitialize Vulkan backend
 *
 * @param context Graphics context handle
 *  */
void vulkan_deinit(struct graphics_context_t* context);

/**
 * @brief Draw frame on the screen.
 *
 * @param context Graphics context
 * @return rse_err_t
 */
rse_err_t draw_frame(struct graphics_context_t* context);

#endif /* GRAPHICS_VULKANBASE_H */
