Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

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

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2013
    Location
    UK
    Posts
    5

    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.

  2. #2
    Junior Member Regular Contributor tksuoran's Avatar
    Join Date
    Mar 2008
    Location
    Cambridge, UK
    Posts
    224
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •