Hi Basil,
Can you explain in a bit more details what you are trying to do?
Unfolding is using an offscreen buffer itself (if inititated with GLGraphics), and you can use the texture directly. Maybe you are doing that already - not completely sure what you mean by
screen buffer.
Here's how you can get the current map from its internal offscreen buffer.
- PGraphics pg = map.mapDisplay.getPG();
- if (pg instanceof GLGraphicsOffScreen) {
- screenshot = new PImage((int) map.mapDisplay.getWidth(), (int) map.mapDisplay.getHeight());
- ((GLGraphicsOffScreen) pg).getTexture().getImage(screenshot);
- } else {
- // just in case the map is not using glgraphics
- screenshot = pg.get();
- }
If you want to get the texture without drawing the map on screen, you need to write your own MapDisplay subclass and implement getPG() and potentially postDraw() yourself. If that's the case, let me know, and I can give you some pointers.