c - What is the purpose of surrounding a code block between glBegin and glEnd in brackets? -


what purpose of surrounding code in between call glbegin , glend in brackets? have programmatic or functional purpose or aesthetics , style? code below in c.

glbegin(gl_polygon); glcolor3fv(green); glvertex3fv(block_vertices[0]); glvertex3fv(block_vertices[1]); glvertex3fv(block_vertices[2]); glvertex3fv(block_vertices[3]); glend(); 

versus

glbegin(gl_polygon); {     glcolor3fv(green);     glvertex3fv(block_vertices[0]);     glvertex3fv(block_vertices[1]);     glvertex3fv(block_vertices[2]);     glvertex3fv(block_vertices[3]); } glend(); 

the reason style, because somehow feels right programmer wrote it.

it might have made sense if he/she introducing local variables (i.e. looping create vertices), in c99 , later that's not necessary either.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -