summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRay <[email protected]>2021-08-22 01:08:11 +0200
committerRay <[email protected]>2021-08-22 01:08:11 +0200
commitb154bc33f55bf7b7ad3fab5841a8d49043e2e979 (patch)
treeb7f8fa4acc7dafcc93601cbf2e0dcb5c67052711
parentd98779abef04088206cef7ccc291370ecc1a445e (diff)
downloadraylib-b154bc33f55bf7b7ad3fab5841a8d49043e2e979.tar.gz
raylib-b154bc33f55bf7b7ad3fab5841a8d49043e2e979.zip
Added note on GLFW custom allocators for the future
-rw-r--r--src/core.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core.c b/src/core.c
index 27b6c31b..52245b80 100644
--- a/src/core.c
+++ b/src/core.c
@@ -3583,6 +3583,17 @@ static bool InitGraphicsDevice(int width, int height)
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
glfwSetErrorCallback(ErrorCallback);
+ /*
+ // Setup custom allocators to match raylib ones
+ const GLFWallocator allocator = {
+ .allocate = MemAlloc,
+ .deallocate = MemFree,
+ .reallocate = MemRealloc,
+ .user = NULL
+ };
+
+ glfwInitAllocator(&allocator);
+ */
#if defined(__APPLE__)
glfwInitHint(GLFW_COCOA_CHDIR_RESOURCES, GLFW_FALSE);