fix trailing whitespace everywhere
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see COPYING.
|
||||
@@ -39,7 +39,7 @@ namespace OpenRA.Renderer.SdlCommon
|
||||
throw new InvalidOperationException("OpenGL Error: See graphics.log for details.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void WriteGraphicsLog(string message)
|
||||
{
|
||||
Log.AddChannel("graphics", "graphics.log");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see COPYING.
|
||||
@@ -83,7 +83,7 @@ namespace OpenRA.Renderer.SdlCommon
|
||||
.F(string.Join(",", missingExtensions)));
|
||||
throw new InvalidProgramException("Unsupported GPU. See graphics.log for details.");
|
||||
}
|
||||
|
||||
|
||||
return surf;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see COPYING.
|
||||
@@ -20,7 +20,7 @@ namespace OpenRA.Renderer.SdlCommon
|
||||
{
|
||||
MouseButton lastButtonBits = (MouseButton)0;
|
||||
IntPtr surface;
|
||||
|
||||
|
||||
public SdlInput( IntPtr surface ) { this.surface = surface; }
|
||||
|
||||
MouseButton MakeButton( byte b )
|
||||
@@ -40,7 +40,7 @@ namespace OpenRA.Renderer.SdlCommon
|
||||
| ( ( raw & Sdl.KMOD_META ) != 0 ? Modifiers.Meta : 0 )
|
||||
| ( ( raw & Sdl.KMOD_SHIFT ) != 0 ? Modifiers.Shift : 0 );
|
||||
}
|
||||
|
||||
|
||||
public void PumpInput( IInputHandler inputHandler )
|
||||
{
|
||||
Game.HasInputFocus = 0 != ( Sdl.SDL_GetAppState() & Sdl.SDL_APPINPUTFOCUS );
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see COPYING.
|
||||
@@ -21,13 +21,13 @@ namespace OpenRA.Renderer.SdlCommon
|
||||
public class Texture : ITexture
|
||||
{
|
||||
public int texture; /* temp: can be internal again once shaders are in shared code */
|
||||
|
||||
|
||||
public Texture()
|
||||
{
|
||||
Gl.glGenTextures(1, out texture);
|
||||
ErrorHandler.CheckGlError();
|
||||
}
|
||||
|
||||
|
||||
public Texture(Bitmap bitmap)
|
||||
{
|
||||
Gl.glGenTextures(1, out texture);
|
||||
@@ -47,7 +47,7 @@ namespace OpenRA.Renderer.SdlCommon
|
||||
ErrorHandler.CheckGlError();
|
||||
Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MIN_FILTER, Gl.GL_NEAREST);
|
||||
ErrorHandler.CheckGlError();
|
||||
|
||||
|
||||
Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_BASE_LEVEL, 0);
|
||||
ErrorHandler.CheckGlError();
|
||||
Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MAX_LEVEL, 0);
|
||||
@@ -77,10 +77,10 @@ namespace OpenRA.Renderer.SdlCommon
|
||||
{
|
||||
int width = colors.GetUpperBound(1) + 1;
|
||||
int height = colors.GetUpperBound(0) + 1;
|
||||
|
||||
|
||||
if (!IsPowerOf2(width) || !IsPowerOf2(height))
|
||||
throw new InvalidDataException("Non-power-of-two array {0}x{1}".F(width,height));
|
||||
|
||||
|
||||
unsafe
|
||||
{
|
||||
fixed (uint* ptr = &colors[0,0])
|
||||
@@ -93,7 +93,7 @@ namespace OpenRA.Renderer.SdlCommon
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void SetData(Bitmap bitmap)
|
||||
{
|
||||
if (!IsPowerOf2(bitmap.Width) || !IsPowerOf2(bitmap.Height))
|
||||
@@ -101,12 +101,12 @@ namespace OpenRA.Renderer.SdlCommon
|
||||
//throw new InvalidOperationException( "non-power-of-2-texture" );
|
||||
bitmap = new Bitmap(bitmap, new Size(Exts.NextPowerOf2(bitmap.Width), Exts.NextPowerOf2(bitmap.Height)));
|
||||
}
|
||||
|
||||
|
||||
var bits = bitmap.LockBits(
|
||||
new Rectangle(0, 0, bitmap.Width, bitmap.Height),
|
||||
ImageLockMode.ReadOnly,
|
||||
PixelFormat.Format32bppArgb);
|
||||
|
||||
|
||||
PrepareTexture();
|
||||
Gl.glTexImage2D(Gl.GL_TEXTURE_2D, 0, Gl.GL_RGBA8, bits.Width, bits.Height,
|
||||
0, Gl.GL_BGRA, Gl.GL_UNSIGNED_BYTE, bits.Scan0); // todo: weird strides
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see COPYING.
|
||||
|
||||
Reference in New Issue
Block a user