Sign in to follow this  
Woltan

Going FBO

Recommended Posts

Hey folks, I need your help, this time concerning the use of FBO. I must admit, that I dont know anything about them. Up until now, I was using glCopyTexImage2D to render to a texture. But since this is only possible if the window size is bigger than the texture size, this method has its limitations. So I heard about the rumor, that FBO might be the solution. I just read the article about FBOs and was eager to give it a try, but I dont know what includes i have to make. My compilition error :"error C3861: 'glGenFramebuffersEXT': identifier not found" it seems that i somehow need to include <GL/glx.h>. What exactly to I have to do, to get a hold of this header with its corresponding library? Does FBO run on any graphics card? ATI NV? Or is it somehow possible to render to a texture with glCopyTexImage2D, regardless of the window size. Thx in advance for your help! Regards Woltan [Edited by - Woltan on May 26, 2007 8:27:32 AM]

Share this post


Link to post
Share on other sites
See the forum faq about loading extensions.

The glCopyTexSubImage approach is a nice fallback path, but can't draw to larger than the display size. I use FBOs where available (pretty much all semi-recent cards) and fallback to glCopyTexSubImage (possibly at a reduced resolution) for those cards that can't handle it.

Share this post


Link to post
Share on other sites
Hey OrangyTang,
thx for the link but somehow I am too much of a noob to help myself from there. on http://oss.sgi.com/projects/ogl-sample/registry/ I can open the header files, but just copying them to include them into my project wouldnt to the trick would it? I need to get the libraries somewhere as well. But those I couldn't find.
Thx in advance for your help again!
cherio Woltan

Share this post


Link to post
Share on other sites
I'd go with GLEW instead. It's distributed with Ubuntu and with Fink (under OS X), and available for every other platform. It seems to be a more well accepted extension library.

Share this post


Link to post
Share on other sites
A better fall back if FBOs aren't available are Pbuffers. They're a pain to set up, but at least you can use a different resolution to your back buffer, and every card supports them.

Share this post


Link to post
Share on other sites
Hey again,
I was now able to implement GLEW and after a few source rearrangments the compilation was successfull. However my program crashes at this line:
glGenFramebuffersEXT(1, &fbo);
Is it maybe that my graphicscard does not support this extension? or what else could cause that prob?
thx again for any help!
cherio Woltan

Share this post


Link to post
Share on other sites
Quote:
Original post by Woltan
Hey again,
I was now able to implement GLEW and after a few source rearrangments the compilation was successfull. However my program crashes at this line:
glGenFramebuffersEXT(1, &fbo);
Is it maybe that my graphicscard does not support this extension? or what else could cause that prob?
thx again for any help!
cherio Woltan

Firstly check the return value of glGetString(GL_EXTENSIONS) and see if it contains the fbo extension. You can also look up your particular card/driver combo on delphi3d. You should also check to see if the function pointer was retrieved successfully (probably by checking that it's not null, but I don't know the exact details on how GLEW works).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this