Explorar o código

Added note on GLFW custom allocators for the future

Ray %!s(int64=4) %!d(string=hai) anos
pai
achega
b154bc33f5
Modificáronse 1 ficheiros con 11 adicións e 0 borrados
  1. 11 0
      src/core.c

+ 11 - 0
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);