I\'ve seen a lot of material on this subject, but there are some differences between the examples I\'ve found and I\'m having a hard time getting a solid understanding of th
Sounds and looks reasonable. This is indeed the common way to do it. If you don't need the depth data as texture for further processing, you can also use a renderbuffer for an attachment, but a texture should also work fine.
You can also use glCheckFramebufferStatusEXT
after all the setup is done, to see if the framebuffer is valid in its current configuration, but your code looks fine. If you don't have a problem and this was just for assurance, then rest assured that you're on the right track, otherwise tell us what's wrong.