// Copyright (c) 2021 Dominic Masters
// 
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT

#pragma once

// Settings
#include "config.h"

// Static Libs
#include <cglm/cglm.h>

#if SETTING_PLATFORM_USE_GLAD == 1
  #include <glad/glad.h>
#else
  #include <GL/gl.h>
#endif

#if SETTING_PLATFORM == SETTING_PLATFORM_GLFW
  #include <GLFW/glfw3.h>
#elif SETTING_PLATFORM == SETTING_PLATFORM_SDL
  #include "SDL.h"
  #include "SDL_opengl.h"
#elif SETTING_PLATFORM == SETTING_PLATFORM_GBM
  #include <xf86drm.h>
  #include <xf86drmMode.h>
  #include <gbm.h>
#endif

#include <stb_image.h>
#include <stb_truetype.h>

// Standard Libs
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <malloc.h>
#include <string.h>
#include <math.h>

#if defined(_WIN32) || defined(_WIN64)
  // Windows Fixes
  # define strtok_r strtok_s
  
  #if defined(Sleep)
    # define sleep(n) Sleep(n)
  #else
    # define sleep(n) _sleep(n)
  #endif
#else
  #include <unistd.h>
#endif