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 4 of 4

Thread: glFramebufferTexture2D in early version of opengl(vertex)

  1. #1
    Junior Member Newbie
    Join Date
    May 2015
    Posts
    8

    glFramebufferTexture2D in early version of opengl(vertex)

    Hi guys!
    I want to be able to use glFramebufferTexture2D in order to create a FrameBuffer Object(FBO) and render my entire current opengl scene to a texture of an FBO.(just like in this tutorial

    However I am using an earlier version of openGL(no shaders at all-only vertices etc) and glut and gl.h can't find the command glFramebufferTexture2D at all.What can I do to achieve this in OpenGL early versions(no shaders)? Should I include glew.h too? And If I do can I continue writing my program or do I have to create shaders etc?
    Last edited by mbikos; 05-21-2015 at 10:16 AM.

  2. #2
    Senior Member OpenGL Lord
    Join Date
    May 2009
    Posts
    5,907
    Quote Originally Posted by mbikos View Post
    What can I do to achieve this in OpenGL early versions(no shaders)?
    Nothing. If your version of OpenGL is so outdated that it's not even 2.0, odds are good that it doesn't support EXT_framebuffer_object or the ARB version. It's not so much that you need shaders, but that anything that doesn't offer them also won't offer FBO support.

    So you'll have to copy the framebuffer pixels to a texture with glCopyTexSubImage.

  3. #3
    Junior Member Newbie
    Join Date
    May 2015
    Posts
    8
    Ok but what if my openGL version supports newer opengl?Then, can I just include glew.h and get what I want? Or do I have to do shader programming?

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    2,411
    Quote Originally Posted by mbikos View Post
    Ok but what if my openGL version supports newer opengl?Then, can I just include glew.h and get what I want? Or do I have to do shader programming?
    You don't need to use shaders to use FBOs.

    If you're on Windows, opengl32.dll only exports the symbols for the OpenGL 1.1 API. Any functions added in later versions or in extensions have to be accessed through a pointer obtained from wglGetProcAddress(). GLEW just simplifies the process.

Tags for this Thread

Posting Permissions

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