+++ /dev/null
-/*\r
-* Copyright (c) 2007-2010 SlimDX Group\r
-* \r
-* Permission is hereby granted, free of charge, to any person obtaining a copy\r
-* of this software and associated documentation files (the "Software"), to deal\r
-* in the Software without restriction, including without limitation the rights\r
-* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
-* copies of the Software, and to permit persons to whom the Software is\r
-* furnished to do so, subject to the following conditions:\r
-* \r
-* The above copyright notice and this permission notice shall be included in\r
-* all copies or substantial portions of the Software.\r
-* \r
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
-* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
-* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
-* THE SOFTWARE.\r
-*/\r
-#pragma once\r
-\r
-#include "Device.h"\r
-\r
-#include "Direct3DEx.h"\r
-#include "DisplayModeEx.h"\r
-\r
-using System::Runtime::InteropServices::OutAttribute;\r
-\r
-namespace SlimDX\r
-{\r
- namespace Direct3D9\r
- {\r
-#ifdef XMLDOCS\r
- ref class ResultCode;\r
-#endif\r
-\r
- public enum class DeviceState : System::Int32\r
- {\r
- Ok = D3D_OK,\r
- DeviceLost = D3DERR_DEVICELOST,\r
- DeviceHung = D3DERR_DEVICEHUNG,\r
- DeviceRemoved = D3DERR_DEVICEREMOVED,\r
- OutOfVideoMemory = D3DERR_OUTOFVIDEOMEMORY,\r
- PresentModeChanged = S_PRESENT_MODE_CHANGED,\r
- PresentOccluded = S_PRESENT_OCCLUDED\r
- };\r
-\r
- public enum class ResourceResidency : System::Int32\r
- {\r
- Resident = S_OK,\r
- ResidentInSharedMemory = S_RESIDENT_IN_SHARED_MEMORY,\r
- NotResident = S_NOT_RESIDENT\r
- };\r
-\r
- ref class Resource;\r
-\r
- /// <summary>\r
- /// Applications use the methods of DeviceEx to render primitives, create resources, work with\r
- /// system-level variables, adjust gamma ramp levels, work with palettes, and create shaders.\r
- /// </summary>\r
- /// <unmanaged>IDirect3DDevice9Ex</unmanaged>\r
- public ref class DeviceEx : Device\r
- {\r
- COMOBJECT(IDirect3DDevice9Ex, DeviceEx);\r
-\r
- private:\r
- void Internal_Constructor( Direct3DEx^ direct3D, int adapter, DeviceType deviceType, System::IntPtr controlHandle,\r
- CreateFlags createFlags, D3DDISPLAYMODEEX* fullscreenDisplayMode, ... array<PresentParameters^>^ presentParameters );\r
-\r
- public:\r
- /// <summary>\r
- /// Initializes a new instance of the <see cref="SlimDX::Direct3D9::DeviceEx"/> class.\r
- /// </summary>\r
- /// <param name="direct3D">The Direct3DEx instance to create the device from.</param>\r
- /// <param name="adapter">Ordinal number that denotes the display adapter.</param>\r
- /// <param name="deviceType">Denotes the desired device type. If the desired device type is not available, device creation will fail.</param>\r
- /// <param name="controlHandle">Specifies the target window for Direct3D rendering.</param>\r
- /// <param name="createFlags">Combination of one or more options that control device creation.</param>\r
- /// <param name="presentParameters">Describes the presentation parameters for the device being created.</param>\r
- DeviceEx( Direct3DEx^ direct3D, int adapter, DeviceType deviceType, System::IntPtr controlHandle,\r
- CreateFlags createFlags, PresentParameters^ presentParameters );\r
-\r
- /// <summary>\r
- /// Initializes a new instance of the <see cref="SlimDX::Direct3D9::DeviceEx"/> class.\r
- /// </summary>\r
- /// <param name="direct3D">The Direct3D instance to create the device from.</param>\r
- /// <param name="adapter">Ordinal number that denotes the display adapter.</param>\r
- /// <param name="deviceType">Denotes the desired device type. If the desired device type is not available, device creation will fail.</param>\r
- /// <param name="controlHandle">Specifies the target window for Direct3D rendering.</param>\r
- /// <param name="createFlags">Combination of one or more options that control device creation.</param>\r
- /// <param name="presentParameters">Describes the presentation parameters for the device being created.</param>\r
- /// <param name="fullScreenDisplayMode">The display mode for when the device is set to fullscreen.</param>\r
- DeviceEx( Direct3DEx^ direct3D, int adapter, DeviceType deviceType, System::IntPtr controlHandle,\r
- CreateFlags createFlags, PresentParameters^ presentParameters, DisplayModeEx fullScreenDisplayMode );\r
-\r
- /// <summary>\r
- /// Initializes a new instance of the <see cref="SlimDX::Direct3D9::DeviceEx"/> class.\r
- /// </summary>\r
- /// <param name="direct3D">The Direct3DEx instance to create the device from.</param>\r
- /// <param name="adapter">Ordinal number that denotes the display adapter.</param>\r
- /// <param name="deviceType">Denotes the desired device type. If the desired device type is not available, device creation will fail.</param>\r
- /// <param name="controlHandle">Specifies the target window for Direct3D rendering.</param>\r
- /// <param name="createFlags">Combination of one or more options that control device creation.</param>\r
- /// <param name="presentParameters">Describes the presentation parameters for the device being created.</param>\r
- DeviceEx( Direct3DEx^ direct3D, int adapter, DeviceType deviceType, System::IntPtr controlHandle,\r
- CreateFlags createFlags, array<PresentParameters^>^ presentParameters );\r
-\r
- /// <summary>\r
- /// Initializes a new instance of the <see cref="SlimDX::Direct3D9::DeviceEx"/> class.\r
- /// </summary>\r
- /// <param name="direct3D">The Direct3D instance to create the device from.</param>\r
- /// <param name="adapter">Ordinal number that denotes the display adapter.</param>\r
- /// <param name="deviceType">Denotes the desired device type. If the desired device type is not available, device creation will fail.</param>\r
- /// <param name="controlHandle">Specifies the target window for Direct3D rendering.</param>\r
- /// <param name="createFlags">Combination of one or more options that control device creation.</param>\r
- /// <param name="presentParameters">Describes the presentation parameters for the device being created.</param>\r
- /// <param name="fullScreenDisplayMode">The display mode for when the device is set to fullscreen.</param>\r
- DeviceEx( Direct3DEx^ direct3D, int adapter, DeviceType deviceType, System::IntPtr controlHandle,\r
- CreateFlags createFlags, array<PresentParameters^>^ presentParameters, array<DisplayModeEx>^ fullScreenDisplayMode );\r
-\r
- property int GpuThreadPriority\r
- {\r
- int get();\r
- void set( int priority );\r
- };\r
-\r
- property int MaximumFrameLatency\r
- {\r
- int get();\r
- void set( int maxLatency );\r
- };\r
-\r
- /// <summary>\r
- /// Reports the current cooperative-level status of the Direct3D device for a windowed or full-screen application.\r
- /// </summary>\r
- /// <param name="windowHandle">The destination window handle to check for occlusion. This parameter may be IntPtr.Zero</param>\r
- /// <returns>The current status of this device.</returns>\r
- /// <remarks>This method replaces the <see cref="SlimDX::Direct3D9::Device" />.TestCooperativeLevel function,\r
- /// which always returns <see cref="SlimDX::Direct3D9::ResultCode" />.Success in Direct3D 9Ex applications.</remarks>\r
- /// <unmanaged>IDirect3DDevice9Ex::CheckDeviceState</unmanaged>\r
- DeviceState CheckDeviceState( System::IntPtr windowHandle );\r
-\r
- /// <summary>\r
- /// Checks a resource to determine if it is likely that it will cause a large stall at\r
- /// Draw time because the system must make the resource GPU-accessible.\r
- /// </summary>\r
- /// <param name="resource">An resource to check the residency status of.</param>\r
- /// <returns>See the DirectX documentation.</returns>\r
- /// <remarks>See the DirectX documentation.</remarks>\r
- /// <unmanaged>IDirect3DDevice9Ex::CheckResourceResidency</unmanaged>\r
- ResourceResidency CheckResourceResidency( Resource^ resource );\r
-\r
- /// <summary>\r
- /// Checks an array of resources to determine if it is likely that they will cause a large stall at\r
- /// Draw time because the system must make the resources GPU-accessible.\r
- /// </summary>\r
- /// <param name="resources">An array of resources to check the residency status of.</param>\r
- /// <returns>See the DirectX documentation.</returns>\r
- /// <remarks>See the DirectX documentation.</remarks>\r
- /// <unmanaged>IDirect3DDevice9Ex::CheckResourceResidency</unmanaged>\r
- ResourceResidency CheckResourceResidency( array<Resource^>^ resources );\r
-\r
- /// <summary>\r
- /// Retrieves the display mode's spatial resolution, color resolution, and refresh frequency.\r
- /// </summary>\r
- /// <param name="swapChain">The swap chain to retrieve display mode data about.</param>\r
- /// <returns>Extended display mode information about the adapter.</returns>\r
- /// <unmanaged>IDirect3DDevice9Ex::GetDisplayModeEx</unmanaged>\r
- DisplayModeEx GetDisplayModeEx( int swapChain );\r
-\r
- /// <summary>\r
- /// Retrieves the display mode's spatial resolution, color resolution, refresh frequency, and rotation settings.\r
- /// </summary>\r
- /// <param name="swapChain">The swap chain to retrieve display mode data about.</param>\r
- /// <param name="rotation">Receives the rotation setting of the adapter.</param>\r
- /// <returns>Extended display mode information about the adapter.</returns>\r
- /// <unmanaged>IDirect3DDevice9Ex::GetDisplayModeEx</unmanaged>\r
- DisplayModeEx GetDisplayModeEx( int swapChain, [Out] DisplayRotation% rotation );\r
-\r
- Result PresentEx( SlimDX::Direct3D9::Present flags );\r
- Result PresentEx( SlimDX::Direct3D9::Present flags, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle );\r
- Result PresentEx( SlimDX::Direct3D9::Present flags, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle, System::IntPtr windowOverride );\r
- Result PresentEx( SlimDX::Direct3D9::Present flags, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle, System::IntPtr windowOverride, System::Drawing::Region^ region );\r
-\r
- /// <summary>\r
- /// Resets the device.\r
- /// </summary>\r
- /// <param name="presentParameters">A set of new presentation parameters to apply to the device.</param>\r
- /// <returns>A <see cref="SlimDX::Result"/>Object describing the result of the operation.</returns>\r
- /// <unmanaged>IDirect3DDevice9Ex::ResetEx</unmanaged>\r
- Result ResetEx( PresentParameters^ presentParameters );\r
-\r
- /// <summary>\r
- /// Resets the device.\r
- /// </summary>\r
- /// <param name="presentParameters">A set of new presentation parameters to apply to the device.</param>\r
- /// <param name="fullScreenDisplayMode">The properties of the desired display mode, when running fullscreen.</param>\r
- /// <returns>A <see cref="SlimDX::Result"/>Object describing the result of the operation.</returns>\r
- /// <unmanaged>IDirect3DDevice9Ex::ResetEx</unmanaged>\r
- Result ResetEx( PresentParameters^ presentParameters, DisplayModeEx fullScreenDisplayMode );\r
-\r
- /// <summary>\r
- /// Suspend execution of the calling thread until the next vertical blank signal.\r
- /// </summary>\r
- /// <param name="swapChain">Zero based swap chain index to specify the target chain on a multihead card.</param>\r
- /// <unmanaged>IDirect3DDevice9Ex::WaitForVBlank</unmanaged>\r
- void WaitForVBlank( int swapChain );\r
-\r
- Result SetConvolutionMonoKernel(int width, int height, array<float>^ rowWeights, array<float>^ columnWeights);\r
- Result ComposeRects(Surface^ source, Surface^ destination, int rectangleCount, VertexBuffer^ sourceRectangleDescriptors, VertexBuffer^ destinationRectangleDescriptors, ComposeRectOperation operation, int xOffset, int yOffset);\r
-\r
- literal int ConvolutionMaxWidth = D3DCONVOLUTIONMONO_MAXWIDTH;\r
- literal int ConvolutionMaxHeight = D3DCONVOLUTIONMONO_MAXHEIGHT;\r
- };\r
- }\r
-}
\ No newline at end of file