Framebuffer size

Started by
4 comments, last by KumGame07 15 years, 6 months ago
Hi Gang Can anyone explain me the relationship between the framebuffer size, display resolution and viewport dimension ? For instance if I have a viewport of dimension 400 x 300 and my display resolution is 800 x 600 and I use ARGB mode (32 bpp), what will be the size of framebuffer ? Regards & Thanks KumGame
Best Regards,KumGame07
Advertisement
The size of the frame buffer is not defined by OpenGL, but by how the driver chose to implement the frame buffer. If it uses one frame buffer per window, then the frame buffer must be at least as big as the window to cover all pixels of the window. If it uses a global unified frame buffer (shared among all windows), it must be at least as large as the bounding rectangle around all windows to cover all pixels of all windows, or a fixed sized as large as the screen.

The viewport has nothing to do with the frame buffer size. It is only uses to specify the transformation from normalized device coordinates (the coordinate system after projection and perspective division) into window coordinates. It basically specifies what part of the window you're drawing to.
Thanks a lot for the reply Brother Bob. Now the confusion is whether the implementation uses one frame buffer per window or a common buffer for all the windows. Is there any way to know this ? It doesn't affect any of my current work or something. But I was just wondering about how will this be implemented!! Anyways, thanks again.
Best Regards,KumGame07
No, there is no real way to know. Other than for curiosity, there is no reason to know this, and if it is for curiosity, check for some product information about your graphics hardware.
800*600*4(bytes per pixel)*2(z and stencil)=3840000 bytes at a minimum, but as Brother Bob said, there is no way of knowing exactly.
I just wanted to know it out of my curiosity. It really doesn't matter for my work. Thanks all.
Best Regards,KumGame07

This topic is closed to new replies.

Advertisement