Just by curiosity, why we need to bind a dummy framebuffer and attach the texture to its color attachment before reading back the pixels? Can we just directly bind the texture instead?
You can only read from framebuffer
I read the documentation from glReadPixels function - Windows applications | Microsoft Docs. Yes now understand better. Thank you.
No worries it is important to understand how it works