Get old style OpenGL code work in GLSL
问题 I am trying to draw this pattern in OpenGL : To get this, I created the pattern like : vector< vector<DataPoint> > datas; float Intensitytemp=0; float xPos=0, yPos=0, angleInRadians=0; for (float theta = 0.0f; theta < 4096; theta += 1.f) { vector<DataPoint> temp; angleInRadians = 2 * M_PI*theta / 4096; for (float r = 0; r < 4096; r += 1.f) { xPos = cos(angleInRadians)*r / 4096; yPos = sin(angleInRadians)*r / 4096; Intensitytemp = ((float)((int)r % 256)) / 255; DataPoint dt; dt.x = xPos; dt.y