6

I am working on an OpenGL application on my laptop. My app shows lots of black and white unrecognizable patterns when I try to display a monochrome image (quite large). I have a hunch that it could be that my old Geforce Go 7950 GTX (512 MB) is too old for my app, and thinking the problem was due to framebuffer object size limit - is there a way to find out what the largest FBO can be?

1
  • 1
    You can use gDebugger (it's free) to debug such problems. Commented Jul 11, 2011 at 20:18

2 Answers 2

9

There is no maximum limit to framebuffer size in OpenGL. The limit is the largest texture or renderbuffer that you can attach to it.

There is however a maximum viewport size, get it using GL_MAX_VIEWPORT_DIMS, however according to the OpenGL specs, the viewport is silently clamped the max size anyway and shouldn't cause glitches. https://www.opengl.org/sdk/docs/man/html/glViewport.xhtml

Sign up to request clarification or add additional context in comments.

1 Comment

as a size note: the value of GL_MAX_VIEWPORT_DIMS doesn't have to be POT (it usually is on desktop devices, but e.g. I got 3839 x 3839 on NVIDIA Tegra 3), yet on some platforms (OpenGL ES on mobiles mostly) using NPOT textures (or even non-square POT textures) can and will cause trouble - as such I'd advise to get the nearest POT value lower than of the bigger of the two (max H/W, e.g. for T3 it'd be 2048) and use it as an upper bound of both H&W of the FBO being created. This fixed an obscure GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT error I was getting.
3
GLuint dims[2];
glGetIntegerv(GL_MAX_VIEWPORT_DIMS, &dims[0]);

That gives you the maximum width/height of a viewport.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.