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.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › Video + Text  not working with OPENGL
Page Index Toggle Pages: 1
Video + Text  not working with OPENGL (Read 645 times)
Video + Text  not working with OPENGL
May 9th, 2006, 10:57pm
 
Hi,

I'm trying to simply add a layer of text on top of a video stream.

This is not working when using OPENGL.
The video is duplicated in every letters....strange.

Here is the code - I merged two of the examples published by Reas:

Quote:


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

Capture camera;
PFont fontA;
int x = 30;

void setup()
{
 size(200, 200, OPENGL);
 String s = "Logitech QuickCam Pro 3000-WDM";
 camera = new Capture(this, s, width, height, 30);

 fontA = loadFont("ArialMT-48.vlw");
 textFont(fontA, 32);


}

void captureEvent(Capture camera)
{
 camera.read();
}

void draw()
{
 image(camera, 0, 0);
 // Use fill() to change the value or color of the text
 fill(0);
 text("ichi", x, 60);
 fill(51);
 text("ni", x, 95);
 fill(204);
 text("san", x, 130);
 fill(255);
 text("shi", x, 165);
}




Remove the OPENGL and it will work, but of course I need to use OPENGL.

Any ideas ?

Thanks,
Re: Video + Text  not working with OPENGL
Reply #1 - May 10th, 2006, 3:30am
 
Fixed for version 114 I believe.  If you havent downloaded 114 already, give it a shot.

-robert

Re: Video + Text  not working with OPENGL
Reply #2 - May 10th, 2006, 4:06am
 
Shame on me Smiley

I should have mentioned the version I was using (109) and I should have tested in the latest version.

Thanks Robert, it works great under 114.

Hugues.
Page Index Toggle Pages: 1