Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : Processing 2.0 video alpha channel

$
0
0
Hello Akiersky 
thank you very much for your code !
I'm trying to use it but I don't get it. I think I do it in a very wrong way > 

  1. import processing.opengl.*;
  2. import codeanticode.gsvideo.*;
  3. import codeanticode.glgraphics.*;
  4.  BGvideo bgv = new BGvideo ("marsRVBA.mov",app);
  5. void setup(){
  6.   size(640,480);
  7. }

  8. void draw(){
  9. bgv;
  10.   background(34,231,90);
  11. }

  12. public class BGvideo {

  13.   GSMovie myMovie;
  14.   GLTexture tex;

  15.   public BGvideo (String videoFile, PApplet app) {

  16.     app.registerDraw(this); 

  17.     myMovie = new GSMovie(app, videofile );
  18.     tex = new GLTexture(app);
  19.     myMovie.setPixelDest(tex);
  20.     myMovie.loop();
  21.   }
  22.   public void draw () {
  23.     myMovie.read();
  24.     if (tex.putPixelsIntoTexture()) {
  25.       background(255, 0, 0);
  26.       image(tex, 0, 0, 1920, 487);
  27.     }
  28.   }
  29. }



Viewing all articles
Browse latest Browse all 1768

Trending Articles