[josm-dev] Fwd: GSoC: OpenGL view for JOSM
Michael Zangl
openstreetmap at michael.fam-zangl.net
Wed Apr 15 13:30:22 UTC 2015
Hi,
Am 15.04.2015 um 12:42 schrieb Paul Hartmann:
> On 23.03.2015 17:32, Michael Zangl wrote:
>> Using GLG2D is a good idea. I might just add that for all unsupported
>> layers. Although I cannot add it for drawing unsupported things on the
>> OSM layer, it should make most plugins compatible with OpenGL.
>
> I wouldn't rely on it too much yet (without testing). There can be all
> kinds of complications with this library.
This is why I did not add it to the goals of this project. If it works
as promised, it should be pretty easy to set everything up and just call
the paint methods of unsupported layers. If there are problems with it,
we can see how much work it would take to get it working and then set
priorities (e.g. instead of supporting the image background layer, we
support a generic Java2D layer and use it to draw the image background
layer; would probably be slower than native, if it is supported by
GLG2D: [2,3]).
>> Drawing Swing components on top of JOGL and the other way around is an
>> option I
>> don't like, since it went wrong the last time I tried it (mouse events
>> not beeing captured correctly, ...).
>
> Could you report the problem to JOGL, so they can fix it in the meantime
> (or offer a workaround)?
This was two years ago. JOGL has evolved a lot in this period and they
probably already fixed that specific issue. We found a workaround that
time (simply rendering everything using OpenGL). I have not tested
drawing transparent elements since, so I do not know how reliable this
is now. In my current tests, the drop down menus were rendered above the
JOGL panel correctly and mouse events worked the way they should.
Those are two options to solving the compatibility issue, especially
with custom/special layers and other overlays on the map area. My main
goal is to support a nice and fast MapCSS rendering and the default JOSM
features. Plugin compatibility would be a nice thing to have, but I
don't want to promise anything there, mainly because I do not know how
those plugins interact with JOSM and how much they rely on the map view
supporting Java2D. Every plugin that does not change the map view should
still work fine ;-).
I am ignoring wireframe mode since the MapCSS style computation code is
pretty advanced and fast (although one could still squeeze some
milliseconds out of it [1]). A simple MapCSS style could replace the
wireframe mode (if required).
Regards,
Michael Zangl
[1]
https://github.com/michaelzangl/josm/commit/ea5aec8103e1b28905245cbbcc99646aed4f157f
[2] http://brandonborkholder.github.io/glg2d/implementationstatus.html
[3]
https://github.com/brandonborkholder/glg2d/blob/master/src/main/java/org/jogamp/glg2d/impl/AbstractImageHelper.java#L164
More information about the josm-dev
mailing list