views:

128

answers:

4

I am looking for a high-end graphics library for Java Standard Edition. I know some fairly low-level libraries: AWT/Swing, JOGL, SDL. Are/is there an alternative?

My requirements are (atleast):

  • Anti-aliased
  • Fullscreen support
  • Alpha channel
  • Blend modes and Z-depth
  • Rasterized Effects: (motion) blur, glow, gloom, etc.

And, optionally:

  • Hardware acceleration
  • Vector graphics (scale/rotate/translate in floating point precision)
  • Well documentated, easy to get started.

I understand if there are no libraries/frameworks matching all requirements, if so, can you comment on how well it's extendible?

Edit:

Are there any other alternatives besides Processing? Is Processing usable (and easy?) as a library?

A: 

Take a look at http://processing.org

jedierikb
+1  A: 

Maybe Processing (homepage) can be a good tradeoff.

  • it has 4 kinds of backing, including OpenGL
  • it has AA
  • it is 2d or 3d
  • it supports hw acceleration
  • it supports transformations
  • its syntax is quite easy to learn
  • it's easily embeddable
  • everything you need to learn is in this page
Jack
Can processing be used as a library?
Pindatjuh
+1  A: 

Not really a graphics library but rather an advanced applet AND graphics library: PulpCore

Be sure to grab a quite recent version (maybe even fetch the source via mercurial and build it yourself) because the filter effects you mentioned (blur etc.) aren't available in earlier versions. I know it might not be exactly what you're looking for; it is not a processing alternative, but it might be the better choice, depending on what you're planning to do.

Tedil
Excellent! Thank you very much, exactly what I need!
Pindatjuh
+1  A: 

All of the effects you ask for can be done with Java 2D fairly simply and Java2D is to some degree hardware accelerated. The book Filthy Rich Clients shows how to implement all of these effects and many others. Painters in the SwingX has also implemented several of these effects.

Another possibility is JavaFx. It has a lot of effects built in. A year and a half ago when I tried it, it was still a little slow, but at least one version has been released since then. It may be more performant now. It's built on top of Java2D, so it should be able to take advantage of the hardware acceleration in Java2D.

As far as full screen support here's more information.

Jay Askren