From 11d3ee39d831256f3bd34202e012d1d48c33649c Mon Sep 17 00:00:00 2001 From: Carl Smith Date: Fri, 9 Oct 2020 19:55:04 +0100 Subject: [PATCH] Lightly edited the document (as discussed in #1404). --- raylib-GLFW-dependency.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/raylib-GLFW-dependency.md b/raylib-GLFW-dependency.md index 753e015..531cecf 100644 --- a/raylib-GLFW-dependency.md +++ b/raylib-GLFW-dependency.md @@ -1,11 +1,17 @@ -raylib uses [GLFW library](https://github.com/glfw/glfw) for several platforms Window/Input events management: +raylib uses the [GLFW library](https://github.com/glfw/glfw) for managing *Window* and *Input* events on the following platforms: - - `PLATFORM_DESKTOP` (Windows, Linux, macOS) - - `PLATFORM_WEB` (Html5) ([Emscripten JS implementation (limited)](https://github.com/emscripten-core/emscripten/blob/master/src/library_glfw.js)) + - `PLATFORM_DESKTOP`: Windows, Linux and macOS. + - `PLATFORM_WEB`: HTML5 ([Emscripten JS implementation (limited)](https://github.com/emscripten-core/emscripten/blob/master/src/library_glfw.js)). -GLFW is used only on [core](https://github.com/raysan5/raylib/blob/master/src/core.c) module. +Note that GLFW is used by the [core](https://github.com/raysan5/raylib/blob/master/src/core.c) module only. -In case someone could be interested in replacing GLFW for a custom platform-specific implementation, here it is a list with the functions currently used (raylib 3.0): +GLFW is *not* used on the following platforms, where custom implementations are used to manage *Window* and *Input* events: + + - `PLATFORM_ANDROID`: Uses the `native_app_glue` Android NDK module. + - `PLATFORM_RPI`: (native, no desktop) Uses `EGL`, `evdev` and standard system libraries directly. + - `PLATFORM_UWP`: Uses UWP provided libraries. + +If you are interested in replacing GLFW with a custom, platform-specific implementation, the functions currently used by raylib (as of raylib 3.0) are detailed below: ```c // GLFW: Device init/close @@ -70,10 +76,4 @@ glfwGetJoystickName(gamepad); glfwGetGamepadState(i, &state); glfwSetInputMode(CORE.Window.handle, GLFW_CURSOR, GLFW_CURSOR_NORMAL); glfwSetCursorPos(CORE.Window.handle, CORE.Input.Mouse.position.x, CORE.Input.Mouse.position.y); -``` - -GLFW is NOT used on the following platforms, where custom implementations are used to manage Window/Inputs: - - - `PLATFORM_ANDROID`-> Uses `native_app_glue` Android NDK module - - `PLATFORM_RPI`(native, no desktop) -> Uses `EGL`, `evdev` and standard system libraries directly - - `PLATFORM_UWP`-> Uses UWP provided libraries +``` \ No newline at end of file