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?
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
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.