This will be my first time rendering to anything other than the default frame buffer, and my searches suggest that FBOs are the way to go for this task. Actually, they appear to be the only method from what I have seen - please correct me if I am wrong on this.
I am specifically trying to limit myself to OpenGL functionality that has been core since 3.1. According to the OpenGL wiki, FBOs have been core since 3.0.
I've found a large number of resources on setting up FBOs and how to attach textures to them, but they all use functions that (according to the OpenGL wiki) have only been core since 3.2 (for example, glFrameBufferTexture and glFrameBufferTextureLayer).
What is the proper/recommended method to render to a texture using OpenGL 3.1 or below? It should be noted that I will need a depth buffer for what I am rendering (a feature that FBO's provide).
NOTE: I originally titled this "How to attach a texture to a Frame Buffer Object in OpenGL 3.1.", but went with a more general title in-case there are other options.