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!