Does anybody has experience with GLGraphicsOffScreen and the save? It produces me empty files. At least with the given dimension.
I am using like:
- GLGraphicsOffScreen offscreen = new GLGraphicsOffScreen(this, 200, 200);
- offscreen.beginDraw();
- // ... draw into the offscreen
- offscreen.endDraw();
- // and then wanting to save it produces empty files
- offscreen.save("file.png");
- // using the getTexture does not works as well
- offscreen.getTexture().save("file.png");
I am not sure wether the content should be copied from the internal texture to the PImage inside the GLGraphicsOffscreen object to be able to see it? At least that is my guess why this does not works.
- // this does not works as well
- // i thought one has to copy the data from the opengl texture to the PImage property inside the GLGraphicsOffScreen object
- offscreen.loadPixels();
- offscreen.loadTexture();
- offscreen.save("file.png");
- offscreen.updatePixels();
Thanks in advance.
1