What are some faster alternatives to Java2d?

后端 未结 4 1261
一向
一向 2021-02-12 23:14

I\'m looking to do some physics simulations and I need fast rendering in Java.

I\'ve run into performance issues with Java2d in the past, so what are the fast alternativ

4条回答
  •  感情败类
    2021-02-12 23:35

    JOGL might be much faster than Java2D even if you use it for doing 2D graphics only: as Clayworth mentioned, it usually depends on what you need to do.

    My guess is that for 2D physical simulations, where you have (textured or non-textured) objects rotating and translating with 2 degrees of freedom, JOGL should provide the best performance and also easily allow you to provide a zoomable interface. Here is a tutorial for OpenGL for 2D graphics (C, but easily adapted to JOGL).

    JOGL will take a bit more time to learn than Java2D, but achieving good performance will most probably not require specialized optimizations as in Java2D.

提交回复
热议问题