Lightly edited the document (as discussed in #1404).

master
Carl Smith pirms 4 gadiem
vecāks
revīzija
11d3ee39d8
1 mainītis faili ar 12 papildinājumiem un 12 dzēšanām
  1. +12
    -12
      raylib-GLFW-dependency.md

+ 12
- 12
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
```

Notiek ielāde…
Atcelt
Saglabāt