MCPcopy Create free account
hub / github.com/crosire/reshade / GetRenderTargetData

Method GetRenderTargetData

source/d3d9/d3d9_device.cpp:1038–1058  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1036 return _orig->UpdateTexture(pSrcTexture, pDstTexture);
1037}
1038HRESULT STDMETHODCALLTYPE Direct3DDevice9::GetRenderTargetData(IDirect3DSurface9 *pSrcSurface, IDirect3DSurface9 *pDstSurface)
1039{
1040#if RESHADE_ADDON >= 2
1041 assert(pSrcSurface != nullptr && pDstSurface != nullptr);
1042
1043 if (reshade::has_addon_event<reshade::addon_event::copy_texture_region>())
1044 {
1045 uint32_t src_subresource;
1046 const reshade::api::resource src_resource =
1047 get_resource_from_view(to_handle(pSrcSurface), &src_subresource);
1048 uint32_t dst_subresource;
1049 const reshade::api::resource dst_resource =
1050 get_resource_from_view(to_handle(pDstSurface), &dst_subresource);
1051
1052 if (reshade::invoke_addon_event<reshade::addon_event::copy_texture_region>(this, src_resource, src_subresource, nullptr, dst_resource, dst_subresource, nullptr, reshade::api::filter_mode::min_mag_mip_point))
1053 return D3D_OK;
1054 }
1055#endif
1056
1057 return _orig->GetRenderTargetData(pSrcSurface, pDstSurface);
1058}
1059HRESULT STDMETHODCALLTYPE Direct3DDevice9::GetFrontBufferData(UINT iSwapChain, IDirect3DSurface9 *pDestSurface)
1060{
1061 if (iSwapChain != 0)

Callers 1

copy_texture_regionMethod · 0.80

Calls 1

to_handleFunction · 0.70

Tested by

no test coverage detected