What is the fastest way to draw pixels in Java

前端 未结 5 2036
无人共我
无人共我 2020-12-28 23:52

I have some code that generates particles at random locations, and moving in random directions and speed.

Each iteration through a loop, I move all the particles, an

5条回答
  •  独厮守ぢ
    2020-12-29 00:14

    I think the direct pixelmanipulation via the databuffer of the bufferedimage is the fastest way to draw something with the standard-library because you reduce the graphics object overhead to a minimum.

    But as Perception said if you want to display 100'000 particles or more you should consider the GPU programming with OpenCl.

    LWJGL for a small and easy to use Java-OpenGL/CL/AL binding

提交回复
热议问题