Add background image below the video
in
Contributed Library Questions
•
8 months ago
Can anyone tell me why this doesn't works? (Curtain.mov is video with alpha channel)
- import processing.opengl.*;
- import codeanticode.glgraphics.*;
- import codeanticode.gsvideo.*;
- GSMovie movie;
- GLTexture tex;
- GLTexture back;
- void setup() {
- size(1280, 720, GLConstants.GLGRAPHICS);
- movie = new GSMovie(this, "Curtain.mov");
- back = new GLTexture(this, "tiles.jpg");
- tex = new GLTexture(this);
- movie.setPixelDest(tex);
- movie.loop();
- }
- void movieEvent(GSMovie movie) {
- movie.read();
- }
- void draw() {
- image(back, 0, 0);
- if (tex.putPixelsIntoTexture()) {
- image(tex, 0, 0);
- }
- }
1