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

◆ Present() [3/3]

unsafe void Microsoft.Xna.Framework.Graphics.GraphicsDevice.Present ( tagRECT * pSource,
tagRECT * pDest,
HWND__ * hOverride )
inlineprivate

Definition at line 796 of file GraphicsDevice.cs.

797 {
798 IntPtr intPtr = (IntPtr)pComPtr;
799 Helpers.CheckDisposed(this, intPtr);
801 {
802 throw new InvalidOperationException(FrameworkResources.CannotPresentActiveRenderTargets);
803 }
804 EffectPass effectPass = activePass;
805 if (effectPass != null)
806 {
807 effectPass.EndPass();
808 activePass = null;
809 }
810 if (lazyClearFlags != 0)
811 {
813 }
814 if (pSource == null && pDest == null && hOverride == null)
815 {
817 }
818 if (_insideScene)
819 {
820 IDirect3DDevice9* intPtr2 = pComPtr;
821 ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, int>)(int)(*(uint*)(*(int*)intPtr2 + 168)))((nint)intPtr2);
822 _insideScene = false;
823 }
824 try
825 {
826 IDirect3DDevice9* ptr = pComPtr;
827 int num = ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, tagRECT*, tagRECT*, HWND__*, _RGNDATA*, int>)(int)(*(uint*)(*(int*)ptr + 68)))((nint)ptr, pSource, pDest, hOverride, null);
829 if (num < 0)
830 {
831 if (num == -2005530520)
832 {
834 }
835 throw GraphicsHelpers.GetExceptionFromResult((uint)num);
836 }
837 }
839 {
840 }
841 }
void raise_DrawGuide(object sender, EventArgs e)
void raise_DeviceLost(object value0, EventArgs value1)
static readonly EventArgs Empty
Definition EventArgs.cs:9

References Microsoft.Xna.Framework.Graphics.GraphicsDevice._insideScene, Microsoft.Xna.Framework.Graphics.GraphicsDevice.activePass, Microsoft.Xna.Framework.FrameworkResources.CannotPresentActiveRenderTargets, Microsoft.Xna.Framework.Helpers.CheckDisposed(), Microsoft.Xna.Framework.Graphics.GraphicsDevice.ClearDirtyBuffers(), Microsoft.Xna.Framework.Graphics.GraphicsDevice.currentRenderTargetCount, Microsoft.Xna.Framework.Graphics.GraphicsDevice.DefaultClearOptions, System.EventArgs.Empty, Microsoft.Xna.Framework.Graphics.EffectPass.EndPass(), Microsoft.Xna.Framework.Graphics.GraphicsHelpers.GetExceptionFromResult(), Microsoft.Xna.Framework.Graphics.GraphicsDevice.lazyClearFlags, Microsoft.Xna.Framework.Graphics.GraphicsDevice.pComPtr, Microsoft.Xna.Framework.Graphics.GraphicsDevice.raise_DeviceLost(), and Microsoft.Xna.Framework.Graphics.GraphicsDevice.raise_DrawGuide().