Drawing to background frame buffer

Hello all,

I'm trying to get my feet wet with using frame buffers. I've set up a frame buffer based off of a number of online tutorials, but the texture that I attached to it doesn't seem to be receiving the drawing. I like to debug these myself whenever possible, but I don't know how to check inside the frame buffer to see what's going on at runtime. Here is how I set up the frame buffer. Can anyone tell me if there is something missing?

Basically I 1) Switch to the frame buffer, 2) render the scene, 3) switch back to the screen, and 4) draw the rendered texture. Nothing appears.

If I bypass the whole thing and render directly to the scene to the screen, (without this frame buffer business), it appears fine. If I switch out a pregenerated texture for step 4, it appears fine as well, but the rendered texture never appears. Suggestions?

PS: The "p" in front of some glFunctions is just a reminder to me that I had to pull them in from extensions. They are otherwise the same glFunctions.

Last edited by paradoxresolved; 02-24-2014 at 12:43 PM.
Reason: Further explanation

Seems I oversaw this thread... but don't get impatient, I have another thread with a very similar topic and noone replied for three weeks there

A quick look through your code showed it's very similar to mine, some changes in the order sometimes (which should not cause the fail) and I think you even took the same tutorial as I did... so that should work. Maybe the way you draw into the buffer is wrong? Please provide code for that!

I have completely no idea what your fragment shader is supposed to do. You translate one color to another, but you should rather be drawing a quad with reasonable texture coordinates. An example from my code:

If renderedTexture is internally the same as any other texture, I can't see why Draw_Texture would work any differently. Is there some way I can check to see if the image was properly written to renderedTexture using debugging techniques at runtime? I suspect that the data is not getting correctly sent to renderedTexture.

I switched out the shader I was using for the fixed pipeline to minimize confusion.

I hate to drag this back out into the light, but I still have no idea why this isn't working, and I don't know how to debug the situation. As far as I can tell, I set up the frame buffer and texture correctly, but rendering to it and then attempting to render the resulting texture yields a black screen. Can anyone please help me?