[D3D10]What's the difference between DXGI_USAGE_BACK_BUFFER and DXGI_USAGE_RENDER_TAR

Started by
5 comments, last by Mihulik 13 years, 3 months ago
Hi everyone,
I was wondering what the difference between DXGI_USAGE_BACK_BUFFER and DXGI_USAGE_RENDER_TARGET_OUTPUT is when creating a device and a swapchain (I use the D3D10CreateDeviceAndSwapChain function).
I use DXGI_USAGE_RENDER_TARGET_OUTPUT because I learned to do so. So does every tutorial I've found.

However, I don't know the reason why I use DXGI_USAGE_RENDER_TARGET_OUTPUT instead of DXGI_USAGE_BACK_BUFFER.
By calling that function I create a backbuffer. So, I'd expect to use DXGI_USAGE_BACK_BUFFER instead at first sight.

I haven't found any sufficient explanation. I found some explanations but not sufficient one.


I believe you can explain me what the reason is.:-)

[Edited by - Mihulik on December 21, 2010 4:34:27 AM]
Advertisement
I'm not sure, but perhaps DXGI_USAGE_BACK_BUFFER is implicit when you're creating the swap chain? I mean it wouldn't make any sense to create the back buffer without a flag specifying that it's the back buffer. Perhaps the flag is only relevant when you're manually creating a DXGI surface.
It sounds reasonable.:-)
However, I could say the same thing about DXGI_USAGE_RENDER_TARGET_OUTPUT because when I create a backbuffer, I create a render target, couldn't I?:-)
Nobody else?:-)
I'm sorry for waking this topic up but I'm still wondering what the difference is.:)
Hi, I looked into this a while back and couldn't find any information. It seems safe to add the DXGI_USAGE_BACK_BUFFER flag, but it is not necessary. I would just do what the SDK tutorials / samples do.
-----Quat
I do so but I'd like to know why I do so.:)
However, I got an answer on another forum:
"DXGI_USAGE_RENDER_TARGET_OUTPUT enables the surface to be able to be presented to the screen. So it must create a front buffer as well as a back buffer (in fact, it can create even more, for triple/quadruple/whatever buffering, if desired). I would guess that DXGI_USAGE_BACK_BUFFER creates a back buffer only, which you might do for offscreen rendering (e.g. you wanted to save the image to a file, or run some image-processing on it)."

I think that answer is reasonable.:-)

This topic is closed to new replies.

Advertisement