Making a point:
glColor3f(1.0, 0.4, 0.2); glBegin(GL_POINTS); glVertex2i(100 , 100); glEnd();
code to read pixel color:
glutSwapBuffers(); vector<float> rcolors(3); glReadPixels(100, 100, 1, 1, GL_RGB, GL_FLOAT, &rcolors[0]); cout << rcolors[0] << endl << rcolors[1] << endl << rcolors[2] << endl;
I am able to see the red pixel, but the values returned in cout are my clear color, which is black in my case.






