It’s a C++ 2D array of GLfloats, 6 rows, 2 columns; 6 rows for 3 points per triangle * 2 triangles and 2 columns for 2 points per vertex. You can see all that from the code though, so I don’t understand why you are asking.
The only reason I define it that way instead of box is I consider it more readable to be able to do box[0/1] to access the x,y of the vertex.
As I mentioned if I use 3D points (so box[2*3], include a Z in the initialization pass 3 to glVertexPointer) it works.
i knew what it is, just strage because you dont address your glBegin primitves like that. just try to remove it and see what happens.
if other client states are enabled make sure to disable those.
GL_NORMAL_ARRAY, GL_COLOR_ARRAY, GL_TEXCOORD_ARRAY …
or try to specify the actuall stride instead of 0.
yes, if not disabled OpenGL expects them to be bound and reads from them. crash can occur if previous draw used a buffer which is smaller then the one you specified now and this buffer is not disabled.