In OpenGL, when using VBO’s, why do I often see the last parameter (the pointer to the data) specified as follows…
glVertexPointer( 3, GL_FLOAT, 0, (char *) NULL );
…instead of simply like this…
glVertexPointer( 3, GL_FLOAT, 0, 0);
It may just be a question of preferred syntax as it appears to work both ways. But if there’s a reason not to just use zero, why is that?
Just to make it clear (to the reader) that it’s a pointer.
There are lots of parameters to openGL calls, which are often zero, so it just makes it a little clearer to read if there are 3 or 4 zeros in a row