Пример #1
0
 /// <unmanaged>HRESULT IDirect3DDevice9::GetDisplayMode([In] unsigned int iSwapChain,[Out] D3DDISPLAYMODE* pMode)</unmanaged>
 public unsafe HRESULT GetDisplayMode(int iSwapChain, out D3DDISPLAYMODE mode)
 {
     fixed(void *pMode = &mode)
     {
         //calli(System.Int32(System.Void*,System.Int32,System.Void*), this._nativePointer, iSwapChain, &result, *(*(IntPtr*)this._nativePointer + (IntPtr)8 * (IntPtr)sizeof(void*))).CheckError();
         return((HRESULT)NativeHelper.CalliInt32(8, _nativePointer, (int)iSwapChain, (void *)pMode));
     }
 }
Пример #2
0
        public IList <D3DDISPLAYMODE> GetDisplayModes(D3DFORMAT format)
        {
            var modeCount = _direct3d.GetAdapterModeCount(this.Adapter, format);
            var list      = new List <D3DDISPLAYMODE>(modeCount);

            for (var i = 0; i < modeCount; i++)
            {
                var mode = new D3DDISPLAYMODE();
                var hr   = _direct3d.EnumAdapterModes(this.Adapter, format, i, out mode);
                hr.CheckError();
                list.Add(mode);
            }
            return(list);
        }
Пример #3
0
 /// <unmanaged>HRESULT IDirect3D9::EnumAdapterModes([In] unsigned int Adapter,[In] D3DFORMAT Format,[In] unsigned int Mode,[Out] D3DDISPLAYMODE* pMode)</unmanaged>
 public unsafe HRESULT EnumAdapterModes(int adapter, D3DFORMAT format, int mode, out D3DDISPLAYMODE d3dMode)
 {
     fixed(void *pMode = &d3dMode)
     {
         //calli(System.Int32(System.Void*,System.Int32,System.Int32,System.Int32,System.Void*), this._nativePointer, adapter, format, mode, &result, *(*(IntPtr*)this._nativePointer + (IntPtr)7 * (IntPtr)sizeof(void*))).CheckError();
         return((HRESULT)NativeHelper.CalliInt32(7, _nativePointer, (int)adapter, (int)format, (int)mode, (void *)pMode));
     }
 }