I am new to DirectX11 and learning it. (I come from openGL background).
I am confused and trying to understand what exactly does the following API calls do and what is the difference between them:
ID3D11Texture2D* pBackBuffer = NULL;
hr = g_pSwapChain->GetBuffer( 0, __uuidof( ID3D11Texture2D ), ( LPVOID* )&pBackBuffer );
and
hr = g_pd3dDevice->CreateRenderTargetView( pBackBuffer, NULL, &g_pRenderTargetView );
pBackBuffer->Release();
What does GetBuffer
really do ? How are we then using the pBackBuffer
in CreateRenderTargetView
? Also, can someone explain or point me to a link that explains, what is a render target view ? The msdn doc didn't make much sense to me.