Hey all.
Why won't this code work? I'm trying to randomly draw lines...
public void GenerateRandomObjects()
{
for (int i = 1; i <= 10; i++)
{
Gl.glBegin(Gl.GL_LINES);
Random r = new Random();
int X1 = r.Next(800);
int X2 = r.Next(800);
int Y1 = r.Next(800);
int Y2 = r.Next(800);
Gl.glVertex2i(X1, Y1);
Gl.glVertex2i(X2, Y2);
Gl.glEnd();
}
Gl.glFlush();
}
It produces 1 line :/