diff --git a/src/Generator.Bind/Structures/Parameter.cs b/src/Generator.Bind/Structures/Parameter.cs
index 626c4280..297422ed 100644
--- a/src/Generator.Bind/Structures/Parameter.cs
+++ b/src/Generator.Bind/Structures/Parameter.cs
@@ -20,7 +20,6 @@ namespace Bind.Structures
/// Creates a new Parameter without type and name.
///
public Parameter()
- :base()
{
}
diff --git a/src/OpenTK/BlittableValueType.cs b/src/OpenTK/BlittableValueType.cs
index 264aa83f..23eade4c 100644
--- a/src/OpenTK/BlittableValueType.cs
+++ b/src/OpenTK/BlittableValueType.cs
@@ -118,8 +118,8 @@ namespace OpenTK
// or [StructLayout(LayoutKind.Explicit)]
private static bool CheckStructLayoutAttribute(Type type)
{
- StructLayoutAttribute[] attr = (StructLayoutAttribute[])
- type.GetCustomAttributes(typeof(StructLayoutAttribute), true);
+ StructLayoutAttribute[] attr =
+ (StructLayoutAttribute[])type.GetCustomAttributes(typeof(StructLayoutAttribute), true);
if ((attr == null) ||
(attr != null && attr.Length > 0 && attr[0].Value != LayoutKind.Explicit && attr[0].Pack != 1))
diff --git a/src/OpenTK/Math/Box2.cs b/src/OpenTK/Math/Box2.cs
index 16789ef3..51b27e68 100644
--- a/src/OpenTK/Math/Box2.cs
+++ b/src/OpenTK/Math/Box2.cs
@@ -184,7 +184,7 @@ namespace OpenTK
///
public override bool Equals(object obj)
{
- return obj is Box2 && Equals((Box2) obj);
+ return obj is Box2 && Equals((Box2)obj);
}
///
diff --git a/src/OpenTK/Math/Box2d.cs b/src/OpenTK/Math/Box2d.cs
index 8b32e232..232ab4ed 100644
--- a/src/OpenTK/Math/Box2d.cs
+++ b/src/OpenTK/Math/Box2d.cs
@@ -185,7 +185,7 @@ namespace OpenTK
///
public override bool Equals(object obj)
{
- return obj is Box2d && Equals((Box2d) obj);
+ return obj is Box2d && Equals((Box2d)obj);
}
///
diff --git a/src/OpenTK/Math/MathHelper.cs b/src/OpenTK/Math/MathHelper.cs
index f5fac0ad..66e0038a 100644
--- a/src/OpenTK/Math/MathHelper.cs
+++ b/src/OpenTK/Math/MathHelper.cs
@@ -306,7 +306,7 @@ namespace OpenTK
}
private static unsafe int FloatToInt32Bits(float f) {
- return *((int*) &f);
+ return *((int*)&f);
}
///
diff --git a/src/OpenTK/Math/Quaternion.cs b/src/OpenTK/Math/Quaternion.cs
index 317742d5..bea308bc 100644
--- a/src/OpenTK/Math/Quaternion.cs
+++ b/src/OpenTK/Math/Quaternion.cs
@@ -95,7 +95,7 @@ namespace OpenTK
///
/// The euler angles as a Vector3
public Quaternion(Vector3 eulerAngles)
- :this(eulerAngles.X, eulerAngles.Y, eulerAngles.Z)
+ : this(eulerAngles.X, eulerAngles.Y, eulerAngles.Z)
{ }
///
diff --git a/src/OpenTK/Math/Quaterniond.cs b/src/OpenTK/Math/Quaterniond.cs
index 851bb316..b629536b 100644
--- a/src/OpenTK/Math/Quaterniond.cs
+++ b/src/OpenTK/Math/Quaterniond.cs
@@ -95,7 +95,7 @@ namespace OpenTK
///
/// The euler angles as a Vector3d
public Quaterniond(Vector3d eulerAngles)
- :this(eulerAngles.X, eulerAngles.Y, eulerAngles.Z)
+ : this(eulerAngles.X, eulerAngles.Y, eulerAngles.Z)
{ }
///
diff --git a/src/OpenTK/Platform/Android/AndroidGraphicsMode.cs b/src/OpenTK/Platform/Android/AndroidGraphicsMode.cs
index 8169e292..fe2cf73d 100644
--- a/src/OpenTK/Platform/Android/AndroidGraphicsMode.cs
+++ b/src/OpenTK/Platform/Android/AndroidGraphicsMode.cs
@@ -14,8 +14,8 @@ namespace OpenTK.Platform.Android
///
/// constructors (pass null to the display parameter for lazy initialization)
///
- public AndroidGraphicsMode(ColorFormat color, int depth, int stencil, int samples, int buffers, bool stereo) :
- this(null, 1, color, depth, stencil, samples, buffers, stereo)
+ public AndroidGraphicsMode(ColorFormat color, int depth, int stencil, int samples, int buffers, bool stereo)
+ : this(null, 1, color, depth, stencil, samples, buffers, stereo)
{
}
@@ -30,8 +30,8 @@ namespace OpenTK.Platform.Android
///
/// Requested OpenGL version (1 or 2)
/// GraphicsMode to copy values from.
- public AndroidGraphicsMode(object display_ignored, int majorVersion, GraphicsMode mode) :
- this(display_ignored, majorVersion, mode.ColorFormat, mode.Depth, mode.Stencil, mode.Samples, mode.Buffers, mode.Stereo)
+ public AndroidGraphicsMode(object display_ignored, int majorVersion, GraphicsMode mode)
+ : this(display_ignored, majorVersion, mode.ColorFormat, mode.Depth, mode.Stencil, mode.Samples, mode.Buffers, mode.Stereo)
{
}
diff --git a/src/OpenTK/Platform/Egl/EglAnglePlatformFactory.cs b/src/OpenTK/Platform/Egl/EglAnglePlatformFactory.cs
index 2d2cb07e..d0dedb56 100644
--- a/src/OpenTK/Platform/Egl/EglAnglePlatformFactory.cs
+++ b/src/OpenTK/Platform/Egl/EglAnglePlatformFactory.cs
@@ -53,7 +53,7 @@ namespace OpenTK.Platform.Egl
public override IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window,
IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
{
- var angle_window = (IAngleWindowInfoInternal) window;
+ var angle_window = (IAngleWindowInfoInternal)window;
var egl_window = CreateWindowInfo(angle_window, major, flags);
var egl_context = new EglWinContext(mode, egl_window, shareContext, major, minor, flags);
angle_window.EglContext = egl_context;
@@ -63,7 +63,7 @@ namespace OpenTK.Platform.Egl
public override IGraphicsContext CreateGLContext(ContextHandle handle, IWindowInfo window,
IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
{
- var angle_window = (IAngleWindowInfoInternal) window;
+ var angle_window = (IAngleWindowInfoInternal)window;
var egl_window = CreateWindowInfo(angle_window, major, flags);
var egl_context = new EglWinContext(handle, egl_window, shareContext, major, minor, flags);
angle_window.EglContext = egl_context;
diff --git a/src/OpenTK/Platform/Egl/EglContext.cs b/src/OpenTK/Platform/Egl/EglContext.cs
index 5e123328..d85850a8 100644
--- a/src/OpenTK/Platform/Egl/EglContext.cs
+++ b/src/OpenTK/Platform/Egl/EglContext.cs
@@ -152,12 +152,12 @@ namespace OpenTK.Platform.Egl
{
if (window is EglWindowInfo)
{
- WindowInfo = (EglWindowInfo) window;
+ WindowInfo = (EglWindowInfo)window;
}
#if !ANDROID
else if (window is IAngleWindowInfoInternal)
{
- WindowInfo = ((IAngleWindowInfoInternal) window).EglWindowInfo;
+ WindowInfo = ((IAngleWindowInfoInternal)window).EglWindowInfo;
}
#endif
@@ -263,9 +263,9 @@ namespace OpenTK.Platform.Egl
var internalContext = sharedContext as IGraphicsContextInternal;
if (internalContext != null)
{
- return (EglContext) internalContext.Implementation;
+ return (EglContext)internalContext.Implementation;
}
- return (EglContext) sharedContext;
+ return (EglContext)sharedContext;
}
}
}
diff --git a/src/OpenTK/Platform/Egl/EglGraphicsMode.cs b/src/OpenTK/Platform/Egl/EglGraphicsMode.cs
index 91df6fbb..c66385b7 100644
--- a/src/OpenTK/Platform/Egl/EglGraphicsMode.cs
+++ b/src/OpenTK/Platform/Egl/EglGraphicsMode.cs
@@ -58,7 +58,7 @@ namespace OpenTK.Platform.Egl
IntPtr[] configs = new IntPtr[1];
int[] attribList = new int[]
{
- Egl.SURFACE_TYPE, (int) surfaceType,
+ Egl.SURFACE_TYPE, (int)surfaceType,
Egl.RENDERABLE_TYPE, (int)renderableFlags,
Egl.RED_SIZE, color.Red,
diff --git a/src/OpenTK/Platform/Egl/EglWindowInfo.cs b/src/OpenTK/Platform/Egl/EglWindowInfo.cs
index dd00ced0..ecdec262 100644
--- a/src/OpenTK/Platform/Egl/EglWindowInfo.cs
+++ b/src/OpenTK/Platform/Egl/EglWindowInfo.cs
@@ -68,7 +68,7 @@ namespace OpenTK.Platform.Egl
public void CreateWindowSurface(IntPtr config)
{
Surface = Egl.CreateWindowSurface(Display, config, Handle, IntPtr.Zero);
- if (Surface==IntPtr.Zero)
+ if (Surface == IntPtr.Zero)
{
throw new GraphicsContextException(String.Format(
"[EGL] Failed to create window surface, error {0}.", Egl.GetError()));
diff --git a/src/OpenTK/Platform/Linux/Bindings/Evdev.cs b/src/OpenTK/Platform/Linux/Bindings/Evdev.cs
index bf49623d..50e617f8 100644
--- a/src/OpenTK/Platform/Linux/Bindings/Evdev.cs
+++ b/src/OpenTK/Platform/Linux/Bindings/Evdev.cs
@@ -472,7 +472,7 @@ namespace OpenTK.Platform.Linux
MT_TOOL_Y = 0x3d, /* Center Y tool position */
MAX = 0x3f,
- CNT = (MAX+1),
+ CNT = (MAX + 1),
}
internal enum EvdevButton
@@ -579,7 +579,7 @@ namespace OpenTK.Platform.Linux
PWR = 0x16,
FF_STATUS = 0x17,
MAX = 0x1f,
- CNT = (MAX+1),
+ CNT = (MAX + 1),
}
internal enum EvdevIoctl : uint
diff --git a/src/OpenTK/Platform/Windows/API.cs b/src/OpenTK/Platform/Windows/API.cs
index 3c716ba1..5992b63d 100644
--- a/src/OpenTK/Platform/Windows/API.cs
+++ b/src/OpenTK/Platform/Windows/API.cs
@@ -3326,7 +3326,7 @@ namespace OpenTK.Platform.Windows
/*
* NEC PC-9800 kbd definitions
*/
- OEM_NEC_EQUAL= 0x92, // '=' key on numpad
+ OEM_NEC_EQUAL = 0x92, // '=' key on numpad
/*
* Fujitsu/OASYS kbd definitions
diff --git a/src/OpenTK/Platform/Windows/WinRawJoystick.cs b/src/OpenTK/Platform/Windows/WinRawJoystick.cs
index 233a640f..cadd9a1f 100644
--- a/src/OpenTK/Platform/Windows/WinRawJoystick.cs
+++ b/src/OpenTK/Platform/Windows/WinRawJoystick.cs
@@ -426,8 +426,8 @@ namespace OpenTK.Platform.Windows
{
if (stick.AxisCaps[i].LogicalMin > 0)
{
- short scaled_value = (short) HidHelper.ScaleValue(
- (int) ((long) value + stick.AxisCaps[i].LogicalMin),
+ short scaled_value = (short)HidHelper.ScaleValue(
+ (int)((long)value + stick.AxisCaps[i].LogicalMin),
stick.AxisCaps[i].LogicalMin, stick.AxisCaps[i].LogicalMax,
Int16.MinValue, Int16.MaxValue);
stick.SetAxis(collection, page, usage, scaled_value);
diff --git a/src/OpenTK/Platform/Windows/WinRawKeyboard.cs b/src/OpenTK/Platform/Windows/WinRawKeyboard.cs
index c19c9010..bee7eca8 100644
--- a/src/OpenTK/Platform/Windows/WinRawKeyboard.cs
+++ b/src/OpenTK/Platform/Windows/WinRawKeyboard.cs
@@ -109,7 +109,7 @@ namespace OpenTK.Platform.Windows
// making a guess at backwards compatability. Not sure what older windows returns in these cases...
if (deviceClass == null || deviceClass.Equals(string.Empty)){
RegistryKey classGUIDKey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\Class\" + deviceClassGUID);
- deviceClass = classGUIDKey != null ? (string) classGUIDKey.GetValue("Class") : string.Empty;
+ deviceClass = classGUIDKey != null ? (string)classGUIDKey.GetValue("Class") : string.Empty;
}
if (String.IsNullOrEmpty(deviceDesc))
diff --git a/src/OpenTK/Platform/Windows/WinRawMouse.cs b/src/OpenTK/Platform/Windows/WinRawMouse.cs
index 99d9c62c..877f906e 100644
--- a/src/OpenTK/Platform/Windows/WinRawMouse.cs
+++ b/src/OpenTK/Platform/Windows/WinRawMouse.cs
@@ -111,7 +111,7 @@ namespace OpenTK.Platform.Windows
// Added to address OpenTK issue 3198 with mouse on Windows 8
string deviceClassGUID = (string)regkey.GetValue("ClassGUID");
RegistryKey classGUIDKey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\Class\" + deviceClassGUID);
- deviceClass = classGUIDKey != null ? (string) classGUIDKey.GetValue("Class") : string.Empty;
+ deviceClass = classGUIDKey != null ? (string)classGUIDKey.GetValue("Class") : string.Empty;
}
// deviceDesc remained null on a new Win7 system - not sure why.
diff --git a/src/OpenTK/Platform/Windows/XInputJoystick.cs b/src/OpenTK/Platform/Windows/XInputJoystick.cs
index 8aa6823b..bf17115c 100644
--- a/src/OpenTK/Platform/Windows/XInputJoystick.cs
+++ b/src/OpenTK/Platform/Windows/XInputJoystick.cs
@@ -81,7 +81,7 @@ namespace OpenTK.Platform.Windows
{
XInputButtons dir = 0;
- dir =XInputButtons.DPadUp | XInputButtons.DPadLeft;
+ dir = XInputButtons.DPadUp | XInputButtons.DPadLeft;
if ((buttons & dir) == dir)
{
return HatPosition.UpLeft;
diff --git a/src/OpenTK/Platform/X11/API.cs b/src/OpenTK/Platform/X11/API.cs
index 6ad1fd29..5a9f0ee0 100644
--- a/src/OpenTK/Platform/X11/API.cs
+++ b/src/OpenTK/Platform/X11/API.cs
@@ -677,7 +677,7 @@ XF86VidModeGetGammaRampSize(
public override string ToString ()
{
- return string.Format("MotifWmHints
@@ -1197,7 +1197,7 @@ XF86VidModeGetGammaRampSize(
XF86AudioPrev = 0x1008ff16,
XF86AudioNext = 0x1008ff17,
XF86AudioRecord = 0x1008ff1c,
- XF86AudioPause =0x1008ff31,
+ XF86AudioPause = 0x1008ff31,
XF86AudioRewind = 0x1008ff3e,
XF86AudioForward = 0x1008ff97,
XF86Phone = 0x1008ff6e,
diff --git a/src/OpenTK/Platform/X11/Functions.cs b/src/OpenTK/Platform/X11/Functions.cs
index 672b74bd..288e306b 100644
--- a/src/OpenTK/Platform/X11/Functions.cs
+++ b/src/OpenTK/Platform/X11/Functions.cs
@@ -553,7 +553,7 @@ namespace OpenTK.Platform.X11
public byte A, R, G, B;
public Pixel(byte a, byte r, byte g, byte b)
{
- A= a;
+ A = a;
R = r;
G = g;
B = b;
@@ -602,7 +602,7 @@ namespace OpenTK.Platform.X11
{
for (int x = 0; x < width; ++x)
{
- byte bit = (byte) (1 << (msbfirst ? (7 - (x & 7)) : (x & 7)));
+ byte bit = (byte)(1 << (msbfirst ? (7 - (x & 7)) : (x & 7)));
int offset = y * stride + (x >> 3);
if (image.GetPixel(x, y).A >= 128)
diff --git a/src/OpenTK/Platform/X11/Structs.cs b/src/OpenTK/Platform/X11/Structs.cs
index 67180c5e..4ec993c5 100644
--- a/src/OpenTK/Platform/X11/Structs.cs
+++ b/src/OpenTK/Platform/X11/Structs.cs
@@ -5,10 +5,10 @@
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -1050,21 +1050,21 @@ namespace OpenTK.Platform.X11
Sibling = 1 << 5,
StackMode = 1 << 6,
- //BackPixmap (1L<<0)
- //BackPixel (1L<<1)
- //SaveUnder (1L<<10)
- //EventMask (1L<<11)
- //DontPropagate (1L<<12)
- //Colormap (1L<<13)
- //Cursor (1L<<14)
- //BorderPixmap (1L<<2)
- //BorderPixel (1L<<3)
- //BitGravity (1L<<4)
- //WinGravity (1L<<5)
- //BackingStore (1L<<6)
- //BackingPlanes (1L<<7)
- //BackingPixel (1L<<8)
- OverrideRedirect = 1<<9,
+ //BackPixmap (1L << 0)
+ //BackPixel (1L << 1)
+ //SaveUnder (1L << 10)
+ //EventMask (1L << 11)
+ //DontPropagate (1L << 12)
+ //Colormap (1L << 13)
+ //Cursor (1L << 14)
+ //BorderPixmap (1L << 2)
+ //BorderPixel (1L << 3)
+ //BitGravity (1L << 4)
+ //WinGravity (1L << 5)
+ //BackingStore (1L << 6)
+ //BackingPlanes (1L << 7)
+ //BackingPixel (1L << 8)
+ OverrideRedirect = 1 << 9,
}
internal enum StackMode
@@ -1816,7 +1816,7 @@ namespace OpenTK.Platform.X11
mask = (byte*)Marshal.AllocHGlobal(mask_len);
for (int i = 0; i < mask_len; i++)
{
- mask[i] = (byte)((uint)m >> i*8);
+ mask[i] = (byte)((uint)m >> i * 8);
}
}
}
diff --git a/src/OpenTK/Platform/X11/X11DisplayDevice.cs b/src/OpenTK/Platform/X11/X11DisplayDevice.cs
index 17eea955..966d6463 100644
--- a/src/OpenTK/Platform/X11/X11DisplayDevice.cs
+++ b/src/OpenTK/Platform/X11/X11DisplayDevice.cs
@@ -149,7 +149,7 @@ namespace OpenTK.Platform.X11
deviceToScreen.Add(dev, 0 /*screen.ScreenNumber*/);
}
}
- return (devices.Count>0);
+ return (devices.Count > 0);
}
private bool QueryXRandR(List devices)
@@ -356,7 +356,7 @@ namespace OpenTK.Platform.X11
screen, current_resolution_index, new_resolution_index);
int ret = 0;
- short refresh_rate =(short)(resolution != null ? resolution.RefreshRate : 0);
+ short refresh_rate = (short)(resolution != null ? resolution.RefreshRate : 0);
if (refresh_rate > 0)
{
ret = Functions.XRRSetScreenConfigAndRate(API.DefaultDisplay,
diff --git a/stylecop.ruleset b/stylecop.ruleset
index dcf1791e..22cd1a6e 100644
--- a/stylecop.ruleset
+++ b/stylecop.ruleset
@@ -9,7 +9,7 @@
-
+