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

◆ IsValidDepthFormat()

unsafe bool Microsoft.Xna.Framework.Graphics.GraphicsAdapter.IsValidDepthFormat ( DepthFormat depthFormat,
SurfaceFormat surfaceFormat,
_D3DDEVTYPE deviceType,
ProfileCapabilities profileCapabilities )
inlineprivate

Definition at line 665 of file GraphicsAdapter.cs.

666 {
667 if (depthFormat == DepthFormat.None)
668 {
669 return true;
670 }
671 if (!profileCapabilities.ValidDepthFormats.Contains(depthFormat))
672 {
673 return false;
674 }
675 if (deviceType != (_D3DDEVTYPE)4)
676 {
677 int num = *(int*)pComPtr + 48;
678 if (((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, uint, _D3DDEVTYPE, _D3DFORMAT, _D3DFORMAT, _D3DFORMAT, int>)(int)(*(uint*)num))((nint)pComPtr, adapter, deviceType, ProfileChecker.IRRELEVANT_ADAPTER_FORMAT, _003CModule_003E.ConvertXnaFormatToWindows(surfaceFormat), _003CModule_003E.ConvertXnaFormatToWindows(depthFormat)) < 0)
679 {
680 return false;
681 }
682 }
683 return true;
684 }
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)

References Microsoft.Xna.Framework.Graphics.GraphicsAdapter.adapter, System.Collections.Generic.Dictionary< TKey, TValue >.Contains(), Microsoft.Xna.Framework.Graphics.ProfileChecker.IRRELEVANT_ADAPTER_FORMAT, and Microsoft.Xna.Framework.Graphics.GraphicsAdapter.pComPtr.

Referenced by Microsoft.Xna.Framework.Graphics.GraphicsAdapter.QueryDepthFormat().