示例#1
0
        /// <summary>	
        /// <p>Queries the device to determine whether the specified adapter supports the requested format and display mode. This method could be used in a loop to enumerate all the available adapter modes.</p>	
        /// </summary>	
        /// <param name="adapter"><dd>  <p>Ordinal number denoting the display adapter to enumerate. D3DADAPTER_DEFAULT is always the primary display adapter. This method returns <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/> when this value equals or exceeds the number of display adapters in the system. </p> </dd></param>	
        /// <param name="format"><dd>  <p>Allowable pixel formats. See Remarks.</p> </dd></param>	
        /// <param name="mode"><dd>  <p>Represents the display-mode index which is an unsigned integer between zero and the value returned by <strong>GetAdapterModeCount</strong> minus one.</p> </dd></param>	
        /// <returns><dd>  <p>A reference to the available display mode of type <strong><see cref="SharpDX.Direct3D9.DisplayMode"/></strong>. See Remarks.</p> </dd></returns>	
        /// <remarks>	
        /// <p>An application supplies a display mode and a format to <strong>EnumAdapterModes</strong> which returns a display mode. This method could be used in a loop to enumerate all available display modes.</p><p>The application specifies a format and the enumeration is restricted to those display modes that exactly match the format (alpha is ignored). Allowed formats (which are members of <see cref="SharpDX.Direct3D9.Format"/>) are as follows:</p><ul> <li><see cref="SharpDX.Direct3D9.Format.A1R5G5B5"/></li> <li><see cref="SharpDX.Direct3D9.Format.A2R10G10B10"/></li> <li><see cref="SharpDX.Direct3D9.Format.A8R8G8B8"/></li> <li><see cref="SharpDX.Direct3D9.Format.R5G6B5"/></li> <li><see cref="SharpDX.Direct3D9.Format.X1R5G5B5"/></li> <li><see cref="SharpDX.Direct3D9.Format.X8R8G8B8"/></li> </ul><p>In addition, <strong>EnumAdapterModes</strong> treats pixel formats 565 and 555 as equivalent, and returns the correct version. The difference comes into play only when the application locks the back buffer and there is an explicit flag that the application must set in order to accomplish this.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirect3D9::EnumAdapterModes']/*"/>	
        /// <msdn-id>bb174314</msdn-id>	
        /// <unmanaged>HRESULT IDirect3D9::EnumAdapterModes([In] unsigned int Adapter,[In] D3DFORMAT Format,[In] unsigned int Mode,[Out] D3DDISPLAYMODE* pMode)</unmanaged>	
        /// <unmanaged-short>IDirect3D9::EnumAdapterModes</unmanaged-short>	
        public SharpDX.Direct3D9.DisplayMode EnumAdapterModes(int adapter, SharpDX.Direct3D9.Format format, int mode) {
            unsafe {
                SharpDX.Direct3D9.DisplayMode modeRef;
                modeRef = new SharpDX.Direct3D9.DisplayMode();
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, adapter, unchecked((int)format), mode, &modeRef,((void**)(*(void**)_nativePointer))[7]);		
                __result__.CheckError();
                return modeRef;
            }
        }
示例#2
0
        /// <summary>	
        /// <p>Retrieves the current display mode of the adapter.</p>	
        /// </summary>	
        /// <param name="adapter"><dd>  <p>Ordinal number that denotes the display adapter to query. D3DADAPTER_DEFAULT is always the primary display adapter. </p> </dd></param>	
        /// <returns><dd>  <p>Pointer to a <strong><see cref="SharpDX.Direct3D9.DisplayMode"/></strong> structure, to be filled with information describing the current adapter's mode. </p> </dd></returns>	
        /// <remarks>	
        /// <p><strong>GetAdapterDisplayMode</strong> will not return the correct format when the display is in an extended format, such as 2:10:10:10. Instead, it returns the format X8R8G8B8. </p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirect3D9::GetAdapterDisplayMode']/*"/>	
        /// <msdn-id>bb174316</msdn-id>	
        /// <unmanaged>HRESULT IDirect3D9::GetAdapterDisplayMode([In] unsigned int Adapter,[Out] D3DDISPLAYMODE* pMode)</unmanaged>	
        /// <unmanaged-short>IDirect3D9::GetAdapterDisplayMode</unmanaged-short>	
        public SharpDX.Direct3D9.DisplayMode GetAdapterDisplayMode(int adapter) {
            unsafe {
                SharpDX.Direct3D9.DisplayMode modeRef;
                modeRef = new SharpDX.Direct3D9.DisplayMode();
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, adapter, &modeRef,((void**)(*(void**)_nativePointer))[8]);		
                __result__.CheckError();
                return modeRef;
            }
        }
示例#3
0
     /// <summary>	
     /// <p>Retrieves the display mode's spatial resolution, color resolution, and refresh frequency.</p>	
     /// </summary>	
     /// <param name="modeRef"><dd>  <p>Pointer to a <strong><see cref="SharpDX.Direct3D9.DisplayMode"/></strong> structure containing data about the display mode of the adapter. As opposed to the display mode of the device, which may not be active if the device does not own full-screen mode. </p> </dd></param>	
     /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>. </p></returns>	
     /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirect3DSwapChain9::GetDisplayMode']/*"/>	
     /// <msdn-id>bb205904</msdn-id>	
     /// <unmanaged>HRESULT IDirect3DSwapChain9::GetDisplayMode([Out] D3DDISPLAYMODE* pMode)</unmanaged>	
     /// <unmanaged-short>IDirect3DSwapChain9::GetDisplayMode</unmanaged-short>	
     internal void GetDisplayMode(out SharpDX.Direct3D9.DisplayMode modeRef) {
         unsafe {
             modeRef = new SharpDX.Direct3D9.DisplayMode();
             SharpDX.Result __result__;
             fixed (void* modeRef_ = &modeRef)
                 __result__= 
 				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, modeRef_,((void**)(*(void**)_nativePointer))[7]);		
             __result__.CheckError();
         }
     }