there is a sentence says “A renderbuffer are just objects which are used to support offscreen rendering, often for sections of the framebuffer which don’t have a texture format associated with them such as the stencil or depth buffer.”
Why framebuffer does not have a texture format associated with depth buffer? Does this mean I cannot render depth to texture directly using a framebuffer?
That tutorial quote was misleading. The idea for renderbuffers is this.
Let’s say you want to render to a texture. But you probably also want a depth buffer and maybe a stencil buffer too. You could create a texture with such formats and attach that to the FBO, but some implementations don’t support some combinations of depth and stencil buffers. Also, using a texture for something like that is overkill. So you can use a renderbuffer with those formats instead.