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() }