Exemplo n.º 1
0
        /// <summary>	
        /// <p>This method returns the actual display mode info based on the given mode index.</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="filterRef"><dd>  <p>See <strong><see cref="SharpDX.Direct3D9.DisplayModeFilter"/></strong>.</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 GetAdapterModeCount minus one.</p> </dd></param>	
        /// <returns><dd>  <p>A reference to the available display mode of type <strong><see cref="SharpDX.Direct3D9.DisplayModeEx"/></strong>.</p> </dd></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirect3D9Ex::EnumAdapterModesEx']/*"/>	
        /// <msdn-id>bb174303</msdn-id>	
        /// <unmanaged>HRESULT IDirect3D9Ex::EnumAdapterModesEx([In] unsigned int Adapter,[In] const D3DDISPLAYMODEFILTER* pFilter,[In] unsigned int Mode,[Out] D3DDISPLAYMODEEX* pMode)</unmanaged>	
        /// <unmanaged-short>IDirect3D9Ex::EnumAdapterModesEx</unmanaged-short>	
        public SharpDX.Direct3D9.DisplayModeEx EnumerateAdapterModesEx(int adapter, SharpDX.Direct3D9.DisplayModeFilter filterRef, int mode) {
            unsafe {
                SharpDX.Direct3D9.DisplayModeEx modeRef;
                var modeRef_ = SharpDX.Direct3D9.DisplayModeEx.__NewNative();
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, adapter, &filterRef, mode, &modeRef_,((void**)(*(void**)_nativePointer))[18]);		
                modeRef = new SharpDX.Direct3D9.DisplayModeEx();
                modeRef.__MarshalFrom(ref modeRef_);
                __result__.CheckError();
                return modeRef;
            }
        }
Exemplo n.º 2
0
     /// <summary>	
     /// <p>Retrieves the current display mode and rotation settings 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>	
     /// <param name="rotationRef"><dd>  <p>Pointer to a <strong><see cref="SharpDX.Direct3D9.DisplayRotation"/></strong> structure indicating the type of screen rotation the application will do. The value returned through this reference is important when the <see cref="SharpDX.Direct3D9.PresentFlags.NoAutoRotate"/> flag is used; otherwise, it can be set to <strong><c>null</c></strong>.</p> </dd></param>	
     /// <returns><dd>  <p>Pointer to a <strong><see cref="SharpDX.Direct3D9.DisplayModeEx"/></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. Can be set to <strong><c>null</c></strong>.</p> </dd></returns>	
     /// <remarks>	
     /// <p><strong>GetAdapterDisplayModeEx</strong> does 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><p>To windowed applications, a value of <see cref="SharpDX.Direct3D9.ResultCode.PresentModeChanged"/> returned from <strong>PresentEx</strong> or <strong>CheckDeviceState</strong> indicates that the display mode changed and that the current display mode might have a different format. To avoid a color-converting Present blt, windowed applications can optionally get new display mode information by using this method and adjusting its swap chain format accordingly. This method returns <see cref="SharpDX.Direct3D9.ResultCode.NotAvailable"/> if this head is no longer part of the desktop or if the monitor is disconnected.</p>	
     /// </remarks>	
     /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirect3D9Ex::GetAdapterDisplayModeEx']/*"/>	
     /// <msdn-id>bb174304</msdn-id>	
     /// <unmanaged>HRESULT IDirect3D9Ex::GetAdapterDisplayModeEx([In] unsigned int Adapter,[Out] D3DDISPLAYMODEEX* pMode,[Out] D3DDISPLAYROTATION* pRotation)</unmanaged>	
     /// <unmanaged-short>IDirect3D9Ex::GetAdapterDisplayModeEx</unmanaged-short>	
     public SharpDX.Direct3D9.DisplayModeEx GetAdapterDisplayModeEx(int adapter, out SharpDX.Direct3D9.DisplayRotation rotationRef) {
         unsafe {
             SharpDX.Direct3D9.DisplayModeEx modeRef;
             var modeRef_ = SharpDX.Direct3D9.DisplayModeEx.__NewNative();
             SharpDX.Result __result__;
             fixed (void* rotationRef_ = &rotationRef)
                 __result__= 
 				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, adapter, &modeRef_, rotationRef_,((void**)(*(void**)_nativePointer))[19]);		
             modeRef = new SharpDX.Direct3D9.DisplayModeEx();
             modeRef.__MarshalFrom(ref modeRef_);
             __result__.CheckError();
             return modeRef;
         }
     }
Exemplo n.º 3
0
        /// <summary>	
        /// <p>Retrieves the display mode's spatial resolution, color resolution, refresh frequency, and rotation settings.</p>	
        /// </summary>	
        /// <param name="iSwapChain"><dd>  <p>An unsigned integer specifying the swap chain.</p> </dd></param>	
        /// <param name="rotationRef"><dd>  <p>Pointer to a <strong><see cref="SharpDX.Direct3D9.DisplayRotation"/></strong> indicating the type of screen rotation the application will do. The value returned through this reference is important when the <see cref="SharpDX.Direct3D9.PresentFlags.NoAutoRotate"/> flag is used; otherwise, it can be set to <strong><c>null</c></strong>.</p> </dd></param>	
        /// <returns><dd>  <p>Pointer to a <strong><see cref="SharpDX.Direct3D9.DisplayModeEx"/></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. Can be set to <strong><c>null</c></strong>.</p> </dd></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirect3DDevice9Ex::GetDisplayModeEx']/*"/>	
        /// <msdn-id>bb509714</msdn-id>	
        /// <unmanaged>HRESULT IDirect3DDevice9Ex::GetDisplayModeEx([In] unsigned int iSwapChain,[Out] D3DDISPLAYMODEEX* pMode,[In] void* pRotation)</unmanaged>	
        /// <unmanaged-short>IDirect3DDevice9Ex::GetDisplayModeEx</unmanaged-short>	
        internal SharpDX.Direct3D9.DisplayModeEx GetDisplayModeEx(int iSwapChain, System.IntPtr rotationRef) {
            unsafe {
                SharpDX.Direct3D9.DisplayModeEx modeRef;
                var modeRef_ = SharpDX.Direct3D9.DisplayModeEx.__NewNative();
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, iSwapChain, &modeRef_, (void*)rotationRef,((void**)(*(void**)_nativePointer))[133]);		
                modeRef = new SharpDX.Direct3D9.DisplayModeEx();
                modeRef.__MarshalFrom(ref modeRef_);
                __result__.CheckError();
                return modeRef;
            }
        }