diff --git a/Source/OpenTK/DisplayMode.cs b/Source/OpenTK/DisplayMode.cs
index cf21799a..a4bd0cb6 100644
--- a/Source/OpenTK/DisplayMode.cs
+++ b/Source/OpenTK/DisplayMode.cs
@@ -33,33 +33,28 @@ namespace OpenTK
#region --- Constructors ---
+ public DisplayMode(DisplayMode mode)
+ : this(mode.Width, mode.Height, mode.Color, mode.DepthBits, mode.StencilBits, mode.AuxBits, mode.Buffers,
+ mode.Fullscreen, mode.Stereo, mode.Vsync, mode.RefreshRate)
+ {
+ }
+
///
- /// Constructs a new DisplayMode from the given parameters.
+ /// Constructs a new DisplayMode from the specified parameters.
///
/// The Width of the DisplayMode, in pixels.
/// The Height of the DisplayMode, in pixels.
- /// The ColorDepth of the DisplayMode.
- /// The size of the Depth Buffer, in bits.
- /// The size of Stencil Buffer, in bits.
- /// The size of the Auxilliary Buffer, in bits.
+ /// The ColorMode of the color buffer.
+ /// The number of bits in the depth buffer.
+ /// The number of bits in the stencil buffer.
+ /// The number of bits in the auxilliary buffer.
/// Set to true for a fullscreen DisplayMode.
/// Set to true for a DisplayMode with stereographic capabilities.
- /// The number of Display Buffers. Usually one, two or three.
+ /// The number of render buffers. Typical values include one (single-), two (double-) or three (triple-buffering).
/// Set to true to sync the updates to the screen refresh rate.
/// The desired RefreshRate. Taken into account only for Fullscreen DisplayModes.
- public DisplayMode(
- int width,
- int height,
- ColorMode color,
- int depth,
- int stencil,
- int aux,
- int buffers,
- bool fullscreen,
- bool stereo,
- bool vsync,
- float refresh
- )
+ public DisplayMode(int width, int height, ColorMode color, int depth, int stencil, int aux, int buffers,
+ bool fullscreen, bool stereo, bool vsync, float refresh)
{
this.Width = width;
this.Height = height;
@@ -74,6 +69,37 @@ namespace OpenTK
this.RefreshRate = refresh;
}
+
+ ///
+ /// Constructs a new DisplayMode from the specified parameters.
+ ///
+ /// The Width of the DisplayMode, in pixels.
+ /// The Height of the DisplayMode, in pixels.
+ /// The number of bits in the color buffer.
+ /// The number of bits in the depth buffer.
+ /// The number of bits in the stencil buffer.
+ /// The number of bits in the auxilliary buffer.
+ /// Set to true for a fullscreen DisplayMode.
+ /// Set to true for a DisplayMode with stereographic capabilities.
+ /// The number of render buffers. Typical values include one (single-), two (double-) or three (triple-buffering).
+ /// Set to true to sync the updates to the screen refresh rate.
+ /// The desired RefreshRate. Taken into account only for Fullscreen DisplayModes.
+ public DisplayMode(int width, int height, int color, int depth, int stencil, int aux, int buffers,
+ bool fullscreen, bool stereo, bool vsync, float refresh)
+ {
+ this.Width = width;
+ this.Height = height;
+ this.Color = new ColorMode(color);
+ this.DepthBits = depth;
+ this.StencilBits = stencil;
+ this.AuxBits = aux;
+ this.Buffers = buffers;
+ this.Fullscreen = fullscreen;
+ this.Stereo = stereo;
+ this.Vsync = vsync;
+ this.RefreshRate = refresh;
+ }
+
///
/// Constructs a new DisplayMode with default values.
///
@@ -83,7 +109,7 @@ namespace OpenTK
}
///
- /// Creates a DisplayMode.
+ /// Constructs a new DisplayMode.
///
/// The Width of the DisplayMode in pixels.
/// The Height of the DisplayMode in pixels.
@@ -92,6 +118,78 @@ namespace OpenTK
{
}
+ ///
+ /// Constructs a new DisplayMode.
+ ///
+ /// The Width of the DisplayMode in pixels.
+ /// The Height of the DisplayMode in pixels.
+ /// The number of bits in the color buffer.
+ public DisplayMode(int width, int height, int color)
+ : this(width, height, new ColorMode(color), 16, 0, 0, 0, false, false, false, 0.0f)
+ {
+ }
+
+ ///
+ /// Constructs a new DisplayMode.
+ ///
+ /// The Width of the DisplayMode in pixels.
+ /// The Height of the DisplayMode in pixels.
+ /// The ColorMode of the color buffer.
+ public DisplayMode(int width, int height, ColorMode color)
+ : this(width, height, color, 16, 0, 0, 0, false, false, false, 0.0f)
+ {
+ }
+
+ ///
+ /// Constructs a new DisplayMode.
+ ///
+ /// The Width of the DisplayMode in pixels.
+ /// The Height of the DisplayMode in pixels.
+ /// The number of bits in the color buffer.
+ /// The number of bits in the depth buffer.
+ public DisplayMode(int width, int height, int color, int depth)
+ : this(width, height, new ColorMode(color), depth, 0, 0, 0, false, false, false, 0.0f)
+ {
+ }
+
+ ///
+ /// Constructs a new DisplayMode.
+ ///
+ /// The Width of the DisplayMode in pixels.
+ /// The Height of the DisplayMode in pixels.
+ /// The ColorMode of the color buffer.
+ /// The number of bits in the depth buffer.
+ public DisplayMode(int width, int height, ColorMode color, int depth)
+ : this(width, height, color, depth, 0, 0, 0, false, false, false, 0.0f)
+ {
+ }
+
+ ///
+ /// Constructs a new DisplayMode.
+ ///
+ /// The Width of the DisplayMode in pixels.
+ /// The Height of the DisplayMode in pixels.
+ /// The number of bits in the color buffer.
+ /// The number of bits in the depth buffer.
+ /// True for a fullscreen DisplayMode, false otherwise.
+ public DisplayMode(int width, int height, int color, int depth, bool fullscreen)
+ : this(width, height, color, depth, 0, 0, 0, fullscreen, false, false, 0.0f)
+ {
+ }
+
+ ///
+ /// Constructs a new DisplayMode.
+ ///
+ /// The Width of the DisplayMode in pixels.
+ /// The Height of the DisplayMode in pixels.
+ /// The ColorMode of the color buffer.
+ /// The number of bits in the depth buffer.
+ /// True for a fullscreen DisplayMode, false otherwise.
+ public DisplayMode(int width, int height, ColorMode color, int depth, bool fullscreen)
+ : this(width, height, color, depth, 0, 0, 0, fullscreen, false, false, 0.0f)
+ {
+ }
+
#endregion
#region --- Public Properties ---
@@ -192,7 +290,6 @@ namespace OpenTK
set { this.refreshRate = value; }
}
-
#endregion
public override string ToString()