Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: FBO render to texture using VBO

  1. #11
    Junior Member Newbie
    Join Date
    Nov 2012
    Posts
    7
    I'm over the moon. I was missing a call to GL.Viewport() to set the full screen bounds exactly as you said. And it was rendering all red because I wasn't clearing the texture GL.BindTexture(TextureTarget.Texture2D, 0) before re-drawing it - I'm a fool.

    But it's all working now:

    Standard:


    Stretched FBO:


    Thanks for the other notes and my incorrect GL.PushMatrix() GL.PopMatrix() usage.

    You mention shaders and not using the fixed pipeline. If you have any links to resources which show how I could achieve this with shaders I'd like to have a look. I take it this fixed pipeline approach is non-standard?

    Thanks for all your guidance.

  2. #12
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,104
    You mention shaders and not using the fixed pipeline. If you have any links to resources which show how I could achieve this with shaders I'd like to have a look. I take it this fixed pipeline approach is non-standard?
    Not non-standard just old style and much less flexible than shaders.
    If you can afford it, I would recommend an e-book called "OpenGL 4.0 Shading Language Cookbook". It is a quick way in to shaders. Others might like to offer advice on good shader language web sites.

Posting Permissions

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