POV-Ray : Newsgroups : povray.newusers : Vertex Colors in POVRay : Vertex Colors in POVRay Server Time
5 Sep 2024 12:15:13 EDT (-0400)
  Vertex Colors in POVRay  
From: Sam No Spam
Date: 21 Dec 2000 10:52:47
Message: <3A422746.602D4B2@example.com>
I am seeking a way to specify per-vertex colors in a polygon mesh in
POVRay.  In OpenGL I'd do it with something like

		glBegin( GL_POLYGON );

		for ( p = p0; p < p1; p++ ) {
		    
		    glColor4f( v_red[p],	// red
			       v_green[p],	// green
			       v_blue[p],	// blue
			       1.0 );		// alpha
		    glNormal3f( vnx[p], vny[p], vnz[p] );
		    glVertex3f( x[p], y[p], z[p] );
		    
		}

		glEnd();

Clues, RTFMs, and suggestions are all welcome.

Please remove the "-nospam" from the Reply-To: address if responding
directly.

Thanx.

							spl


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.