We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello guys, I was trying PDE X mode, and it works great. The variable inspector saved my life!!
The next question is comfortably ambitious and maybe it is not possible depending on how Processing works, but, is it possible to render the frame instruction by instruction, rather than every draw()
execution?
Answers
You mean, see what's happening just after each drawing command? :-??
I did that once.
you can make a virtual screenshot after each instruction and after 10 secs or so stop this state and go to another state where the screenshots are shown one after the other from an ArrayList here you could even go to next and prev image.
I suppose it is possible, by maintaining a drawing cycle independent of the main one, mimicking all the drawing instructions on a separate PGraphics. It would be useful, but would need some work!
Virtual screenshot is just
saveFrame()
function?I've noticed that, while debuging, the frame only updates when the draw() function has ended. Do you mean it is possible to refresh the frame by using a separate PGraphics?
you could use saveFrame()
what I meant
what I meant was something like
PImage newMountains = get();
you could store them in an ArrayList without using saveFrame()
then you need a method to finish this part of the sketch and to look at the images.
Since the frame only updates when the draw() function has ended, you could look at the images by using the ArrayList.
example
this is a program where you can't see the lines grow down the screen (since the frame only updates when the draw() function has ended) :
The second version
The second version provides a means to see the single images (after the old draw has ended):
Comments:
With the 2nd approach you can see the lines grow down.
The most important line is line 27.
With the 2nd approach you can easily use cursor keys to go back and forth within the saved images.
The images are not stored on the hard drive.
Greetings, Chrisir ;-)
This is the version where you can use cursor keys to go back and forth within the saved images.
Thanks Chrisir!! I'll try it! :)