New Java 2D engine, replacing JOGL/Swogl

JOGL and Swogl are both great libraries, bringing the power of OpenGL to the Java desktop. However, we have experienced problems when it comes to high quality text rendering. OpenGL does not support text rendering at all. But JOGL provides some experimental workarounds, some of them looking quite promising (like the GPU accelerated Text Demo). Nevertheless we wanted to switch to a much more stable graphics library to minimize the effort of graphics programming and spend more time for music notation issues.

We had a look on JavaFX, which also looks promising, but still has a long way to go to be ready for read world-applications. Qt is great, but the Qt Java binding is outdated and more or less dead. One evening when we tried Java 2D / AWT again, we were surprised by its speed. Back in the days when we began to work on Zong!, it was incredibly slow, but its performance has been greatly improved in Java 6 (and maybe 7). Now we are able to paint pages with about 1500 musical symbols (SVG paths) with about 30 frames per second! Welcome back, AWT 🙂

Here is a new screenshot of the Zong! Editor, showing some symbols and text, which are now rendered sharply at each zoom level:


11 thoughts on “New Java 2D engine, replacing JOGL/Swogl

  1. Ivan

    I was thinking of using JavaFX for a similar purpose. What problems did you find with it, besides it being relatively new?

    And any timeline for Zong Editor or Viewer being open-sourced?

  2. Andi

    Hi Ivan. JavaFX is currently no option for many reasons. It lacks support for a number of GUI components, there is no support for drawing paths (musical symbols), there is no support for printing (on the other side we can reuse our Java2D graphics engine for both printing and exporting into PDF!), it is slower than Swing, it is highly experimental and untested, and so on. It may be a good successor for Swing in the future, but I’m quite sure it will not be useful for Zong! within the next two years at least.
    There is no timeline for open-sourcing the Zong! Editor yet (Zong! Viewer is open source already!). Maybe we will do that in summer, but it depends on my other projects which are financing the work on Zong!.

  3. Ivan

    Thanks for the info! By drawing paths, do you mean SVG files?JavaFX has limited SVG capabilities in the SVGPath class and converters such as the svg_to_fxml_converter in e(fx)clipse, Batik, and svgsalamander.

  4. Andi

    The main problem is, that I am tired of using experimental techniques. I really want to focus on music notation and not on GUI framework issues. However, SVGPath looks interesting. Do you know any demo application using it?

  5. Andi

    Thanks for the links. Yes, I’d like to stay in touch with you about your progress with JavaFX in your app 🙂 The mail address you mentioned above is correct.

  6. Anonymous

    Your post is not very accurate about JOGL 2.0, it has several text renderers and anyway, lots of 3D engines using it has their own text renderers. Your software is now bound to AWT which is a bad piece of news if you plan to support Android or iOS one day.

  7. Andi

    I don’t need several text renderers. I need a single one that is good. JOGL’s text renderers are sufficient for games, but I think they are not made for programs dealing with lots of text and different fonts.
    Android is already supported and will be supported in the future. AWT is just one renderer, Android is another. iOS will be supported later by a (HTML-based) web viewer.

  8. Pingback: Sprint 68 finished | Zong!

Leave a Reply

Your email address will not be published. Required fields are marked *