Summary:
It looks like past frames that I render with GLGraphics (regardless of whether I use GSVideo), show up when I run projects that play GSVideo by copying to a GLGraphics texture.
Setup:
Sun Java 1.6.0_26
Ubuntu 11.10
Gnome 3
GSVideo + GLGraphics 1.0.0
Details:
Suppose I first run a project that renders a simple cube rendered in GLGraphics:
- import processing.opengl.*;
- import codeanticode.glgraphics.*;
- void setup() {
- size(640, 480, GLConstants.GLGRAPHICS);
- }
- void draw() {
- background(0);
- fill(255, 100, 130);
- pushMatrix();
- translate(130, height/2, 0);
- rotateY(1.25);
- rotateX(-0.4);
- box(100);
- popMatrix();
- }
This works as normal:
I can also run the
GSVideo/Movie (without using GLGraphics) example and it works as normal:
If I close the pink cube and then run the
GSVideo/GLGraphics/Movie example, then I get this:
Note that there is no longer any code about a pink cube, but this is what I see every other frame. Every other frame is normal (i.e. black where the pink cube is).
If I close the GSVideo/GLGraphics/Movie example and next run the
GLGraphics/Texture/GLBlendModes example, it again appears normal like this:
Now I run
GSVideo/GLGraphics/Movie again and I get some lovely post-modernist video art (this time every frame, as far as my eye can tell):
Any suggestions? It is quite the amusing and frustrating bug, I must say. I feel like I ought to be able to force-clean the buffer or something, but the GSVideo javadocs can't tell me if that's possible. In my actual project, the residual problem shows up as past frames of the same movie ghosting over current running frames (you get flashing humans with 12 arms, for example.)
Thanks in advance!
1