So I have the following code :
My question is where should I load the matrix with pixels to read it only once.Because with my actual code is reader as much as the program is not closed.(BTW i’m noob at java).
So I have the following code :
My question is where should I load the matrix with pixels to read it only once.Because with my actual code is reader as much as the program is not closed.(BTW i’m noob at java).
I dont really understand what you wan
t to achieve. :persecutioncomplex:
The code continue to read the image but never stops.
I want it to read that file only once
You will need to move
int[][] pix = new int[6][6];
read_file(pix);
outside of the render function.
The best place to put it would be in the init function.
I agree with JohnyCilohoka, move the read_file(pix), outside the render loop.
Thanks.Fixed!!