{"action":"created","issue":{"url":"https://api.github.com/repos/libgdx/libgdx/issues/3673","labels_url":"https://api.github.com/repos/libgdx/libgdx/issues/3673/labels{/name}","comments_url":"https://api.github.com/repos/libgdx/libgdx/issues/3673/comments","events_url":"https://api.github.com/repos/libgdx/libgdx/issues/3673/events","html_url":"https://github.com/libgdx/libgdx/issues/3673","id":124100221,"number":3673,"title":"Finish LWJGL 3 backend and request for testing","user":{"login":"badlogic","id":514052,"avatar_url":"https://avatars.githubusercontent.com/u/514052?v=3","gravatar_id":"","url":"https://api.github.com/users/badlogic","html_url":"https://github.com/badlogic","followers_url":"https://api.github.com/users/badlogic/followers","following_url":"https://api.github.com/users/badlogic/following{/other_user}","gists_url":"https://api.github.com/users/badlogic/gists{/gist_id}","starred_url":"https://api.github.com/users/badlogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/badlogic/subscriptions","organizations_url":"https://api.github.com/users/badlogic/orgs","repos_url":"https://api.github.com/users/badlogic/repos","events_url":"https://api.github.com/users/badlogic/events{/privacy}","received_events_url":"https://api.github.com/users/badlogic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":58,"created_at":"2015-12-28T18:03:46Z","updated_at":"2016-01-18T11:42:15Z","closed_at":null,"body":"## LWJGL 3 backend\r\nI just committed the first iteration of the new LWJGL 3 backend. Going forward, i hope this can largely replace the old LWJGL 2 backend, especially on Mac OS X where we have a lot of problems with LWJGL 2. The new backend is also prepared for multi-window environments, altough respective methods in `Lwjgl3Application` haven't been exposed yet.\r\n\r\nThe LWJGL 3 backend is structure the same way as the LWJGL 2 backend, including the main module in `backends/gdx-backend-lwjgl3` and a test module in `tests/gdx-tests-lwjgl3`. Everything is wired up with Maven and Eclipse projects so you can test things. I also wired it up with our Ant build, haven't tested that one at all.\r\n\r\nIt would be amazing if you guys could help test this. I already build snapshots for the new backend, and all the code is merged with master. You can easily switch out the LWJGL 2 backend for the LWJGL 3 backend in Gradle. In your `core` projects dependencies, change:\r\n\r\n```\r\ncompile \"com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion\"\r\n```\r\n\r\nto\r\n\r\n```\r\ncompile \"com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion\"\r\n```\r\n\r\nMake sure `gdxVersion` is set to the latest snapshot version `1.7.3-SNAPSHOT`. In your desktop launcher, simply replace `LwjglApplicationConfiguration` and `LwjglApplication` with `Lwjgl3ApplicationConfiguration` and `Lwjgl3Application`. That's it.\r\n\r\n### Not implemented yet\r\n- [ ] Window refresh callback for nicer resize\r\n- [x] HDPI support. Works out of the box on mac os x, but need to scale mouse coords accordingly. They are reported in logical coords, whereas `Graphics` reports framebuffer size now.\r\n- [x] Screen mode change related functions in [Lwjgl3Graphics](https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-lwjgl3/src/com/badlogic/gdx/backends/lwjgl3/Lwjgl3Graphics.java#L163). Just haven't gotten around implementing those. Note that when changing the screen mode (e.g. window -> fullscreen), GLFW returns a new window handle. `Lwjgl3Input` and `Lwjgl3Graphics` need to re-register all the GLFW callbacks in that case with the new window handle.\r\n- [x] Clipboard support without AWT on Mac OS X\r\n- [x] Fix fullscreen toggling. On Mac OS X, the first windowed -> fullscreen switch fails in weird ways, e.g. clearColor has an effect, but rendering doesn't. Subsequent fullscreen -> fullscreen switches work as intended (but those use `glfwSetWindowSize` instead of creating a new window). On Window (10) fullscreen switching doesn't work at all on HDPI monitors, need to test on normal monitors. [Bug for Windows](https://github.com/glfw/glfw/issues/676), [Bug for Mac OS X](https://github.com/glfw/glfw/issues/680). Should be resolved in GLFW, libGDX side does the proper thing.\r\n- [x] Custom cursors in `Lwjgl3Graphics`. Haven't checked how to do that yet.\r\n- [x] Application icon support. This needs to be covered via tools like [PackR](https://github.com/libgdx/packr)\r\n- [x] Platform-specific multi-window API (`Lwjgl3Application#newWindow(ApplicationListener, int width, int height)/newWindow(ApplicationListener, DisplayMode)`).\r\n- [x] Controller support. GLFW comes with its own controller API, should be simply to add that to the controllers extension. There's a [bug](https://github.com/glfw/glfw/issues/601) on Windows in GLFW, where all gamepads are reported by the same name. This makes mapping controller types impossible.\r\n- [x] OpenGL 3.0 support. We should only need to add that to `Lwjgl3Application#createGlfwWindow`. The `Lwjgl3GL30` implementation is prepared, except for `Lwjgl3GL30#glGetBufferPointerv`\r\n- [ ] Mac OS X (potentially Windows and Linux too): glfwSwapBuffers doesn't block in windowed mode if app window is fully behind other window or minimized. [Bug](https://github.com/glfw/glfw/issues/680) with GLFW. Could \"fix\" it in our own code.\r\n- [ ] [Lwjgl3Input#getTextInput()](https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-lwjgl3/src/com/badlogic/gdx/backends/lwjgl3/Lwjgl3Input.java#L240), can't call into Swing/AWT\r\n- [ ] Non-continuous rendering in `Lwjgl3Graphics`. It's a bit of a bitch. `Lwjgl3Input` will already call `Graphics#requestRendering()` in case new input events arrive\r\n- [ ] Make OpenALAudio thread-safe, put the update on a separate thread\r\n\r\n### Known Issues\r\n  * LWJGL 3 is based on GLFW. GLFW and AWT don't play nice with each other. Calling Swing/AWT stuff is thus not possible at the moment.\r\n  * On Mac OS X, you need to pass the JVM argument `-XstartOnFirstThread` when starting your app. We may be able to fix both things to some extend.\r\n  * If you use the multi-window API, understand that any `Runnable` you post via `Gdx.app.postRunnable()` may be executed in such a way that the statics in `Gdx`, like `Gdx.graphics` may point to a window other than the one for which the runnable was posted.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/libgdx/libgdx/issues/comments/172505353","html_url":"https://github.com/libgdx/libgdx/issues/3673#issuecomment-172505353","issue_url":"https://api.github.com/repos/libgdx/libgdx/issues/3673","id":172505353,"user":{"login":"thomasleese","id":510498,"avatar_url":"https://avatars.githubusercontent.com/u/510498?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasleese","html_url":"https://github.com/thomasleese","followers_url":"https://api.github.com/users/thomasleese/followers","following_url":"https://api.github.com/users/thomasleese/following{/other_user}","gists_url":"https://api.github.com/users/thomasleese/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasleese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasleese/subscriptions","organizations_url":"https://api.github.com/users/thomasleese/orgs","repos_url":"https://api.github.com/users/thomasleese/repos","events_url":"https://api.github.com/users/thomasleese/events{/privacy}","received_events_url":"https://api.github.com/users/thomasleese/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T11:42:14Z","updated_at":"2016-01-18T11:42:14Z","body":"@badlogic Thanks. After some investigation I've discovered that the issue happens when I call `begin()`/`end()` on a `FrameBuffer`. I'm not too familiar with how frame buffer objects work underneath, could they be calling that, and then I need to reset it at the end?"}}