From 3bcfc32ef17d36f16381be4c407a609df8063eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Fri, 30 Oct 2026 17:05:46 +0300 Subject: [PATCH] move extensions loading to Aux --- components/raybri/mac/raybriAux.h | 6 ++++++ components/render/mac/renderEffect.swift | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/components/raybri/mac/raybriAux.h b/components/raybri/mac/raybriAux.h index fd9630c..be688ce 100644 --- a/components/raybri/mac/raybriAux.h +++ b/components/raybri/mac/raybriAux.h @@ -4,6 +4,7 @@ // Header void *raybriGLLoader(const char *name); +void raybriLoadExtensions(void); // Source @@ -11,6 +12,7 @@ void *raybriGLLoader(const char *name); #include #include "raybriConst.h" +#include "rlgl.h" #include // raylib is built as a static/dynamic library with GLFW baked in, but we never @@ -30,6 +32,10 @@ void *raybriGLLoader(const char *name) { return dlsym(handle, name); } +void raybriLoadExtensions(void) { + rlLoadExtensions(raybriGLLoader); +} + #endif // RAYBRI_AUX_IMPLEMENTATION #endif // RAYBRI_AUX_H diff --git a/components/render/mac/renderEffect.swift b/components/render/mac/renderEffect.swift index 3b270f7..899b378 100644 --- a/components/render/mac/renderEffect.swift +++ b/components/render/mac/renderEffect.swift @@ -16,9 +16,7 @@ func renderInit(_ vm: RenderVM) { var swapInterval: Int32 = 1 vm.glView.openGLContext?.setValues(&swapInterval, for: .swapInterval) - // Load OpenGL extensions - rlLoadExtensions(unsafeBitCast(raybriGLLoader as @convention(c) (UnsafePointer?) -> UnsafeMutableRawPointer?, to: UnsafeMutableRawPointer.self)) - + raybriLoadExtensions() raybriInit() }