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);
|
g_pFramebufferCopy->GetDesc(&framebufferTextureDesc);
|
||||||
|
|
||||||
|
|
||||||
libra_source_image_d3d11_t input = {g_framebufferCopySRV,
|
|
||||||
framebufferTextureDesc.Width,
|
|
||||||
framebufferTextureDesc.Height};
|
|
||||||
|
|
||||||
|
|
||||||
libra_viewport_t vp = {
|
libra_viewport_t vp = {
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -191,8 +186,9 @@ int main(int, char**)
|
||||||
.frame_direction = -1
|
.frame_direction = -1
|
||||||
};
|
};
|
||||||
|
|
||||||
libra.d3d11_filter_chain_frame(&filter_chain, NULL, frameCount, input, vp,
|
libra.d3d11_filter_chain_frame(
|
||||||
g_mainRenderTargetView, NULL, &frame_opt);
|
&filter_chain, NULL, frameCount, g_framebufferCopySRV,
|
||||||
|
g_mainRenderTargetView, NULL, NULL, &frame_opt);
|
||||||
|
|
||||||
|
|
||||||
g_pSwapChain->Present(1, 0); // Present with vsync
|
g_pSwapChain->Present(1, 0); // Present with vsync
|
||||||
|
|
|
@ -478,18 +478,13 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
||||||
|
|
||||||
deviceContext->CopyResource(framebufferCopy, framebufferTexture);
|
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_d3d11_opt_t frame_opt = {.clear_history = false,
|
||||||
.frame_direction = -1};
|
.frame_direction = -1};
|
||||||
|
|
||||||
libra.d3d11_filter_chain_frame(&filter_chain, deferredContext, frameCount, input,
|
libra.d3d11_filter_chain_frame(&filter_chain, deferredContext,
|
||||||
vp,
|
frameCount, framebufferCopySRV,
|
||||||
framebufferRTV, NULL, &frame_opt);
|
framebufferRTV, NULL,
|
||||||
|
NULL, &frame_opt);
|
||||||
|
|
||||||
ID3D11CommandList* commandList;
|
ID3D11CommandList* commandList;
|
||||||
deferredContext->FinishCommandList(false, &commandList);
|
deferredContext->FinishCommandList(false, &commandList);
|
||||||
|
|
|
@ -398,14 +398,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/,
|
||||||
|
|
||||||
assert(copySrv != nullptr);
|
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, NULL);
|
||||||
d3d11FrameBufferView, NULL, NULL);
|
|
||||||
|
|
||||||
copySrv->Release();
|
copySrv->Release();
|
||||||
framebufferCopy->Release();
|
framebufferCopy->Release();
|
||||||
|
|
Loading…
Reference in a new issue