I am learning GPGPU programming using OpenGL + GLSL. One of the problems is that if you have a shader that takes a lot of time, it cannot be undone.
After setting everything up, I issue a final call to glReadPixels , which blocks until all the pixels are displayed in the framebuffer. Depending on the shader, this can take a long time, even seconds. Is there a way to cancel a call (from another thread) or even request progress? What happens if you set up an infinite loop in a shader?
source share