Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

From my understanding, display memory resides on the GPU and is what's currently being displayed.

Offscreen memory resides on the GPU and is used for things that won't be displayed.

The framebuffer is graphics memory that is the result of OpenGL rendering.

So, how do these 3 correlate to one another? It seems that the framebuffer may reside in offscreen memory maybe? Is this true?

Any help in understanding all this would be helpful.

Thanks.

share|improve this question
add comment

3 Answers 3

up vote 2 down vote accepted

OpenGL does not have these concepts you are referring to.

There is the default framebuffer. This is a series of named images: the back color buffer, the front color buffer, the depth buffer, aux color buffers, etc. The front buffer generally represents what is seen in a window. You generally render to the back buffer and then use a buffer swap to put that data in the front buffer.

There are also framebuffer objects (FBO). FBOs can have user-created images attached to them. These can be mipmap levels of a texture or from a renderbuffer (a non-texturable image). Nothing you render to these images will be displayed unless you take additional steps.

share|improve this answer
    
I'm getting this information from the Orange Book 3rd edition, which OpenGL 3.2( I think ) was the latest release at the time it was released. They do talk about display and offscreen memeory, but It sounds to me from your post that all of this resides in the default frame buffer. Display memory being the front buffer and offscreen memory being everything else in the frame buffer. Is that safe to assume? –  Joey Green Sep 3 '11 at 0:17
    
@Joey Green Depending on your OS and video mode and drivers, the front buffer might be anything that your OS/Driver tells you it's the front buffer, it could be offscreen memory that the OS/Driver then copies to the actual "Display memory" if there is such thing in that particular video card. –  Pablo Ariel Sep 3 '11 at 17:21
add comment

There's also no memory partitioning on modern GPUs either (hasn't been for well over a decade) - it's just a single block of memory that the driver can pull down from for various uses as required. It's therefore meaningless to speak of different "types of memory" and which "type" a particular object may "reside in". It's all just video RAM.

share|improve this answer
add comment

Depending on your OS and video mode and drivers, the front buffer might be anything that your OS/Driver tells you it's the front buffer, it could be offscreen memory that the OS/Driver then copies to the actual "Display memory" if there is such thing in that particular video card.

OpenGL tries to create a framebuffer, but it relies on the drivers, and probably in the way the OS exposes them, so the OS or the Driver may well decide to handle your final image, for example to apply custom filters configurable from the control panel of the video driver. You can never assume that if you access the framebuffer you are pointing to the display memory. Most likely will be a pointer to the "offscreen VRAM", or some mapping for a memory closer of both the CPU and the VRAM such as the bus memory, which is far away from the display memory, if there is such distinction in the videocard in question.

share|improve this answer
    
So if you're learning OpenGL should just not worry about the display memory or offscreen memory and just focus on the framebuffer? –  Joey Green Sep 3 '11 at 18:05
    
Exactly, because it would be working at the driver level already, which is what you are abstracting with OpenGL. It makes sense only if you know very well the GPU model and its driver, but that ties your code to a specific model of a chip, driver and/or other requirements, something that you most likely want to avoid. –  Pablo Ariel Sep 3 '11 at 18:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.