create XCode15 project targeting iOS

This commit is contained in:
blueloveTH 2024-03-23 18:36:57 +08:00
commit 0caa4133a8
2 changed files with 422 additions and 4 deletions

View file

@ -47,6 +47,7 @@
**********************************************************************************************/
// TODO: Include the platform specific libraries
#include "libEGL/libEGL.h"
//----------------------------------------------------------------------------------
// Types and Structures Definition
@ -508,10 +509,8 @@ int InitPlatform(void)
// As soon as we picked a EGLConfig, we can safely reconfigure the ANativeWindow buffers to match, using EGL_NATIVE_VISUAL_ID
eglGetConfigAttrib(platform.device, platform.config, EGL_NATIVE_VISUAL_ID, &displayFormat);
// Android specific call
ANativeWindow_setBuffersGeometry(platform.app->window, 0, 0, displayFormat); // Force use of native display size
platform.surface = eglCreateWindowSurface(platform.device, platform.config, platform.app->window, NULL);
// eglCreateWindowSurface(platform.device, platform.config, platform.app->window, NULL);
platform.surface = eglCreateWindowSurface(platform.device, platform.config, NULL, NULL);
// There must be at least one frame displayed before the buffers are swapped
eglSwapInterval(platform.device, 1);

View file

@ -502,6 +502,8 @@ const char *TextFormat(const char *text, ...); // Formatting of tex
#include "platforms/rcore_drm.c"
#elif defined(PLATFORM_ANDROID)
#include "platforms/rcore_android.c"
#elif defined(PLATFORM_IOS) || defined(PLATFORM_IOSSIMULATOR)
#include "platforms/rcore_ios.c"
#else
// TODO: Include your custom platform backend!
// i.e software rendering backend or console backend!