Ok, let's take this apart. First of all, what's array[24] supposed to hold? Are there any concrete values? If you don't specify any the values are undefined. Second, what's the type of the array elements?
Code :
glCopyBufferSubData(GL_ARRAY_BUFFER,GL_ARRAY_BUFFE R,sizeof(array)/2,0,sizeof(array)) ;
Do you honestly need to determine the offsets and size of the copy operation by deducing from a fixed size array? How can you be sure that sizeof(array) is actually a valid size and that sizeof(array)/2 + sizeof(array) isn't out of range? Equivalent code, which is much more readable, would be:
Code :
GLintptr bufferSize = numElements * sizeof(elementType);
GLintptr readOffset = bufferSize >> 1;
glCopyBufferSubData(GL_ARRAY_BUFFER, GL_ARRAY_BUFFER, readOffset, 0, bufferSize) ;
I suppose you simply have a buffer of 24 elements and want to copy the second half to the first half. Is that correct?
Regarding the second call, do you want legacy vertex arrays or do you want to render using vertex buffer objects?
Please clarify your intent.