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 › specifying per-vertex color for filling quads
Page Index Toggle Pages: 1
specifying per-vertex color for filling quads (Read 1255 times)
specifying per-vertex color for filling quads
Jun 3rd, 2009, 11:32am
 
is it possible to give each vertex of a quad its own color and have the fill color of the quad be the gradient between the colors of the vertices?

ive done it with regular c++/opengl but it seems like processing in its natural form has no equivalent to glColor3f. do i have to do it the "hard" opengl way?

im trying to make a new version of this sketch, http://openprocessing.org/visuals/?visualID=2199, but im only able to get single fill colors so far and it would be a lot more organic looking with per-vertex color.
Re: specifying per-vertex color for filling quads
Reply #1 - Jun 4th, 2009, 9:17am
 
Change the fill() color before each vertex of a QUADS shape.

This post has a good example:
http://processing.org/discourse/yabb2/num_1174485616.html
Page Index Toggle Pages: 1