Hallo,
I hope that somebody can help me with my problem. I read and searched for information several days about VBOs but meanwhile I’m totally confused.
I want to show measured data with OpenGL with the help of VBOs.
The data point consists of one X value and one Y value and I have 50000 points.
I created an double array which is in format:
double[] data = new double[] {x0,y0,x1,y1,…,x49999,y49999}
//Create Buffer works
int[] buffers = new int[1];
Gl.glGenBuffers(buffers.Length, buffers);
//Bind Buffer works
Gl.glBindBuffer(Gl.GL_ARRAY_BUFFER, buffers[0]);
Gl.glBufferData(Gl.GL_ARRAY_BUFFER, (IntPtr)(data.Length * sizeof(double)), data, Gl.GL_STATIC_DRAW);
//Nothing works from here - please help with this
Gl.glVertexPointer(2, Gl.GL_DOUBLE, 0, 0);
Gl.glEnableClientState(Gl.GL_VERTEX_ARRAY);
Gl.glDrawArrays(Gl.GL_LINE_STRIP, 0, 50000);
//Cleaning everything
Gl.glDisableClientState(Gl.GL_VERTEX_ARRAY);
Gl.glBindBuffer(Gl.GL_ARRAY_BUFFER, 0);
I searched and googled and found a lot but I am confused and totally lost. Can smoeone put me on the right way again?
Thanks.
Dave