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 › opengl->p3d texture fill/tint not functioning
Page Index Toggle Pages: 1
opengl->p3d texture fill/tint not functioning (Read 1995 times)
opengl->p3d texture fill/tint not functioning
Mar 1st, 2007, 11:54pm
 
he code below uses an image (with white fill text and a transparent background) as a texture for a QUAD and uses the fill method to fill the white area green. how would i make the same program using p3d? p3d seems to ignore both the tint and fill methods.

import processing.opengl.*;

PImage t, ti;

void setup()
{  
 ti = loadImage("TEST.png"); //an image with white fill text and a transparent background
 size(ti.width,ti.height,OPENGL);
 
 t = createImage(ti.width, ti.height, ARGB);  
 t.copy(ti, 0, 0, ti.width, ti.height, 0, 0, ti.width, ti.height);  
}

void draw()
{
 background(255);
 
 beginShape(QUADS);
 texture(t);
 fill(0,255,0);
 vertex(0,0,0,0);
 vertex(t.width,0,t.width,0);
 vertex(t.width,t.height,t.width,t.height);
 vertex(0,t.height,0,t.height);
 endShape();
}
Re: opengl->p3d texture fill/tint not functioni
Reply #1 - Mar 5th, 2007, 1:31am
 
fill changes the color of the texture (with white filled text and a transparent background) in opengl but tint doesnt and in p3d neither fill or tint change the color of the texture. is this a bug? or am i doing something wrong?
Re: opengl->p3d texture fill/tint not functioni
Reply #2 - Mar 5th, 2007, 5:17am
 
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Syntax;action=display;num=1122315610
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=OpenGL;action=display;num=1163449259
Page Index Toggle Pages: 1