So I’m working on updating a very old app. The behavior I’m aiming for is to:
- Draw a filled map to the screen
- Immediately save the screen to an image
- Clear Screen
- Draw outline of map
- Use saved filled map in ofImage to have boids move around inside the map.
However, it seems like I can’t get the grabScreen to save the image data. I think it is a timing issue where the drawing isn’t happening by the time the grabScreen is called. All of this is running in the draw loop using a boolean flag that is reset when a new map is loaded.
Should I be using an FBO instead? Or is there another method for drawing off screen? I’ve tried to test this quickly but am running into other issues get FBO and malloc errors.