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?

  2. #2
    Senior Member OpenGL Lord
    Join Date
    Mar 2015
    Posts
    6,675
    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
    3,105
    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.

Similar Threads

  1. GLSL version doesn't match OpenGL version
    By Susano2018 in forum OpenGL: Drivers
    Replies: 0
    Last Post: 11-13-2018, 06:35 PM
  2. glFramebufferTexture Vs glFramebufferTexture2D for CUBE_MAP
    By Hellice in forum OpenGL: Advanced Coding
    Replies: 9
    Last Post: 01-28-2017, 01:49 PM
  3. glFramebufferTexture2D mipLevel problem
    By darkoccisor in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 04-28-2014, 07:50 AM
  4. MSAA using glFramebufferTexture2D?
    By rexguo in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 01-18-2010, 11:40 AM
  5. Mesa early version source code?
    By Ruxbin in forum OpenGL: Linux
    Replies: 2
    Last Post: 01-30-2008, 01:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean