Draw 2D Mesh Grid using GLSL in 3D space
I'm hoping to draw a 2D Grid within a finite space on the X axis using OpengGL 4.0. I wish to use GLSL using vert/frag shaders etc for rending the light (making them appear). It can be done with the simplest code using older OpenGL 2.0 methods but then of course it doesn't use lighting/shaders to colour them: void Draw_Grid() { for(float i = -500; i <= 500; i += 5) { glBegin(GL_LINES); glColor3ub(150, 190, 150); glVertex3f(-500, 0, i); glVertex3f(500, 0, i); glVertex3f(i, 0,-500); glVertex3f(i, 0, 500); glEnd(); } } But I can'd find any tutorials other than this one which I don't understand