Reputation: 6307
I'm making a particle engine in Java, and right now I'm using a subclass of java.awt.canvas
. I'm using canvas.getBufferStrategy().getDrawGraphics()
and then, when I'm done, using canvas.getBufferStrategy().Show()
.
Now that I've got some particles (graphics.fillOval(...)
) - I need to do some additive blending! Problem is, I can't find additive blending anywhere (googled). What I came up with from a google search is open gl through jogl. jogl would be a great move from graphics, since I have change the graphics color thousands of times a tick, and I can't find additive blending, but I'm just unsure as to whether or not jogl is standard and works on all (or most) computers.
Any thoughts or suggestions are welcome.
Upvotes: 2
Views: 264
Reputation: 205795
You may want to consider AlphaComposite
, as shown in this kinetic model.
Addendum: This utility may be helpful in visualizing the effect of various compositing rules.
Upvotes: 3