FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Suggestions
   Software Suggestions
(Moderator: fry)
   indenting shape vertices?
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: indenting shape vertices?  (Read 389 times)
kevinP

Email
indenting shape vertices?
« on: Jun 7th, 2004, 12:14am »

I don't know if this would be consistent with openGL or if it is truly a good idea, but I like to indent the vertices as shown here:
 
beginShape(TRIANGLES);
  vertex(0,0);
  vertex(10,10);
  vertex(-10, -10);
  // etc.
endShape();
 
-K
 

Kevin Pfeiffer
TomC

WWW
Re: indenting shape vertices?
« Reply #1 on: Jun 7th, 2004, 12:22am »

Nothing to stop you doing that now, I hope.
 
If you want the formatting to remain after beautifying (ctrl-B), you could put the vertices in a separate block:
 
Code:

 
beginShape(TRIANGLES);  
{
  vertex(0,0);  
  vertex(10,10);  
  vertex(-10, -10);  
  // etc.  
}
endShape();  
 

 
This is consistent with how I was taught OpenGL, and should be harmless in Processing.  Don't confuse it with a function though
 
 
« Last Edit: Jun 7th, 2004, 12:23am by TomC »  
JohnG

WWW
Re: indenting shape vertices?
« Reply #2 on: Jun 7th, 2004, 2:49pm »

Glad to see I'm not the only one who pust a { after a beginShape(); .. though I normally forget the ';' first time I hit the run button, and have go to back and put it in
 
Pages: 1 

« Previous topic | Next topic »