Hi,
Thanks for the comment.

The main problem I have with the Icons is the packing. I don't want to
use a single texture for every icon, since a texture switch is
expensive. This can be solved, I already did that in jsettlers and can
probably copy some code. The main problem would be to find the icons to
pack together on a texture. Icon drawing is already in the current code
(if there was a texture present, you could just draw a quad and supply
UV coordinates).

I also have not yet looked at the text-along-line feature. If it is that
simple, I will add it. I never did rotated text with JOGL. Changing the
rotation matrix for every call is expensive and JOGL does not expose
it's backing texture. So we might need to copy some of JOGLs text
drawing (which is basically to use Java2D to draw the text onto a
texture and then use that texture on the screen). That way, we could use
VBOs, get a really fast text drawing and can rotate every letter as we
want to.

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. 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, ...). But it might also just need some
more tweaking.

Michael

Am 23.03.2015 um 15:19 schrieb Paul Hartmann:
> On 17.03.2015 11:41, Michael Zangl wrote:
>> Thanks for the feedback on my idea. Based on the feedback and the tests
>> I made the past few days, I wrote a GSoC application.
>>
>> http://www.google-melange.com/gsoc/proposal/public/google/gsoc2015/michaelz/5750085036015616
>>
>>
>> Feel free to leave feedback/your thoughts on this.
> 
> The comment section on the Melange platform doesn't seem to be public,
> so I post it here again:
> 
> Nice application! I'm all for setting realistic, achievable goals. But I
> was impressed, how much you could do in a small time, and hoped, you
> would aim for a full (or nearly full) replication of the Java2D
> rendering. A display without icons is kind of pointless, we don't need
> another Wireframe mode! Also, the "text along line" feature is an
> integral part of the standard style by now, and I wouldn't want to miss it.
> 
> Keep in mind, that you don't have to implement everything from scratch:
> As long as you can draw individual letters on screen, it should be
> possible to build on the existing code for "text along line". Yes, this
> often sounds simpler than it actually is, but you could at least put in
> on the agenda as a secondary goal.
> 
> I have looked at your code and was surprised, how complicated it is, to
> even draw a simple line. This makes me wonder: Have you investigated any
> higher level libraries, that offer a Java2D-like interface with a JOGL
> backend? First thing I found was this GLG2D [1]. I know you want to use
> VBO caching and other low-level techniques, but at least you could copy
> & paste some existing code, to make life easier.
> 
> Another big issue I have with your proposal, is that you seem to settle
> with a hard switch between JOGL and Java2D. I.e. either every layer and
> paint mode must support OpenGL or it isn't used at all. I think this is
> not really desirable as it restricts the usage a lot. It makes this a
> toy project and technology show-off, when it could be a general turbo
> mode that just works for basically every user (with fairly modern
> hardware).
> 
> You should investigate, how this can be fixed (can be during the work
> period). One option would be a Java2D->JOGL bridge like GLG2D.
> Alternatively, it seems to be possible to mix JOGL and Java2D in certain
> ways [2]. What are the performance implications? If you come to the
> conclusion, that it is not possible at all, this is fine, but the
> results should be documented properly.
> 
> [1] https://github.com/brandonborkholder/glg2d
> [2] http://www.java-gaming.org/index.php?topic=10813.0
> 
> 
> 
> _______________________________________________
> josm-dev mailing list
> josm-dev@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/josm-dev


_______________________________________________
josm-dev mailing list
josm-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/josm-dev

Reply via email to