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
texture() (Read 352 times)
texture()
Sep 24th, 2006, 8:35pm
 
hi, i'm totally new to this, so it's a ultra-basic question..

when i try to excute this;


noStroke();
PImage a = loadImage("arch.jpg");
beginShape();
texture(a);
vertex(10, 20, 0, 0);
vertex(80, 5, 100, 0);
vertex(95, 90, 100, 100);
vertex(40, 95, 0, 100);
endShape();

it shows an error message like;
texture() can only be used with opengl and P3D

however, this exemple is from the reference, and i placed the image file in the good folder with good size...

in the reference, they don't talk about opengl or P3D..

is this a bug???
Re: texture()
Reply #1 - Sep 24th, 2006, 8:46pm
 
Add

size(100,100,P3D);

http://processing.org/reference/size_.html
Re: texture()
Reply #2 - Sep 25th, 2006, 2:50pm
 
sorry, that line was also missing from the reference, i've just added it for the next release.
Re: texture()
Reply #3 - Sep 25th, 2006, 7:45pm
 
thanks guys..
it was so simple...next time with a better(?) question..
cheers
Page Index Toggle Pages: 1