source: osm/applications/editors/josm/plugins/lwjgl/README.md@ 36173

Last change on this file since 36173 was 35947, checked in by taylor.smock, 3 years ago

lwjgl: Improve debugging instructions

  • Property svn:eol-style set to native
File size: 1.7 KB
Line 
1# README
2
3A plugin which provides lwjgl libraries for plugins.
4The plugin source code is under the GPL v2 or later.
5
6It is "split" into platform-specific plugins:
7* Each platform has its own "native" jar (if a
8 platform supports more than one architecture,
9 all architectures are in the jar file)
10
11## Adding additional LWJGL libraries
12Open a ticket on [JOSM Trac](https://josm.openstreetmap.de/newticket?cc=taylor.smock&keywords=lwjgl&component=Plugin)
13with a request for the LWJGL library (note: to be eligible for this plugin, it
14must be something recommended by LWJGL).
15
16While not necessary, it would be nice to have a use case for the LWJGL that is
17being added.
18
19## Debugging
20Depending upon what needs to be debugged, you can either start JOSM with the `--debug` flag _or_ you can start JOSM
21with the VM argument `-javaagent:lwjglx-debug-1.0.0.jar` (see [lwjglx-debug](https://github.com/LWJGLX/debug)),
22assuming you've customized the JOSM build process to include the `lwjgl` core module, like so:
23```xml
24 <dependency conf="api->default" org="org.lwjgl" name="lwjgl" rev="${lwjgl.version}">
25 <artifact name="lwjgl" type="jar"/>
26 </dependency>
27```
28Replace `${lwjgl.version}` with the version in ivy\_settings.xml. This is due to the javaagent requiring
29`org.lwjgl.system.Configuration` to be available immediately, which it is not until JOSM loads the `lwjgl` plugin.
30
31
32You will most likely encounter issues where the application fails due to
33`No OpenGL context has been made current through recognized API methods (glfwMakeContextCurrent).`
34
35See [LWJGLX debug #29](https://github.com/LWJGLX/debug/issues/29#issuecomment-985176717) for a workaround.
36It pretty much comes down to manually setting the context.
Note: See TracBrowser for help on using the repository browser.