– what is the x,y, width and height adequate for glReadPixels(x,y, width,height,GL_RGB,GL_UNSIGNED_BYTE,data);
to retrieve only the color red (rectangle) knowing that the points of the rectangle are of type float?
–how to retrieve the values of the parameter data, and save them in a text file ?
you can´t do a 1 to 1 merging from the vertex data to screen coordinates.
there are complex math forms that can do that.
sorry i cant help you more, but you may search for ‘world coordinates to screen coordinates’.