Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetRenderTargetSurface()

unsafe IDirect3DSurface9 * Microsoft.Xna.Framework.Graphics.RenderTargetHelper.GetRenderTargetSurface ( CubeMapFace faceType)
inlinepackage

Definition at line 171 of file RenderTargetHelper.cs.

172 {
173 IDirect3DSurface9* ptr = null;
174 IDirect3DSurface9* ptr2 = pRenderTargetSurface;
175 if (ptr2 != null)
176 {
177 ptr = ptr2;
178 IDirect3DSurface9* intPtr = ptr;
179 ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, uint>)(int)(*(uint*)(*(int*)intPtr + 4)))((nint)intPtr);
180 }
181 else if (isCubemap)
182 {
183 IDirect3DCubeTexture9* pComPtr = ((TextureCube)pTexture).pComPtr;
184 ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, _D3DCUBEMAP_FACES, uint, IDirect3DSurface9**, int>)(int)(*(uint*)(*(int*)pComPtr + 72)))((nint)pComPtr, (_D3DCUBEMAP_FACES)faceType, 0u, &ptr);
185 }
186 else
187 {
188 IDirect3DTexture9* pComPtr2 = ((Texture2D)pTexture).pComPtr;
189 ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, uint, IDirect3DSurface9**, int>)(int)(*(uint*)(*(int*)pComPtr2 + 72)))((nint)pComPtr2, 0u, &ptr);
190 }
191 return ptr;
192 }

References Microsoft.Xna.Framework.Graphics.RenderTargetHelper.isCubemap, Microsoft.Xna.Framework.Graphics.RenderTargetHelper.pRenderTargetSurface, Microsoft.Xna.Framework.Graphics.RenderTargetHelper.pTexture, Microsoft.Xna.Framework.Graphics.Texture2D, and Microsoft.Xna.Framework.Graphics.TextureCube.

Referenced by Microsoft.Xna.Framework.Graphics.GraphicsDevice.ClearDirtyBuffers(), and Microsoft.Xna.Framework.Graphics.GraphicsDevice.SetRenderTargets().