moving profile to API scope

This commit is contained in:
Kbz-8
2023-12-11 20:28:58 +01:00
parent 2e5346a0ff
commit 401e6d13f3
40 changed files with 87 additions and 72 deletions

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/04 22:10:52 by maldavid #+# #+# */
/* Updated: 2023/12/11 15:12:39 by kbz_8 ### ########.fr */
/* Updated: 2023/12/11 19:46:13 by kbz_8 ### ########.fr */
/* */
/* ************************************************************************** */
@@ -15,7 +15,7 @@
#include <renderer/core/render_core.h>
#include <array>
#include <core/errors.h>
#include <core/profile.h>
#include <mlx_profile.h>
#include <core/memory.h>
namespace mlx::core

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/04 21:49:46 by maldavid #+# #+# */
/* Updated: 2023/12/10 22:19:59 by kbz_8 ### ########.fr */
/* Updated: 2023/12/11 19:46:49 by kbz_8 ### ########.fr */
/* */
/* ************************************************************************** */
@@ -24,7 +24,7 @@
#include <core/graphics.h>
#include <platform/inputs.h>
#include <core/profile.h>
#include <mlx_profile.h>
namespace mlx::core
{

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/04 17:42:32 by maldavid #+# #+# */
/* Updated: 2023/12/08 18:53:11 by kbz_8 ### ########.fr */
/* Updated: 2023/12/11 19:46:57 by kbz_8 ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,7 +14,7 @@
#define __MLX_ERRORS__
#include <string>
#include <core/profile.h>
#include <mlx_profile.h>
enum class e_kind
{

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/04/02 14:49:49 by maldavid #+# #+# */
/* Updated: 2023/12/08 19:04:59 by kbz_8 ### ########.fr */
/* Updated: 2023/12/11 19:47:03 by kbz_8 ### ########.fr */
/* */
/* ************************************************************************** */
@@ -26,7 +26,7 @@
#include <renderer/text_pipeline.h>
#include <utils/non_copyable.h>
#include <renderer/images/texture.h>
#include <core/profile.h>
#include <mlx_profile.h>
namespace mlx
{

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/12/07 16:31:51 by kbz_8 #+# #+# */
/* Updated: 2023/12/11 15:13:46 by kbz_8 ### ########.fr */
/* Updated: 2023/12/11 19:47:13 by kbz_8 ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,7 +14,7 @@
#define __MLX_MEMORY__
#include <utils/singleton.h>
#include <core/profile.h>
#include <mlx_profile.h>
#include <list>
namespace mlx

View File

@@ -1,73 +0,0 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* profile.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/10 08:49:17 by maldavid #+# #+# */
/* Updated: 2023/12/08 18:49:38 by kbz_8 ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef __MLX_PROFILE__
#define __MLX_PROFILE__
// Try to identify the compiler
#if defined(__BORLANDC__)
#define MLX_COMPILER_BORDLAND
#elif defined(__clang__)
#define MLX_COMPILER_CLANG
#ifdef __MINGW32__
#define MLX_COMPILER_MINGW
#ifdef __MINGW64_VERSION_MAJOR
#define MLX_COMPILER_MINGW_W64
#endif
#endif
#elif defined(__GNUC__) || defined(__MINGW32__)
#define MLX_COMPILER_GCC
#ifdef __MINGW32__
#define MLX_COMPILER_MINGW
#ifdef __MINGW64_VERSION_MAJOR
#define MLX_COMPILER_MINGW_W64
#endif
#endif
#elif defined(__INTEL_COMPILER) || defined(__ICL)
#define MLX_COMPILER_INTEL
#elif defined(_MSC_VER)
#define MLX_COMPILER_MSVC
#else
#define MLX_COMPILER_UNKNOWN
#warning "This compiler is not fully supported"
#endif
#if defined(_WIN32) || defined(__CYGWIN__)
#define MLX_PLAT_WINDOWS
#elif defined(__linux__)
#define MLX_PLAT_LINUX
#elif defined(__APPLE__) && defined(__MACH__)
#define MLX_PLAT_MACOS
#elif defined(unix) || defined(__unix__) || defined(__unix)
#define MLX_PLAT_UNIX
#else
#error "Unknown environment!"
#endif
// Checking common assumptions
#include <climits>
#include <cstdint>
static_assert(CHAR_BIT == 8, "CHAR_BIT is expected to be 8");
static_assert(sizeof(int8_t) == 1, "int8_t is not of the correct size" );
static_assert(sizeof(int16_t) == 2, "int16_t is not of the correct size");
static_assert(sizeof(int32_t) == 4, "int32_t is not of the correct size");
static_assert(sizeof(int64_t) == 8, "int64_t is not of the correct size");
static_assert(sizeof(uint8_t) == 1, "uint8_t is not of the correct size" );
static_assert(sizeof(uint16_t) == 2, "uint16_t is not of the correct size");
static_assert(sizeof(uint32_t) == 4, "uint32_t is not of the correct size");
static_assert(sizeof(uint64_t) == 8, "uint64_t is not of the correct size");
#endif