Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Blakeasd

macrumors 6502a
Original poster
Dec 29, 2009
643
0
I am just beginning to learn OpenGL so I went to look at the Golden Triangle example on Apple's Developer website. When they drew the triangle they used glVertex3f and for the third parameter they used "0". I was using Xcode's auto-completion and I noticed "glVertex2f" and saw there were only two parameters "x" and "y". So I used it and it worked. Is there a reason Apple used glVertex3f and put the z parameter as "0" rather than just using glVertex2f? Is there some sort of disadvantage to using glVertex2f if you don't need the "z" parameter?
Thanks!
 
Thanks! I just wanted to make sure I didn't do anything that would hurt performance or cause future problems.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.