You have several options for drawing multiple disabled line strips:
Multiple Drawing Calls
The simplest and most direct approach is that you make multiple calls with a callback. Say you currently have 1000 vertices in your buffer and make a draw call that ends as:
glDrawArrays(GL_LINE_STRIP, 0, 1000);
Now, if it’s actually 4 disabled rowset with 250 vertices each, you simply draw each rowset separately:
glDrawArrays(GL_LINE_STRIP, 0, 250); glDrawArrays(GL_LINE_STRIP, 250, 250); glDrawArrays(GL_LINE_STRIP, 500, 250); glDrawArrays(GL_LINE_STRIP, 750, 250);
The disadvantage, of course, is that you need multiple calls. So far this is just a moderate number of calls, and each call still creates a significant amount of work, this should be good. For performance reasons, it is undesirable to have many small drawing calls.
glMultiDrawArrays()
There are various calls that allow you to essentially send multiple pivot calls with a single API call. For example, this is equivalent to the above sequence of calls:
GLint firstA[4] = {0, 250, 500, 750}; GLint countA[4] = {250, 250, 250, 250}; glMultiDrawArrays(GL_LINE_STRIP, firstA, countA, 4);
As I understand what you are trying to do, this solution may be ideal for you.
GL_LINES instead of GL_LINE_STRIP
If you use GL_LINES for your call calls, each pair of dots will be connected by a separate line, and you can easily have spaces.
However, there is a significant penalty: you need almost twice as many vertices in your buffer, as most vertices will repeat. Where there were n vertices before:
a0 a1 a2 a3 ... an
you need 2 * n - 2 vertices for the same geometry:
a0 a1 a1 a2 a2 a3 a3 ... an
The advantage is that you can draw everything with a single draw call with as many gaps as you need.
Primitive restart
OpenGL 3.1 and later has a feature called "primitive restart" that can be very handy for cases like the ones you describe. However, this requires the use of an index array. Index arrays are often used anyway if the geometry is more complex, so this is usually not an obstacle. But since you are not using an index array, and there is no real need to use it, you might not want to enter index arrays just to use primitive restart.
I will not include sample code here, but you can find a lot of documentation and examples if you are looking for a “primitive restart of OpenGL”.