2023-03-05 15:05:43 +00:00
|
|
|
/************************************************************//**
|
|
|
|
*
|
|
|
|
* @file: milepost.c
|
|
|
|
* @author: Martin Fouilleul
|
|
|
|
* @date: 13/02/2021
|
|
|
|
* @revision:
|
|
|
|
*
|
|
|
|
*****************************************************************/
|
|
|
|
|
|
|
|
//---------------------------------------------------------------
|
|
|
|
// platform implementations
|
|
|
|
//---------------------------------------------------------------
|
|
|
|
#include"platform.h"
|
|
|
|
|
2023-04-18 16:05:54 +00:00
|
|
|
#include"platform/std_log.c"
|
|
|
|
|
2023-04-25 17:13:15 +00:00
|
|
|
#if PLATFORM_WINDOWS
|
2023-04-17 16:12:21 +00:00
|
|
|
#include"platform/win32_memory.c"
|
2023-03-05 15:05:43 +00:00
|
|
|
#include"platform/win32_clock.c"
|
2023-06-16 13:30:48 +00:00
|
|
|
#include"platform/win32_string_helpers.c"
|
2023-05-26 14:03:23 +00:00
|
|
|
#include"platform/win32_path.c"
|
2023-06-16 13:30:48 +00:00
|
|
|
#include"platform/win32_io.c"
|
2023-07-31 03:59:00 +00:00
|
|
|
#include"platform/win32_thread.c"
|
2023-03-05 15:05:43 +00:00
|
|
|
//TODO
|
2023-04-25 17:13:15 +00:00
|
|
|
#elif PLATFORM_MACOS
|
2023-04-17 16:12:21 +00:00
|
|
|
#include"platform/unix_memory.c"
|
2023-03-05 15:05:43 +00:00
|
|
|
#include"platform/osx_clock.c"
|
2023-05-25 18:08:38 +00:00
|
|
|
#include"platform/posix_io.c"
|
2023-07-31 03:59:00 +00:00
|
|
|
#include"platform/posix_thread.c"
|
2023-08-03 09:34:19 +00:00
|
|
|
|
2023-03-05 15:05:43 +00:00
|
|
|
/*
|
|
|
|
#include"platform/unix_rng.c"
|
|
|
|
#include"platform/posix_socket.c"
|
|
|
|
*/
|
|
|
|
|
2023-04-25 17:13:15 +00:00
|
|
|
#elif PLATFORM_LINUX
|
2023-04-17 16:12:21 +00:00
|
|
|
#include"platform/unix_base_memory.c"
|
2023-03-05 15:05:43 +00:00
|
|
|
#include"platform/linux_clock.c"
|
2023-05-25 18:08:38 +00:00
|
|
|
#include"platform/posix_io.c"
|
2023-07-31 03:59:00 +00:00
|
|
|
#include"platform/posix_thread.c"
|
2023-03-05 15:05:43 +00:00
|
|
|
/*
|
|
|
|
#include"platform/unix_rng.c"
|
|
|
|
#include"platform/posix_socket.c"
|
|
|
|
*/
|
|
|
|
#else
|
|
|
|
#error "Unsupported platform"
|
|
|
|
#endif
|
|
|
|
|
2023-04-18 16:05:54 +00:00
|
|
|
//---------------------------------------------------------------
|
|
|
|
// utilities implementations
|
|
|
|
//---------------------------------------------------------------
|
|
|
|
#include"util/memory.c"
|
|
|
|
#include"util/strings.c"
|
|
|
|
#include"util/utf8.c"
|
|
|
|
#include"util/hash.c"
|
|
|
|
#include"util/ringbuffer.c"
|
|
|
|
|
2023-03-05 15:05:43 +00:00
|
|
|
//---------------------------------------------------------------
|
|
|
|
// app/graphics layer
|
|
|
|
//---------------------------------------------------------------
|
|
|
|
|
2023-04-25 17:13:15 +00:00
|
|
|
#if PLATFORM_WINDOWS
|
2023-03-05 15:05:43 +00:00
|
|
|
#include"win32_app.c"
|
2023-04-25 20:15:56 +00:00
|
|
|
#include"graphics_common.c"
|
|
|
|
#include"graphics_surface.c"
|
2023-03-05 15:05:43 +00:00
|
|
|
|
2023-04-25 17:13:15 +00:00
|
|
|
#if MG_COMPILE_GL || MG_COMPILE_GLES
|
2023-03-05 15:05:43 +00:00
|
|
|
#include"gl_loader.c"
|
|
|
|
#endif
|
|
|
|
|
2023-04-25 17:13:15 +00:00
|
|
|
#if MG_COMPILE_GL
|
2023-03-05 15:05:43 +00:00
|
|
|
#include"wgl_surface.c"
|
2023-04-25 17:13:15 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if MG_COMPILE_CANVAS
|
2023-03-05 15:05:43 +00:00
|
|
|
#include"gl_canvas.c"
|
|
|
|
#endif
|
|
|
|
|
2023-04-25 17:13:15 +00:00
|
|
|
#if MG_COMPILE_GLES
|
2023-03-05 15:05:43 +00:00
|
|
|
#include"egl_surface.c"
|
|
|
|
#endif
|
|
|
|
|
2023-04-25 17:13:15 +00:00
|
|
|
#elif PLATFORM_MACOS
|
2023-03-05 15:05:43 +00:00
|
|
|
//NOTE: macos application layer and graphics backends are defined in milepost.m
|
|
|
|
#else
|
|
|
|
#error "Unsupported platform"
|
|
|
|
#endif
|
|
|
|
|
2023-04-19 09:28:20 +00:00
|
|
|
#include"input_state.c"
|
2023-03-05 15:05:43 +00:00
|
|
|
#include"ui.c"
|