Experimenting with a new way to render images, trying to understand what notch did with his rendering which is quite popular for Java games now, I’m slightly confused on how this bit of code is working.
BufferedImage image = new BufferedImage(WIDTH, HEIGHT,
BufferedImage.TYPE_INT_ARGB);
int pixels[] = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
and then..
render(Graphics g){
g.drawImage(image..etc)
}
How is editing pixels affecting image?