OpenGL DSA equivalent for glReadPixels

220 views Asked by At

I'm trying to retrieve a Pixel-value from a Renderbuffer attached to an unbound Framebuffer. Since I'm trying to avoid changing global state when reading said value I'm unable to use glReadPixels([...]) which would normally be used to read Pixels from the currently bound Framebuffer.

DirectStateAccess methods usually solve this problem but I'm unable to locate a method that allows for directly specifying the source of the read operation.

Is it possible to read the pixel in a different way, without having to bind the associated Framebuffer? Why did this method not get included in the DSA extension?

1

There are 1 answers

0
Rabbid76 On

If the framebuffer attachment is a Texture and not a Rrenderbuffer, you can read the pixel data from the texture object instead of the framebuffer with glGetTextureImage.