This commit is contained in:
Михаил Капелько committed 2026-10-25 06:38:42 +03:00
1 parent 7aa7af1be5
commit 9d2c03d3e0
6 files changed
+15 -22

No files matched your search

+2 -4
View File
@@ -1,13 +1,11 @@
#include "raybri.h"
#include "raybriConst.h"
#include "rlgl.h"
#include <dlfcn.h>
#include <stddef.h>
static int sr_width = 1;
static int sr_height = 1;
static int sr_ready = 0;
// raylib is built as a static/dynamic library with GLFW baked in, but we never
@@ -18,7 +16,7 @@ static void *sr_gl_loader(const char *name)
static void *handle = NULL;
if (handle == NULL)
{
handle = dlopen("/System/Library/Frameworks/OpenGL.framework/OpenGL", RTLD_LAZY | RTLD_LOCAL);
handle = dlopen(RAYBRI_MAC_GL, RTLD_LAZY | RTLD_LOCAL);
}
if (handle == NULL) return NULL;
return dlsym(handle, name);
+4 -18
View File
@@ -1,23 +1,9 @@
#ifndef OGS_MAHJONG_RAYLIB_BRIDGE_H
#define OGS_MAHJONG_RAYLIB_BRIDGE_H
#ifndef RAYBRI_H
#define RAYBRI_H
#ifdef __cplusplus
extern "C" {
#endif
// Initialise the OpenGL-backed raylib scene (no raylib window is created).
void raybri_init(void);
// Resize the viewport.
void raybri_resize(int width, int height);
void raybri_render(void);
// Release all GPU resources.
void raybri_resize(int width, int height);
void raybri_shutdown(void);
#ifdef __cplusplus
}
#endif
#endif
#endif // RAYBRI_H
+6
View File
@@ -0,0 +1,6 @@
#ifndef RAYBRI_CONST_H
#define RAYBRI_CONST_H
static const char RAYBRI_MAC_GL[] = "/System/Library/Frameworks/OpenGL.framework/OpenGL";
#endif // RAYBRI_CONST_H
+1
View File
@@ -0,0 +1 @@
../../../../components/raybri/raybriConst.h
+1
View File
@@ -0,0 +1 @@
../../../../components/raybri/raybriConst.h
+1
View File
@@ -0,0 +1 @@
../../../../components/raybri/raybriConst.h