You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers. No questions about C++ programming or topics which are answered in the tutorials!
I wonder wheter vertices[3] will be processed in the GPU. irrlicht only sets its color to glColor and calls glDrawElements, but I don´t know what happens then.
BTW: my triangle disapears when NUM_VERTICES is > 65536 (with 65536 it is shown).
Irrlicht packs vertices into buffers before sending them to the gpu, this reduces the number of calls thus reducing the possiblity of the application becoming driver bound. and thus the lack of glvertex calls in the opengl driver source code.
Irrlicht can render over 65536 polygons without mods the polygons have to be in diffrent buffers. Its due to the integer variable that holds the numbers for the verts is a 32 bit one and thus has a 65536 limit a 64 bit one has double that limit.
It's the variable that holds the indices which point to vertices, and this is short int which makes it hold at most 65535, int would fix it to over 2 billion vertices. This is found under the topic 32bit patch.