I am fairly new to both Processing and iGeo and for the life of me I cannot figured out how to take a simple screenshot of the canvas properly.
Take for instance the code below: I am creating a bunch of random points one by one on XY plane.
At each update iteration/duration I want to capture a screenshot to make a gif file afterward.
When I run the code, I will either get the "com.jogamp.opengl.GLException: GL-Error 0x502" or the generated screenshots will be all black with no objects in it.
I can, as a last resort, create a keyPressed function with the save/saveFrame method inside to capture screenshot on key press and that works, but it seems extremely counter intuitive. What am I doing wrong? What is the proper method to capture screenshot sequentially with iGeo?
I am using iGeo 0.9.4.1 and Processing 3.5.4 on Python mode.
I am fairly new to both Processing and iGeo and for the life of me I cannot figured out how to take a simple screenshot of the canvas properly.
Take for instance the code below: I am creating a bunch of random points one by one on XY plane. At each update iteration/duration I want to capture a screenshot to make a gif file afterward. When I run the code, I will either get the "com.jogamp.opengl.GLException: GL-Error 0x502" or the generated screenshots will be all black with no objects in it.
I can, as a last resort, create a keyPressed function with the save/saveFrame method inside to capture screenshot on key press and that works, but it seems extremely counter intuitive. What am I doing wrong? What is the proper method to capture screenshot sequentially with iGeo? I am using iGeo 0.9.4.1 and Processing 3.5.4 on Python mode.
the code:
add_library('igeo')
def setup():
class RandPoint(IAgent):