Problems rendering a texture (created via RTT) to a full screen quad?

Hi Everyone,

This is my first post here… I’ve got my self stuck at a dead end trying to implement “Render to Texture”.

“Code XL” (formerly AMD gDEBugger) shows that I have implemented Render To Texture (a wiggly line on a 256x256 texture that randomly changes per frame), however I’m getting nothing on screen when trying to render the texture to a full screen quad. I have definitely switched my rendering back to the system framebuffer as the clear operation clears the screen not the texture.

Nothing is throwing any errors (using “break on gl error”) and I’ve read through every tutorial/doc I can find by Googling the various functions involved, including some searches on this forum.

I’m at a loss for where to go now as traditional debugging methods aren’t really much use, if someone has some pointers/ideas for things I can read/try or questions I can answer when the code is in front of me tonight (I’m posting from work) I’ll obviously do my best to try and provide enough info.

note: i’m also trying to stick to Modern GL, so no deprecrated stuff - all geometry/tex coords use VAO/VBO.

Thanks.

R.

Check your texture filtering mode when rendering the texture to a full screen quad. The default texture filtering modes use mipmaps, which you probably don’t have. Make sure you have filtering modes set for both minification and magnification that do not use mipmaps. Otherwise, GL considers your texture to be incomplete. Unfortunately, incomplete textures are not reported by GL as errors - your textures simple don’t work.

Also consider using texelFetch() instead of texture() in the fragment shader when rendering the textured quad.