Raytracing in OpenGL using Compute Shaders
So i searched a lot after this and I think it was my confusion on FrameBuffer Objects.

I thought you could use FBO's just like a default FrameBuffer and display the texture image attached to it but you can't. It's only used for offscreen rendering. So while you can use rendering commands to draw something to a "texture image" attached to it, you can't "display the image" by making it default framebuffer or something like that.