1825 {
1827 Helpers.CheckDisposed(this, intPtr);
1829 {
1830 int num = 0;
1831 if (0 >= renderTargetCount)
1832 {
1833 return;
1834 }
1837 RenderTargetBinding* ptr = pBindings;
1838 while (ptr->_renderTarget ==
array[num]._renderTarget && ptr->_cubeMapFace ==
array[num]._cubeMapFace)
1839 {
1840 num++;
1841 ptr = (RenderTargetBinding*)(num2 + (byte*)ptr);
1842 if (num >= renderTargetCount)
1843 {
1844 return;
1845 }
1846 }
1847 if (num >= renderTargetCount)
1848 {
1849 return;
1850 }
1851 }
1853 if (renderTargetCount > maxRenderTargets)
1854 {
1856 }
1857 int num3 = 0;
1858 if (0 < renderTargetCount)
1859 {
1860 do
1861 {
1863 if (renderTarget != null)
1864 {
1866 Helpers.CheckDisposed(renderTarget, intPtr2);
1867 if (renderTarget.GraphicsDevice == this)
1868 {
1869 if (num3 > 0)
1870 {
1871 int num4 = 0;
1872 if (0 < num3)
1873 {
1875 RenderTargetBinding* ptr2 = pBindings;
1876 do
1877 {
1878 if (renderTarget != ptr2->_renderTarget)
1879 {
1880 num4++;
1881 ptr2 = (RenderTargetBinding*)(num5 + (byte*)ptr2);
1882 continue;
1883 }
1884 throw new ArgumentException(FrameworkResources.CannotSetAlreadyUsedRenderTarget);
1885 }
1886 while (num4 < num3);
1887 }
1888 if (!RenderTargetHelper.IsSameSize(renderTarget, pBindings->_renderTarget))
1889 {
1891 }
1892 }
1893 num3++;
1894 continue;
1895 }
1897 }
1899 }
1900 while (num3 < renderTargetCount);
1901 }
1903 {
1905 }
1906 else
1907 {
1909 {
1911 }
1912 int num6 = 0;
1914 {
1915 do
1916 {
1918 num6++;
1919 }
1921 }
1922 }
1923 int num7 = 0;
1926 currentViewport.MaxDepth = 1f;
1927 if (renderTargetCount <= 0)
1928 {
1929 IDirect3DSurface9* ptr3 = null;
1930 IDirect3DDevice9* ptr4 =
pComPtr;
1931 ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, uint, uint, _D3DBACKBUFFER_TYPE, IDirect3DSurface9**,
int>)(
int)(*(uint*)(*(
int*)ptr4 + 72)))((nint)ptr4, 0u, 0u, (_D3DBACKBUFFER_TYPE)0, &ptr3);
1932 IDirect3DDevice9* ptr5 =
pComPtr;
1933 num7 = ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, uint, IDirect3DSurface9*,
int>)(
int)(*(uint*)(*(
int*)ptr5 + 148)))((nint)ptr5, 0u, ptr3);
1934 if (ptr3 != null)
1935 {
1936 IDirect3DSurface9* intPtr3 = ptr3;
1937 ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, uint>)(
int)(*(uint*)(*(
int*)intPtr3 + 8)))((nint)intPtr3);
1938 ptr3 = null;
1939 }
1940 if (num7 >= 0)
1941 {
1943 num7 = ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, IDirect3DSurface9*,
int>)(
int)(*(uint*)(*(
int*)ptr5 + 156)))((nint)ptr5,
pImplicitDepthSurface);
1944 }
1946 {
1948 }
1949 else
1950 {
1952 }
1955 }
1956 else
1957 {
1959 int num8 = 0;
1960 if (0 < renderTargetCount)
1961 {
1962 do
1963 {
1965 RenderTargetHelper renderTargetHelper = RenderTargetHelper.FromRenderTarget(renderTarget2);
1969 renderTarget2.isActiveRenderTarget = true;
1970 if (!renderTargetHelper.willItBlend)
1971 {
1974 }
1975 if (num7 >= 0)
1976 {
1977 IDirect3DSurface9* renderTargetSurface = renderTargetHelper.GetRenderTargetSurface(((RenderTargetBinding*)(
System.
Runtime.
CompilerServices.
Unsafe.SizeOf<RenderTargetBinding>() * num8 + (
byte*)pBindings))->_cubeMapFace);
1978 IDirect3DDevice9* ptr6 =
pComPtr;
1979 num7 = ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, uint, IDirect3DSurface9*,
int>)(
int)(*(uint*)(*(
int*)ptr6 + 148)))((nint)ptr6, (uint)num8, renderTargetSurface);
1980 if (renderTargetSurface != null)
1981 {
1982 ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, uint>)(
int)(*(uint*)(*(
int*)renderTargetSurface + 8)))((nint)renderTargetSurface);
1983 }
1984 if (num7 >= 0 && num8 == 0)
1985 {
1986 IDirect3DDevice9* ptr7 =
pComPtr;
1987 num7 = ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, IDirect3DSurface9*,
int>)(
int)(*(uint*)(*(
int*)ptr7 + 156)))((nint)ptr7, renderTargetHelper.pDepthSurface);
1988 }
1989 }
1990 if (renderTargetHelper.usage == RenderTargetUsage.DiscardContents)
1991 {
1993 if (num8 == 0)
1994 {
1996 }
1997 }
1998 else if (renderTargetHelper.pRenderTargetSurface != null && (renderTargetHelper.isCubemap || renderTarget2.renderTargetContentsDirty) && num7 >= 0)
1999 {
2001 {
2002 IDirect3DDevice9* intPtr4 =
pComPtr;
2003 ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr,
int>)(
int)(*(uint*)(*(
int*)intPtr4 + 168)))((nint)intPtr4);
2004 }
2005 IDirect3DSurface9* destinationSurface = renderTargetHelper.GetDestinationSurface(((RenderTargetBinding*)(
System.
Runtime.
CompilerServices.
Unsafe.SizeOf<RenderTargetBinding>() * num8 + (
byte*)pBindings))->_cubeMapFace, 0);
2006 IDirect3DSurface9* pRenderTargetSurface = renderTargetHelper.pRenderTargetSurface;
2007 IDirect3DDevice9* ptr8 =
pComPtr;
2008 int num10 = ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, IDirect3DSurface9*, tagRECT*, IDirect3DSurface9*, tagRECT*, _D3DTEXTUREFILTERTYPE,
int>)(
int)(*(uint*)(*(
int*)ptr8 + 136)))((nint)ptr8, destinationSurface,
null, pRenderTargetSurface,
null, (_D3DTEXTUREFILTERTYPE)0);
2009 num7 = ((num10 < 0) ? _003CModule_003E.D3DXLoadSurfaceFromSurface(pRenderTargetSurface, null, null, destinationSurface, null, null, uint.MaxValue, 0u) : num10);
2010 if (destinationSurface != null)
2011 {
2012 ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, uint>)(
int)(*(uint*)(*(
int*)destinationSurface + 8)))((nint)destinationSurface);
2013 }
2014 if (num7 >= 0)
2015 {
2016 renderTarget2.renderTargetContentsDirty = false;
2017 }
2019 {
2020 IDirect3DDevice9* intPtr5 =
pComPtr;
2021 ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr,
int>)(
int)(*(uint*)(*(
int*)intPtr5 + 164)))((nint)intPtr5);
2022 }
2023 }
2024 num8++;
2025 }
2026 while (num8 < renderTargetCount);
2027 }
2030 }
2031 int num11 = renderTargetCount;
2033 {
2034 do
2035 {
2038 if (num11 > 0)
2039 {
2040 IDirect3DDevice9* ptr9 =
pComPtr;
2041 ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, uint, IDirect3DSurface9*,
int>)(
int)(*(uint*)(*(
int*)ptr9 + 148)))((nint)ptr9, (uint)num11,
null);
2042 }
2043 num11++;
2044 }
2046 }
2049 if (num7 < 0)
2050 {
2051 throw GraphicsHelpers.GetExceptionFromResult((uint)num7);
2052 }
2053 }
SurfaceFormat whyWontItBlend
PresentationParameters pInternalCachedParams
int savedBackBufferClearFlags
ProfileCapabilities _profileCapabilities
ClearOptions DefaultClearOptions
RenderTargetBinding[] currentRenderTargetBindings
unsafe void ClearDirtyBuffers()
unsafe IDirect3DSurface9 * pImplicitDepthSurface
int currentRenderTargetCount
unsafe IDirect3DDevice9 * pComPtr
unsafe void ResolveRenderTarget(int index)
RenderTargetHelper[] currentRenderTargets
RenderTargetUsage RenderTargetUsage
void ThrowNotSupportedException(string message)