I hope to draw a 2D mesh in the final space on the X axis using OpengGL 4.0.
I want to use GLSL using vertex / snippet shaders, etc., to smooth out the light (by creating them).
This can be done using the simplest code using older OpenGL 2.0 methods, but, of course, it does not use highlighting / shaders to color 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 could not find any textbooks other than this , which I do not understand enough to convert from a graph to a simple 2D grid in three-dimensional space.
source share