Hi,
It's not _that_ straightforward, the pseudo code in that page is overly simplistic. That said, you may be interested in looking at the "front-end" of ANGLE; that's the part that implements OpenGL's (or WebGL's) logic agnostic to the back-end implementation. You can find the front-end files under src/libANGLE. FYI, files under src/libANGLE/renderer are the backends. In particular w.r.t framebuffers, you may want to look at Framebuffer.* and FramebufferAttachment.*