UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MacPlatform.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6
7#define PLATFORM_MAC_USE_CHAR16 1 UE_DEPRECATED_MACRO(5.7, "PLATFORM_MAC_USE_CHAR16 has been deprecated and should be replaced with 1.")
8
13{
14 typedef unsigned int DWORD;
15 typedef size_t SIZE_T;
16 typedef decltype(NULL) TYPE_OF_NULL;
17 typedef char16_t WIDECHAR;
18 typedef WIDECHAR TCHAR;
19};
20
22
23// Define ARM64 / X86 here so we can run UBT once for both platforms
24#if __is_target_arch(arm64) || __is_target_arch(arm64e)
25# define PLATFORM_MAC_ARM64 1
26# define PLATFORM_MAC_X86 0
27#else
28# define PLATFORM_MAC_ARM64 0
29# define PLATFORM_MAC_X86 1
30#endif
31
32// Base defines, must define these for the platform, there are no defaults
33#define PLATFORM_DESKTOP 1
34#define PLATFORM_CAN_SUPPORT_EDITORONLY_DATA 1
35
36// Base defines, defaults are commented out
37//#define PLATFORM_EXCEPTIONS_DISABLED !PLATFORM_DESKTOP
38#define PLATFORM_ENABLE_VECTORINTRINSICS_NEON PLATFORM_MAC_ARM64
39// FMA3 support was added starting from Intel Haswell
40#ifndef PLATFORM_ALWAYS_HAS_FMA3
41# define PLATFORM_ALWAYS_HAS_FMA3 0
42#endif
43//#define PLATFORM_USE_LS_SPEC_FOR_WIDECHAR 1
44#define PLATFORM_COMPILER_DISTINGUISHES_INT_AND_LONG 1
45#define PLATFORM_WCHAR_IS_4_BYTES 1
46#define PLATFORM_TCHAR_IS_CHAR16 1
47#define PLATFORM_HAS_BSD_SOCKET_FEATURE_IOCTL 1
48#define PLATFORM_HAS_BSD_SOCKET_FEATURE_POLL 1
49//#define PLATFORM_USE_PTHREADS 1
50#define PLATFORM_MAX_FILEPATH_LENGTH_DEPRECATED MAC_MAX_PATH
51#define PLATFORM_SUPPORTS_TBB 1
52#define PLATFORM_SUPPORTS_MIMALLOC PLATFORM_64BITS
53#define PLATFORM_SUPPORTS_MESH_SHADERS 1
54#define PLATFORM_SUPPORTS_BINDLESS_RENDERING 1
55#define PLATFORM_SUPPORTS_GEOMETRY_SHADERS 1
56
57#define PLATFORM_ENABLE_POPCNT_INTRINSIC 1
58
59#define PLATFORM_GLOBAL_LOG_CATEGORY LogMac
60
61#if WITH_EDITOR
62# define PLATFORM_FILE_READER_BUFFER_SIZE (256*1024)
63#endif
64
65#ifdef PLATFORM_MAC_ARM64
66# define PLATFORM_CACHE_LINE_SIZE 128
67#else
68# define PLATFORM_CACHE_LINE_SIZE 64
69#endif
70
71#define MAC_MAX_PATH 1024
72
73#if UE_BUILD_DEBUG
74# define FORCEINLINE inline /* Don't force code to be inline */
75#else
76# define FORCEINLINE inline __attribute__ ((always_inline)) /* Force code to be inline */
77#endif
#define NULL
Definition oodle2base.h:134
FMacPlatformTypes FPlatformTypes
Definition MacPlatform.h:21
Definition GenericPlatform.h:33
Definition MacPlatform.h:13
WIDECHAR TCHAR
Definition MacPlatform.h:18
unsigned int DWORD
Definition MacPlatform.h:14
size_t SIZE_T
Definition MacPlatform.h:15
char16_t WIDECHAR
Definition MacPlatform.h:17
decltype(NULL) TYPE_OF_NULL
Definition MacPlatform.h:16