This commit is contained in:
Михаил Капелько committed 2026-10-23 06:57:04 +03:00
1 parent 4b70bd9906
commit e0f54dde75
7 files changed
+38 -43

No files matched your search

@@ -1,6 +1,6 @@
#ifndef OGS_MAHJONG_RAYLIB_IOS_BRIDGING_HEADER_H
#define OGS_MAHJONG_RAYLIB_IOS_BRIDGING_HEADER_H
#import "raybriIOS.h"
#include "../raybri.h"
#endif
+5 -5
View File
@@ -10,7 +10,7 @@
// GL runs on ANGLE (libEGL + libGLESv2, Metal backend), taken from the same
// ghera release as raylib's headers.
#include "raybriIOS.h"
#include "../raybri.h"
#include <math.h>
#include <stdio.h>
@@ -90,7 +90,7 @@ static int sr_create_surface(void)
return 1;
}
int raybri_ios_init(void *layer, int width, int height)
int raybri_init(void *layer, int width, int height)
{
if (sr_ready) return 1;
@@ -166,7 +166,7 @@ int raybri_ios_init(void *layer, int width, int height)
return 1;
}
void raybri_ios_resize(int width, int height)
void raybri_resize(int width, int height)
{
if (!sr_ready) return;
@@ -181,7 +181,7 @@ void raybri_ios_resize(int width, int height)
sr_log("surface recreated");
}
void raybri_ios_render(double time)
void raybri_render(double time)
{
if (!sr_ready) return;
@@ -200,7 +200,7 @@ void raybri_ios_render(double time)
eglSwapBuffers(sr_display, sr_surface);
}
void raybri_ios_shutdown(void)
void raybri_shutdown(void)
{
if (!sr_ready) return;
-28
View File
@@ -1,28 +0,0 @@
#ifndef OGS_MAHJONG_RAYLIB_IOS_BRIDGE_H
#define OGS_MAHJONG_RAYLIB_IOS_BRIDGE_H
#ifdef __cplusplus
extern "C" {
#endif
// Initialise EGL (ANGLE) on the given CALayer and bring up raylib's rlgl.
// Unlike the ghera/raylib-iOS backend, no raylib window, view controller or
// app delegate is involved: the caller owns the layer and the frame timer.
// Returns 1 on success, 0 on failure.
int raybri_ios_init(void *layer, int width, int height);
// Recreate the EGL window surface for a new drawable size (backing pixels).
void raybri_ios_resize(int width, int height);
// Render one frame: clear the drawable to a time-based background colour and
// present it. `time` is monotonically increasing seconds.
void raybri_ios_render(double time);
// Release rlgl state and the EGL surface/context/display.
void raybri_ios_shutdown(void);
#ifdef __cplusplus
}
#endif
#endif