show vectors from linear arrays with opengl


I have a linear float array, which contains vector values.

Something like this:

1 1 1 2 2 2 3 3 3

And I use it as 3 vectors with coordinates

x y z


1 1 1

2 2 2

3 3 3

The array is located in global memory and I want to make the vectors visible through an opengl buffer.

Is it possible to declare the array as float4 and to access the values like in a linear array?

The programming guide describes functions like make_float4(…). Is there a way to avoid the use of this function? If not, what is the cost of using it?

Best regards