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 › Pgraphics3 not working
Page Index Toggle Pages: 1
Pgraphics3 not working (Read 659 times)
Pgraphics3 not working
Oct 25th, 2005, 4:44pm
 
Hi there,

I have an issue with PGraphics3. Its not working for me at all and of course its me, but I cant figure out how to get it to run.
Please check the following code:
Code:

import processing.opengl.*;

PGraphics3 p;

void setup()
{
size(400,400, OPENGL);
p = new PGraphics3(200,200, null);
p.defaults();
}

void draw()
{
background(#0000FF);

p.tint(255,0,0); // nope
p.fill(color(255,0,0,100)); // nope
p.stroke(#FF00FF); //yes!
p.strokeWeight(10); //nope
p.line(10,10,190,190);
image(p,100,100);
}


My goal is to have a by default transparent Pgraphics3 Image and draw on that on top of other stuff.

Manuel






Edit:

what is happening here??
Use P3P instead of size, its ok as usual....

Code:

import processing.opengl.*;

PImage test;
PGraphics3 maske;
void setup()
{
size(400,400, OPENGL);
test = new PImage(200,200);
maske = new PGraphics3(200,200,null);
maske.defaults();
}

void draw()
{
for(int i=0;i< 200*200;i++)
{
test.pixels[i] = #FF0000;
}
maske.fill(#00000F);
maske.rect(10,10,100,100);

test.mask(maske);
test.updatePixels();
image(test, 100,100);
}
Re: Pgraphics3 not working
Reply #1 - Oct 27th, 2005, 8:14pm
 
Pleeeeease someone help this newbie!
Page Index Toggle Pages: 1