Hi,
I need any advice to squeeze more performance out of my application. My app receives a 2-d array of doubles, from which I need to create an image. It receives a new array once every second. This image is then continuously rendered (trying to maintain 30fps) to a JPanel, each frame scrolling down. (i.e. to represent a top-down view of the ground scrolling by).
I am currently converting the 2-d array of doubles to a 2-d array of int pixels, then create a BufferedImage (TYPE_INT_ARGB) and call setRGB with the int array.
Then another thread is calling repaint() which scrolls the image at the desired fps. From what I can gather from this forum is that I may not be getting accelerated images, and that would greatly increase the painting of the image each frame. Is there a way to create an accelerated image from this int array (as opposed to loading it from a file)?
Any help is appreciated,
Cory