2 * Copyright (c) 2007-2010 SlimDX Group
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
30 /// <summary>Describes the presentation parameters of a device.</summary>
31 /// <unmanaged>D3DPRESENT_PARAMETERS</unmanaged>
32 public ref class PresentParameters : System::ICloneable, System::IEquatable<PresentParameters^>
35 D3DPRESENT_PARAMETERS ToUnmanaged();
36 PresentParameters( const D3DPRESENT_PARAMETERS& d3dpp );
38 virtual System::Object^ Clone2() = System::ICloneable::Clone
45 /// Initializes a new instance of the <see cref="PresentParameters"/> class.
50 /// Gets or sets the width of the back buffer.
52 property int BackBufferWidth;
55 /// Gets or sets the height of the back buffer.
57 property int BackBufferHeight;
60 /// The back buffer format.
62 property Format BackBufferFormat;
65 /// Gets or sets the number of back buffers that will be created.
67 property int BackBufferCount;
70 /// Gets or sets the multisampling type.
72 property MultisampleType Multisample;
75 /// Gets or sets the quality of the multisampling.
77 property int MultisampleQuality;
80 /// Gets or sets the swap effect.
82 property SwapEffect SwapEffect;
85 /// Gets or sets the device's window handle.
87 property System::IntPtr DeviceWindowHandle;
90 /// Gets or sets a value indicating whether the device will run in windowed or fullscreen mode.
92 /// <value><c>true</c> to run in windowed mode, <c>false</c> to run in fullscreen mode.</value>
93 property bool Windowed;
96 /// Gets or sets a value indicating whether a depth-stencil surface should be automatically created for the device.
98 property bool EnableAutoDepthStencil;
101 /// Gets or sets the format of the automatic depth-stencil buffer.
103 property Format AutoDepthStencilFormat;
106 /// Gets or sets flags describing how the device should present its data.
108 property PresentFlags PresentFlags;
111 /// Gets or sets the fullscreen refresh rate, in hertz.
113 property int FullScreenRefreshRateInHertz;
116 /// Gets or sets the presentation interval.
118 property PresentInterval PresentationInterval;
121 /// Clones the instance and returns a new object containing the same values.
123 /// <returns>A new <see cref="PresentParameters"/> object containing the same values as the current instance.</returns>
124 PresentParameters^ Clone();
127 /// Tests for equality between two objects.
129 /// <param name="left">The first value to compare.</param>
130 /// <param name="right">The second value to compare.</param>
131 /// <returns><c>true</c> if <paramref name="left"/> has the same value as <paramref name="right"/>; otherwise, <c>false</c>.</returns>
132 static bool operator == ( PresentParameters^ left, PresentParameters^ right );
135 /// Tests for inequality between two objects.
137 /// <param name="left">The first value to compare.</param>
138 /// <param name="right">The second value to compare.</param>
139 /// <returns><c>true</c> if <paramref name="left"/> has a different value than <paramref name="right"/>; otherwise, <c>false</c>.</returns>
140 static bool operator != ( PresentParameters^ left, PresentParameters^ right );
143 /// Returns the hash code for this instance.
145 /// <returns>A 32-bit signed integer hash code.</returns>
146 virtual int GetHashCode() override;
149 /// Returns a value that indicates whether the current instance is equal to a specified object.
151 /// <param name="obj">Object to make the comparison with.</param>
152 /// <returns><c>true</c> if the current instance is equal to the specified object; <c>false</c> otherwise.</returns>
153 virtual bool Equals( System::Object^ obj ) override;
156 /// Returns a value that indicates whether the current instance is equal to the specified object.
158 /// <param name="other">Object to make the comparison with.</param>
159 /// <returns><c>true</c> if the current instance is equal to the specified object; <c>false</c> otherwise.</returns>
160 virtual bool Equals( PresentParameters^ other );
163 /// Determines whether the specified object instances are considered equal.
165 /// <param name="value1">The first value to compare.</param>
166 /// <param name="value2">The second value to compare.</param>
167 /// <returns><c>true</c> if <paramref name="value1"/> is the same instance as <paramref name="value2"/> or
168 /// if both are <c>null</c> references or if <c>value1.Equals(value2)</c> returns <c>true</c>; otherwise, <c>false</c>.</returns>
169 static bool Equals( PresentParameters^ value1, PresentParameters^ value2 );