PDA

View Full Version : What are the limitations of FBO?



MrUNOwen
09-09-2011, 06:50 PM
In regards to Windows, Linux, Mac and mobile platforms (OpenGL ES), what limitations are there with FBO? Can I go larger than the provided screen size? Assuming I'm using GLEW, is it safe to assume I don't need to worry about platform specific calls?

Alfonse Reinheart
09-09-2011, 09:42 PM
The limit on the size of FBOs is the same as the limit on the size of the viewport. So you have to get GL_MAX_VIEWPORT_DIMS.

OpenGL Developer
09-09-2011, 11:32 PM
FBOs cannot go larger than screen size?

MrUNOwen
09-10-2011, 12:51 AM
What about the dimensions? Will any shape work?

OpenGL Developer
09-10-2011, 06:10 AM
You must support GL_ARB_rectangle and GL_EXT_npov for non-power-of-two or rectangular FBO.

V-man
09-10-2011, 09:18 AM
You must support GL_ARB_rectangle and GL_EXT_npov for non-power-of-two or rectangular FBO.

No, if you want to create a render buffer, then it can do any size. An FBO is just a "object" to which you attach a render buffer or texture.

If you want to do a texture, then it can do any size as well as long as you have GL 2.0 and any driver that supports FBO already supports GL 2.0 unless if you need to support the various old Intel chips which I think can do GL 2.0 but don't have the FBO extension (EXT).

MrUNOwen
09-10-2011, 01:48 PM
Now I'm a little confused... so does that apply for the above mentioned platforms (assuming they're all using the latest hardware)?

Basically I was thinking of drawing to really wide FBO that I can use as scroll view where the user can pan left to right. So I just want to know if I have to break it up into separate textures or not.

Are those limitations in regards to viewport(), because I could just offset the viewport as I'm drawing?

V-man
09-11-2011, 05:52 AM
I was just replying to OpenGL Developer since he suggests to use those extensions. He also seems to think that you can only attach a texture to a FBO.

OpenGL Developer
09-11-2011, 08:23 AM
V-man: I don't know why you would "think" I "think" that, since in the other thread I'm attaching Color Texture and RBO Depth.

Alfonse Reinheart
09-11-2011, 01:49 PM
I don't know why you would "think" I "think" that

Because you said, "You must support GL_ARB_rectangle and GL_EXT_npov for non-power-of-two or rectangular FBO." Which is not true, because renderbuffers have never had a power-of-two restriction.

So you either did not know about renderbuffers when you wrote that, or you forgot about them. Either way, your statement needed to be corrected.

MrUNOwen
09-12-2011, 11:35 AM
so....... will the following work:

create a FBO for a screen that's 900x200, set the viewport to 900x200 and draw to the entire thing? Would that work for all the platforms mentioned?