examples(d3d11): fix d3d11 examples
This commit is contained in:
parent
45b98a2bdd
commit
c3469520f9
|
@ -174,11 +174,6 @@ int main(int, char**)
|
|||
g_pFramebufferCopy->GetDesc(&framebufferTextureDesc);
|
||||
|
||||
|
||||
libra_source_image_d3d11_t input = {g_framebufferCopySRV,
|
||||
framebufferTextureDesc.Width,
|
||||
framebufferTextureDesc.Height};
|
||||
|
||||
|
||||
libra_viewport_t vp = {
|
||||
0,
|
||||
0,
|
||||
|
@ -191,8 +186,9 @@ int main(int, char**)
|
|||
.frame_direction = -1
|
||||
};
|
||||
|
||||
libra.d3d11_filter_chain_frame(&filter_chain, NULL, frameCount, input, vp,
|
||||
g_mainRenderTargetView, NULL, &frame_opt);
|
||||
libra.d3d11_filter_chain_frame(
|
||||
&filter_chain, NULL, frameCount, g_framebufferCopySRV,
|
||||
g_mainRenderTargetView, NULL, NULL, &frame_opt);
|
||||
|
||||
|
||||
g_pSwapChain->Present(1, 0); // Present with vsync
|
||||
|
|
|
@ -478,18 +478,13 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
|||
|
||||
deviceContext->CopyResource(framebufferCopy, framebufferTexture);
|
||||
|
||||
libra_source_image_d3d11_t input = {framebufferCopySRV,
|
||||
framebufferVP.Width,
|
||||
framebufferVP.Height
|
||||
};
|
||||
|
||||
libra_viewport_t vp = {0, 0, framebufferVP.Width, framebufferVP.Height,};
|
||||
frame_d3d11_opt_t frame_opt = {.clear_history = false,
|
||||
.frame_direction = -1};
|
||||
|
||||
libra.d3d11_filter_chain_frame(&filter_chain, deferredContext, frameCount, input,
|
||||
vp,
|
||||
framebufferRTV, NULL, &frame_opt);
|
||||
libra.d3d11_filter_chain_frame(&filter_chain, deferredContext,
|
||||
frameCount, framebufferCopySRV,
|
||||
framebufferRTV, NULL,
|
||||
NULL, &frame_opt);
|
||||
|
||||
ID3D11CommandList* commandList;
|
||||
deferredContext->FinishCommandList(false, &commandList);
|
||||
|
|
|
@ -398,14 +398,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/,
|
|||
|
||||
assert(copySrv != nullptr);
|
||||
|
||||
libra_source_image_d3d11_t input = {copySrv,
|
||||
viewport.Width,
|
||||
viewport.Height,};
|
||||
|
||||
libra_viewport_t vp = {0, 0, viewport.Width, viewport.Height, };
|
||||
libra.d3d11_filter_chain_frame(&filter_chain, NULL, frameCount, copySrv,
|
||||
|
||||
libra.d3d11_filter_chain_frame(&filter_chain, NULL, frameCount, input, vp,
|
||||
d3d11FrameBufferView, NULL, NULL);
|
||||
d3d11FrameBufferView, NULL, NULL, NULL);
|
||||
|
||||
copySrv->Release();
|
||||
framebufferCopy->Release();
|
||||
|
|
Loading…
Reference in a new issue