Hello
I have just start to use jogl.
I have got a pb with glVertexPointer:
When I use
m_gl.glEnable(GL.GL_VERTEX_ARRAY);
m_gl.glVertexPointer(3, GL.GL_FLOAT, 0, LineBuf.getM_Buf());
m_gl.glDrawArrays(GL.GL_LINES, 0, iCurLineBufPos);
m_gl.glDisable(GL.GL_VERTEX_ARRAY);
Nothing was drawn
And if I use
m_gl.glBegin(GL.GL_LINES);
float[] f = new float[3];
for (i = 0; i < iCurLineBufPos; i++)
{
f[0] = LineBuf.get(i).GetX();
f[1] = LineBuf.get(i).GetY();
f[2] = 0.f;
m_gl.glVertex3fv(f);
}
m_gl.glEnd();
It’s work.
Is there a suptility I don’t know with this function ?
Thx for Your help