So I want to implement a color picking system into my engine. I am using deferred rendering, so Im at a bit of an advantage because I don't have to render the scene twice. Right now what Im doing is rendering the number of the object in an array to an attachment in my GBuffer. However, glReadPixels reads from the back buffer, according to what I've read. The identifier attachment isn't the first attachment, so it doesn't read it. Im not really sure how I can make this read from my GBuffer attachment. Any help or input is appreciated. Thanks.