Convert GL_TRIANGLE_STRIP data to GL_POINTS

I have my cordinate data as follows :

private final float[] verticesData = {
                // X, Y, Z, U, V
                -1.0f, -1.0f, 0, 0.f, 0.f,
                1.0f, -1.0f, 0, 1.f, 0.f,
                -1.0f,  1.0f, 0, 0.f, 1.f,
                1.0f,  1.0f, 0, 1.f, 1.f,
        };

and I pass this to vertex attribute as below

GLES20.glVertexAttribPointer(positionHandle, 3, GLES20.GL_FLOAT, false, 20, vertices);
    GLES20.glVertexAttribPointer(textureHandle, 2, GLES20.GL_FLOAT, false, 20, vertices);

    GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, 0, 4);

For histogram purpose, I need to draw the same data as GL_POINTS instead of GL_TRIANGLE_STRIP.

How to do that?

Just draw it as points:

GLES20.glDrawArrays(GLES20.GL_POINTS, 0, 4);

That’ll draw 4 points.

We tried drawing it using GL_POINTS, but it crashed. We thought it might be because ‘verticesData’ is written as for triangle_strip with 4 vertices unlike for points.