/// </summary>
public override bool Equals(object obj)
{
- return obj is Box2 && Equals((Box2) obj);
+ return obj is Box2 && Equals((Box2)obj);
}
/// <summary>
/// </summary>
public override bool Equals(object obj)
{
- return obj is Box2d && Equals((Box2d) obj);
+ return obj is Box2d && Equals((Box2d)obj);
}
/// <summary>
}
private static unsafe int FloatToInt32Bits(float f) {
- return *((int*) &f);
+ return *((int*)&f);
}
/// <summary>
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;
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;
{
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
var internalContext = sharedContext as IGraphicsContextInternal;
if (internalContext != null)
{
- return (EglContext) internalContext.Implementation;
+ return (EglContext)internalContext.Implementation;
}
- return (EglContext) sharedContext;
+ return (EglContext)sharedContext;
}
}
}
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,
{
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);
// 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))
// 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.
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;
{
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)