We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Video and PImage in OPENGL (Read 652 times)
Video and PImage in OPENGL
Dec 6th, 2005, 2:53am
 
Hello

Ive been working on a project that requires a video capture and the use of PImage. It seems I may have found a bug that occurs whenn the two are used together in OPENGL. If anyone can help me I'd really appreciate it.

Here is some simple code that will produce the problem on my computer. When I play this code it seems mycapture and img get mixxed up, witht myCapture playing where PImage is called. very weird. Id be interesed to see if anyone has simlar results, or maybe I need to update QT or something.




import processing.video.*;
import processing.opengl.*;

Capture myCapture;

PImage img;
void setup(){
size(300,300,OPENGL);
//println(Capture.list());
 String s = "Logitech QuickCam Pro 4000-WDM";
 myCapture = new Capture(this, s, width, height, 30);

img=loadImage("atoms.jpg");
}


void draw(){
background(0);
image(myCapture, 0, 0);
image(img,100,100);
}


void captureEvent(Capture myCapture) {
 myCapture.read();
}
Page Index Toggle Pages: 1