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 › Vertex or Line, which is faster
Page Index Toggle Pages: 1
Vertex or Line, which is faster? (Read 689 times)
Vertex or Line, which is faster?
Mar 13th, 2009, 3:48pm
 
Is a vertex() faster than a line() in OpenGL?  Any benefit with choosing one over the other?
Re: Vertex or Line, which is faster?
Reply #1 - Mar 14th, 2009, 6:44pm
 
Hello.

It's seems that a vertex is faster than a line.

Bye.
Re: Vertex or Line, which is faster?
Reply #2 - Mar 15th, 2009, 4:46pm
 
Ok, so just so I'm clear... (I will be creating a great number of lines, so I want to make sure I get the best performance).

Code:

 beginShape();
 vertex(100,0);
 vertex(0,0);
 endShape();


would be faster than...

Code:

 line(0, 0, 100, 0);


Could someone explain why?
Page Index Toggle Pages: 1