1
\$\begingroup\$

I want to save the result screen of the rendering and then apply another shader on that result, the typical way is to read the screen using glReadPixels and then buffer that image to gpu and then apply my effect, so is there a way to bind the screen result to a texture id directory in gpu, instead of retrieving it back to CPU and then buffer it to GPU ?

\$\endgroup\$
0
\$\begingroup\$

Check out this great tutorial.

Basically you need to create a new texture of the size you want, and then use glDrawBuffers.

\$\endgroup\$
1
  • \$\begingroup\$ yes this is what i was looking for thanks a lot. \$\endgroup\$ – Bahi Ali Sep 29 '20 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.