Added needed DisplayMode constructors. Fixed DisplayMode documentation.
This commit is contained in:
parent
a28c46cdc0
commit
d9cedc213b
1 changed files with 118 additions and 21 deletions
|
@ -33,33 +33,28 @@ namespace OpenTK
|
||||||
|
|
||||||
#region --- Constructors ---
|
#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)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new DisplayMode from the given parameters.
|
/// Constructs a new DisplayMode from the specified parameters.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="width">The Width of the DisplayMode, in pixels.</param>
|
/// <param name="width">The Width of the DisplayMode, in pixels.</param>
|
||||||
/// <param name="height">The Height of the DisplayMode, in pixels.</param>
|
/// <param name="height">The Height of the DisplayMode, in pixels.</param>
|
||||||
/// <param name="color">The ColorDepth of the DisplayMode.</param>
|
/// <param name="color">The ColorMode of the color buffer.</param>
|
||||||
/// <param name="depth">The size of the Depth Buffer, in bits.</param>
|
/// <param name="depth">The number of bits in the depth buffer.</param>
|
||||||
/// <param name="stencil">The size of Stencil Buffer, in bits.</param>
|
/// <param name="stencil">The number of bits in the stencil buffer.</param>
|
||||||
/// <param name="aux">The size of the Auxilliary Buffer, in bits.</param>
|
/// <param name="aux">The number of bits in the auxilliary buffer.</param>
|
||||||
/// <param name="fullscreen">Set to true for a fullscreen DisplayMode.</param>
|
/// <param name="fullscreen">Set to true for a fullscreen DisplayMode.</param>
|
||||||
/// <param name="stereo">Set to true for a DisplayMode with stereographic capabilities.</param>
|
/// <param name="stereo">Set to true for a DisplayMode with stereographic capabilities.</param>
|
||||||
/// <param name="buffers">The number of Display Buffers. Usually one, two or three.</param>
|
/// <param name="buffers">The number of render buffers. Typical values include one (single-), two (double-) or three (triple-buffering).</param>
|
||||||
/// <param name="vsync">Set to true to sync the updates to the screen refresh rate.</param>
|
/// <param name="vsync">Set to true to sync the updates to the screen refresh rate.</param>
|
||||||
/// <param name="refresh">The desired RefreshRate. Taken into account only for Fullscreen DisplayModes.</param>
|
/// <param name="refresh">The desired RefreshRate. Taken into account only for Fullscreen DisplayModes.</param>
|
||||||
public DisplayMode(
|
public DisplayMode(int width, int height, ColorMode color, int depth, int stencil, int aux, int buffers,
|
||||||
int width,
|
bool fullscreen, bool stereo, bool vsync, float refresh)
|
||||||
int height,
|
|
||||||
ColorMode color,
|
|
||||||
int depth,
|
|
||||||
int stencil,
|
|
||||||
int aux,
|
|
||||||
int buffers,
|
|
||||||
bool fullscreen,
|
|
||||||
bool stereo,
|
|
||||||
bool vsync,
|
|
||||||
float refresh
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
this.Width = width;
|
this.Width = width;
|
||||||
this.Height = height;
|
this.Height = height;
|
||||||
|
@ -74,6 +69,37 @@ namespace OpenTK
|
||||||
this.RefreshRate = refresh;
|
this.RefreshRate = refresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructs a new DisplayMode from the specified parameters.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="width">The Width of the DisplayMode, in pixels.</param>
|
||||||
|
/// <param name="height">The Height of the DisplayMode, in pixels.</param>
|
||||||
|
/// <param name="color">The number of bits in the color buffer.</param>
|
||||||
|
/// <param name="depth">The number of bits in the depth buffer.</param>
|
||||||
|
/// <param name="stencil">The number of bits in the stencil buffer.</param>
|
||||||
|
/// <param name="aux">The number of bits in the auxilliary buffer.</param>
|
||||||
|
/// <param name="fullscreen">Set to true for a fullscreen DisplayMode.</param>
|
||||||
|
/// <param name="stereo">Set to true for a DisplayMode with stereographic capabilities.</param>
|
||||||
|
/// <param name="buffers">The number of render buffers. Typical values include one (single-), two (double-) or three (triple-buffering).</param>
|
||||||
|
/// <param name="vsync">Set to true to sync the updates to the screen refresh rate.</param>
|
||||||
|
/// <param name="refresh">The desired RefreshRate. Taken into account only for Fullscreen DisplayModes.</param>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new DisplayMode with default values.
|
/// Constructs a new DisplayMode with default values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -83,7 +109,7 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a DisplayMode.
|
/// Constructs a new DisplayMode.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="width">The Width of the DisplayMode in pixels.</param>
|
/// <param name="width">The Width of the DisplayMode in pixels.</param>
|
||||||
/// <param name="height">The Height of the DisplayMode in pixels.</param>
|
/// <param name="height">The Height of the DisplayMode in pixels.</param>
|
||||||
|
@ -92,6 +118,78 @@ namespace OpenTK
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructs a new DisplayMode.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="width">The Width of the DisplayMode in pixels.</param>
|
||||||
|
/// <param name="height">The Height of the DisplayMode in pixels.</param>
|
||||||
|
/// <param name="color">The number of bits in the color buffer.</param>
|
||||||
|
public DisplayMode(int width, int height, int color)
|
||||||
|
: this(width, height, new ColorMode(color), 16, 0, 0, 0, false, false, false, 0.0f)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructs a new DisplayMode.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="width">The Width of the DisplayMode in pixels.</param>
|
||||||
|
/// <param name="height">The Height of the DisplayMode in pixels.</param>
|
||||||
|
/// <param name="color">The ColorMode of the color buffer.</param>
|
||||||
|
public DisplayMode(int width, int height, ColorMode color)
|
||||||
|
: this(width, height, color, 16, 0, 0, 0, false, false, false, 0.0f)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructs a new DisplayMode.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="width">The Width of the DisplayMode in pixels.</param>
|
||||||
|
/// <param name="height">The Height of the DisplayMode in pixels.</param>
|
||||||
|
/// <param name="color">The number of bits in the color buffer.</param>
|
||||||
|
/// <param name="depth">The number of bits in the depth buffer.</param>
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructs a new DisplayMode.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="width">The Width of the DisplayMode in pixels.</param>
|
||||||
|
/// <param name="height">The Height of the DisplayMode in pixels.</param>
|
||||||
|
/// <param name="color">The ColorMode of the color buffer.</param>
|
||||||
|
/// <param name="depth">The number of bits in the depth buffer.</param>
|
||||||
|
public DisplayMode(int width, int height, ColorMode color, int depth)
|
||||||
|
: this(width, height, color, depth, 0, 0, 0, false, false, false, 0.0f)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructs a new DisplayMode.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="width">The Width of the DisplayMode in pixels.</param>
|
||||||
|
/// <param name="height">The Height of the DisplayMode in pixels.</param>
|
||||||
|
/// <param name="color">The number of bits in the color buffer.</param>
|
||||||
|
/// <param name="depth">The number of bits in the depth buffer.</param>
|
||||||
|
/// <param name="fullscreen">True for a fullscreen DisplayMode, false otherwise.</param>
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructs a new DisplayMode.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="width">The Width of the DisplayMode in pixels.</param>
|
||||||
|
/// <param name="height">The Height of the DisplayMode in pixels.</param>
|
||||||
|
/// <param name="color">The ColorMode of the color buffer.</param>
|
||||||
|
/// <param name="depth">The number of bits in the depth buffer.</param>
|
||||||
|
/// <param name="fullscreen">True for a fullscreen DisplayMode, false otherwise.</param>
|
||||||
|
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
|
#endregion
|
||||||
|
|
||||||
#region --- Public Properties ---
|
#region --- Public Properties ---
|
||||||
|
@ -192,7 +290,6 @@ namespace OpenTK
|
||||||
set { this.refreshRate = value; }
|
set { this.refreshRate = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|
Loading…
Reference in a new issue