Render anything to texture
<p>I've seen that you can render stuff to a texture using OpenGL's FBOs - that is, setting a new Texture2D to <code>GL_COLORATTACHMENT0</code>. However, doesn't that mean that i would need to explicitly render to this color attachment with <code>out (location=0)</code> in the shader - so anything that i rendered in any other way wouldn't end up in this texture, right? Because i saw it like this on opengl-tutorials tutorial #14:</p>

<pre><code>layout(location = 0) out vec3 color;
</code></pre>

<p>If that is true, how can i render e.g. immediate mode to texture, if that is even possible?</p>