Add SDL2 renderer based on SDL2# wrapper. Closes #3315.

SDL2# binary was built from commit 70af91f84493a924a3c1da46ae6209bb5f7222e3.
This commit is contained in:
Paul Chote
2013-10-30 20:41:16 +13:00
parent 71c6124c10
commit b1a60eface
10 changed files with 873 additions and 4 deletions

View File

@@ -125,13 +125,19 @@ rgl_KIND = library
rgl_DEPS = $(fileformats_TARGET) $(game_TARGET) $(rsdl_TARGET) rgl_DEPS = $(fileformats_TARGET) $(game_TARGET) $(rsdl_TARGET)
rgl_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.OpenGl.dll $(rgl_DEPS) rgl_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.OpenGl.dll $(rgl_DEPS)
rsdl2_SRCS := $(shell find OpenRA.Renderer.Sdl2/ -iname '*.cs')
rsdl2_TARGET = OpenRA.Renderer.Sdl2.dll
rsdl2_KIND = library
rsdl2_DEPS = $(fileformats_TARGET) $(game_TARGET) $(rsdl_TARGET) $(rgl_TARGET)
rsdl2_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.OpenGl.dll thirdparty/SDL2\#.dll $(rsdl2_DEPS)
rnull_SRCS := $(shell find OpenRA.Renderer.Null/ -iname '*.cs') rnull_SRCS := $(shell find OpenRA.Renderer.Null/ -iname '*.cs')
rnull_TARGET = OpenRA.Renderer.Null.dll rnull_TARGET = OpenRA.Renderer.Null.dll
rnull_KIND = library rnull_KIND = library
rnull_DEPS = $(fileformats_TARGET) $(game_TARGET) rnull_DEPS = $(fileformats_TARGET) $(game_TARGET)
rnull_LIBS = $(COMMON_LIBS) $(rnull_DEPS) rnull_LIBS = $(COMMON_LIBS) $(rnull_DEPS)
PROGRAMS += rcg rgl rnull rsdl PROGRAMS += rcg rgl rsdl2 rnull rsdl
renderers: $(rcg_TARGET) $(rgl_TARGET) $(rnull_TARGET) $(rsdl_TARGET) renderers: $(rcg_TARGET) $(rgl_TARGET) $(rsdl2_TARGET) $(rnull_TARGET) $(rsdl_TARGET)
##### Official Mods ##### ##### Official Mods #####

View File

@@ -39,6 +39,6 @@ namespace OpenRA.Renderer.Glsl
public GraphicsDevice(Size size, WindowMode window) public GraphicsDevice(Size size, WindowMode window)
: base(size, window, requiredExtensions) { } : base(size, window, requiredExtensions) { }
public override IShader CreateShader(string name) { return new Shader(this, name); } public override IShader CreateShader(string name) { return new Shader(name); }
} }
} }

View File

@@ -25,7 +25,7 @@ namespace OpenRA.Renderer.Glsl
readonly Dictionary<int, ITexture> textures = new Dictionary<int, ITexture>(); readonly Dictionary<int, ITexture> textures = new Dictionary<int, ITexture>();
int program; int program;
public Shader(GraphicsDevice dev, string name) public Shader(string name)
{ {
// Vertex shader // Vertex shader
string vertexCode; string vertexCode;

View File

@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{33D03738-C154-4028-8EA8-63A3C488A651}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>OpenRA.Renderer.Sdl2</RootNamespace>
<AssemblyName>OpenRA.Renderer.Sdl2</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<OutputPath>..\</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<ConsolePause>False</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="Tao.OpenGl">
<HintPath>..\thirdparty\Tao\Tao.OpenGl.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="SDL2#">
<HintPath>..\thirdparty\SDL2#.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Sdl2Input.cs" />
<Compile Include="Sdl2GraphicsDevice.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
<Project>{BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}</Project>
<Name>OpenRA.FileFormats</Name>
</ProjectReference>
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
<Project>{0DFB103F-2962-400F-8C6D-E2C28CCBA633}</Project>
<Name>OpenRA.Game</Name>
</ProjectReference>
<ProjectReference Include="..\OpenRA.Renderer.SdlCommon\OpenRA.Renderer.SdlCommon.csproj">
<Project>{52FD9F0B-B209-4ED7-8A32-AC8033363263}</Project>
<Name>OpenRA.Renderer.SdlCommon</Name>
</ProjectReference>
<ProjectReference Include="..\OpenRA.Renderer.Gl\OpenRA.Renderer.Gl.csproj">
<Project>{E9C01A96-C3E2-4772-825B-A740AC513D31}</Project>
<Name>OpenRA.Renderer.Gl</Name>
</ProjectReference>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,219 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* 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.
*/
#endregion
using System;
using System.Drawing;
using System.Linq;
using OpenRA.FileFormats.Graphics;
using OpenRA.Renderer.Glsl;
using OpenRA.Renderer.SdlCommon;
using SDL2;
using Tao.OpenGl;
[assembly: Renderer(typeof(OpenRA.Renderer.Sdl2.DeviceFactory))]
namespace OpenRA.Renderer.Sdl2
{
public class DeviceFactory : IDeviceFactory
{
public IGraphicsDevice Create(Size size, WindowMode windowMode)
{
Console.WriteLine("Using SDL2 renderer");
return new Sdl2GraphicsDevice(size, windowMode);
}
}
public class Sdl2GraphicsDevice : IGraphicsDevice
{
static string[] requiredExtensions =
{
"GL_ARB_vertex_shader",
"GL_ARB_fragment_shader",
"GL_ARB_vertex_buffer_object",
"GL_EXT_framebuffer_object"
};
Size size;
Sdl2Input input;
IntPtr window;
public Size WindowSize { get { return size; } }
public Sdl2GraphicsDevice(Size windowSize, WindowMode windowMode)
{
size = windowSize;
SDL.SDL_Init(SDL.SDL_INIT_NOPARACHUTE | SDL.SDL_INIT_VIDEO);
SDL.SDL_GL_SetAttribute(SDL.SDL_GLattr.SDL_GL_DOUBLEBUFFER, 1);
SDL.SDL_GL_SetAttribute(SDL.SDL_GLattr.SDL_GL_RED_SIZE, 8);
SDL.SDL_GL_SetAttribute(SDL.SDL_GLattr.SDL_GL_GREEN_SIZE, 8);
SDL.SDL_GL_SetAttribute(SDL.SDL_GLattr.SDL_GL_BLUE_SIZE, 8);
SDL.SDL_GL_SetAttribute(SDL.SDL_GLattr.SDL_GL_ALPHA_SIZE, 0);
var windowFlags = SDL.SDL_WindowFlags.SDL_WINDOW_OPENGL;
if (windowMode == WindowMode.Fullscreen)
windowFlags |= SDL.SDL_WindowFlags.SDL_WINDOW_FULLSCREEN;
else if (windowMode == WindowMode.PseudoFullscreen)
{
windowFlags |= SDL.SDL_WindowFlags.SDL_WINDOW_FULLSCREEN_DESKTOP;
Environment.SetEnvironmentVariable("SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS", "0");
}
SDL.SDL_DisplayMode display;
SDL.SDL_GetCurrentDisplayMode(0, out display);
Console.WriteLine("Desktop resolution: {0}x{1}", display.w, display.h);
if (size.Width == 0 && size.Height == 0)
{
Console.WriteLine("No custom resolution provided, using desktop resolution");
size = new Size(display.w, display.h);
}
Console.WriteLine("Using resolution: {0}x{1}", size.Width, size.Height);
window = SDL.SDL_CreateWindow("OpenRA", SDL.SDL_WINDOWPOS_CENTERED, SDL.SDL_WINDOWPOS_CENTERED, size.Width, size.Height, windowFlags);
SDL.SDL_ShowCursor(0);
SDL.SDL_GL_CreateContext(window);
ErrorHandler.CheckGlError();
var extensions = Gl.glGetString(Gl.GL_EXTENSIONS);
if (extensions == null)
Console.WriteLine("Failed to fetch GL_EXTENSIONS, this is bad.");
var missingExtensions = requiredExtensions.Where(r => !extensions.Contains(r)).ToArray();
if (missingExtensions.Any())
{
ErrorHandler.WriteGraphicsLog("Unsupported GPU: Missing extensions: {0}".F(missingExtensions.JoinWith(",")));
throw new InvalidProgramException("Unsupported GPU. See graphics.log for details.");
}
Gl.glEnableClientState(Gl.GL_VERTEX_ARRAY);
ErrorHandler.CheckGlError();
Gl.glEnableClientState(Gl.GL_TEXTURE_COORD_ARRAY);
ErrorHandler.CheckGlError();
SDL.SDL_SetModState(0);
input = new Sdl2Input();
}
public virtual void Quit()
{
SDL.SDL_Quit();
}
int ModeFromPrimitiveType(PrimitiveType pt)
{
switch (pt)
{
case PrimitiveType.PointList: return Gl.GL_POINTS;
case PrimitiveType.LineList: return Gl.GL_LINES;
case PrimitiveType.TriangleList: return Gl.GL_TRIANGLES;
case PrimitiveType.QuadList: return Gl.GL_QUADS;
}
throw new NotImplementedException();
}
public void DrawPrimitives(PrimitiveType pt, int firstVertex, int numVertices)
{
Gl.glDrawArrays(ModeFromPrimitiveType(pt), firstVertex, numVertices);
ErrorHandler.CheckGlError();
}
public void Clear()
{
Gl.glClearColor(0, 0, 0, 0);
ErrorHandler.CheckGlError();
Gl.glClear(Gl.GL_COLOR_BUFFER_BIT);
ErrorHandler.CheckGlError();
}
public void EnableDepthBuffer()
{
Gl.glClear(Gl.GL_DEPTH_BUFFER_BIT);
ErrorHandler.CheckGlError();
Gl.glEnable(Gl.GL_DEPTH_TEST);
ErrorHandler.CheckGlError();
}
public void DisableDepthBuffer()
{
Gl.glDisable(Gl.GL_DEPTH_TEST);
ErrorHandler.CheckGlError();
}
public void SetBlendMode(BlendMode mode)
{
Gl.glBlendEquation(Gl.GL_FUNC_ADD);
ErrorHandler.CheckGlError();
switch (mode)
{
case BlendMode.None:
Gl.glDisable(Gl.GL_BLEND);
break;
case BlendMode.Alpha:
Gl.glEnable(Gl.GL_BLEND);
ErrorHandler.CheckGlError();
Gl.glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE_MINUS_SRC_ALPHA);
break;
case BlendMode.Additive:
Gl.glEnable(Gl.GL_BLEND);
ErrorHandler.CheckGlError();
Gl.glBlendFunc(Gl.GL_ONE, Gl.GL_ONE);
break;
case BlendMode.Subtractive:
Gl.glEnable(Gl.GL_BLEND);
ErrorHandler.CheckGlError();
Gl.glBlendFunc(Gl.GL_ONE, Gl.GL_ONE);
ErrorHandler.CheckGlError();
Gl.glBlendEquation(Gl.GL_FUNC_REVERSE_SUBTRACT);
break;
}
ErrorHandler.CheckGlError();
}
public void EnableScissor(int left, int top, int width, int height)
{
if (width < 0)
width = 0;
if (height < 0)
height = 0;
Gl.glScissor(left, size.Height - (top + height), width, height);
ErrorHandler.CheckGlError();
Gl.glEnable(Gl.GL_SCISSOR_TEST);
ErrorHandler.CheckGlError();
}
public void DisableScissor()
{
Gl.glDisable(Gl.GL_SCISSOR_TEST);
ErrorHandler.CheckGlError();
}
public void SetLineWidth(float width)
{
Gl.glLineWidth(width);
ErrorHandler.CheckGlError();
}
public void Present() { SDL.SDL_GL_SwapWindow(window); }
public void PumpInput(IInputHandler inputHandler) { input.PumpInput(inputHandler); }
public IVertexBuffer<Vertex> CreateVertexBuffer(int size) { return new VertexBuffer<Vertex>(size); }
public ITexture CreateTexture() { return new Texture(); }
public ITexture CreateTexture(Bitmap bitmap) { return new Texture(bitmap); }
public IFrameBuffer CreateFrameBuffer(Size s) { return new FrameBuffer(s); }
public IShader CreateShader(string name) { return new Shader(name); }
}
}

View File

@@ -0,0 +1,200 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* 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.
*/
#endregion
using System;
using System.IO;
using System.Text;
using OpenRA.Renderer.SdlCommon;
using SDL2;
namespace OpenRA.Renderer.Sdl2
{
public class Sdl2Input
{
MouseButton lastButtonBits = (MouseButton)0;
MouseButton MakeButton(byte b)
{
return b == SDL.SDL_BUTTON_LEFT ? MouseButton.Left
: b == SDL.SDL_BUTTON_RIGHT ? MouseButton.Right
: b == SDL.SDL_BUTTON_MIDDLE ? MouseButton.Middle
: 0;
}
Modifiers MakeModifiers(int raw)
{
return ((raw & (int)SDL.SDL_Keymod.KMOD_ALT) != 0 ? Modifiers.Alt : 0)
| ((raw & (int)SDL.SDL_Keymod.KMOD_CTRL) != 0 ? Modifiers.Ctrl : 0)
| ((raw & (int)SDL.SDL_Keymod.KMOD_LGUI) != 0 ? Modifiers.Meta : 0)
| ((raw & (int)SDL.SDL_Keymod.KMOD_RGUI) != 0 ? Modifiers.Meta : 0)
| ((raw & (int)SDL.SDL_Keymod.KMOD_SHIFT) != 0 ? Modifiers.Shift : 0);
}
public void PumpInput(IInputHandler inputHandler)
{
var mods = MakeModifiers((int)SDL.SDL_GetModState());
inputHandler.ModifierKeys(mods);
MouseInput? pendingMotion = null;
SDL.SDL_Event e;
while (SDL.SDL_PollEvent(out e) != 0)
{
switch (e.type)
{
case SDL.SDL_EventType.SDL_QUIT:
OpenRA.Game.Exit();
break;
case SDL.SDL_EventType.SDL_WINDOWEVENT:
{
switch (e.window.windowEvent)
{
case SDL.SDL_WindowEventID.SDL_WINDOWEVENT_FOCUS_LOST:
Game.HasInputFocus = false;
break;
case SDL.SDL_WindowEventID.SDL_WINDOWEVENT_FOCUS_GAINED:
Game.HasInputFocus = true;
break;
}
break;
}
case SDL.SDL_EventType.SDL_MOUSEBUTTONDOWN:
{
if (pendingMotion != null)
{
inputHandler.OnMouseInput(pendingMotion.Value);
pendingMotion = null;
}
var button = MakeButton(e.button.button);
lastButtonBits |= button;
var pos = new int2(e.button.x, e.button.y);
inputHandler.OnMouseInput(new MouseInput(
MouseInputEvent.Down, button, pos, mods,
MultiTapDetection.DetectFromMouse(e.button.button, pos)));
break;
}
case SDL.SDL_EventType.SDL_MOUSEBUTTONUP:
{
if (pendingMotion != null)
{
inputHandler.OnMouseInput(pendingMotion.Value);
pendingMotion = null;
}
var button = MakeButton(e.button.button);
lastButtonBits &= ~button;
var pos = new int2(e.button.x, e.button.y);
inputHandler.OnMouseInput(new MouseInput(
MouseInputEvent.Up, button, pos, mods,
MultiTapDetection.InfoFromMouse(e.button.button)));
break;
}
case SDL.SDL_EventType.SDL_MOUSEMOTION:
{
pendingMotion = new MouseInput(
MouseInputEvent.Move, lastButtonBits,
new int2(e.motion.x, e.motion.y), mods, 0);
break;
}
case SDL.SDL_EventType.SDL_MOUSEWHEEL:
{
// Retain compatibility with existing bogus behavior
// TODO: Implement real scroll behavior after we drop SDL 1.2 support
if (e.wheel.y == 0)
break;
int x, y;
SDL.SDL_GetMouseState(out x, out y);
var button = e.wheel.y < 0 ? MouseButton.WheelDown : MouseButton.WheelUp;
inputHandler.OnMouseInput(new MouseInput(MouseInputEvent.Down, button, new int2(x, y), Modifiers.None, 0));
break;
}
case SDL.SDL_EventType.SDL_TEXTINPUT:
{
string input;
unsafe
{
var data = new byte[SDL.SDL_TEXTINPUTEVENT_TEXT_SIZE];
var i = 0;
for (; i < SDL.SDL_TEXTINPUTEVENT_TEXT_SIZE; i++)
{
var b = e.text.text[i];
if (b == '\0')
break;
data[i] = b;
}
input = Encoding.UTF8.GetString(data, 0, i);
}
inputHandler.OnTextInput(input);
break;
}
case SDL.SDL_EventType.SDL_KEYDOWN:
case SDL.SDL_EventType.SDL_KEYUP:
{
var keyCode = (Keycode)e.key.keysym.sym;
var type = e.type == SDL.SDL_EventType.SDL_KEYDOWN ?
KeyInputEvent.Down : KeyInputEvent.Up;
var tapCount = e.type == SDL.SDL_EventType.SDL_KEYDOWN ?
MultiTapDetection.DetectFromKeyboard(keyCode) :
MultiTapDetection.InfoFromKeyboard(keyCode);
var keyEvent = new KeyInput
{
Event = type,
Key = keyCode,
Modifiers = mods,
UnicodeChar = (char)e.key.keysym.sym,
MultiTapCount = tapCount
};
// Special case workaround for windows users
if (e.key.keysym.sym == SDL.SDL_Keycode.SDLK_F4 && mods.HasModifier(Modifiers.Alt) &&
Platform.CurrentPlatform == PlatformType.Windows)
{
OpenRA.Game.Exit();
}
else
inputHandler.OnKeyInput(keyEvent);
break;
}
}
}
if (pendingMotion != null)
{
inputHandler.OnMouseInput(pendingMotion.Value);
pendingMotion = null;
}
ErrorHandler.CheckGlError();
}
}
}

View File

@@ -0,0 +1,344 @@
<StyleCopSettings Version="105">
<Analyzers>
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
<Rules>
<Rule Name="ElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="EnumerationItemsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustContainValidXml">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotHaveDefaultSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustMatchElementParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="VoidReturnValueMustNotBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumentedPartialClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustMatchTypeParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustMatchAccessors">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotBeCopiedAndPasted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustNotUseDocumentationStyleSlashes">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustNotBeEmpty">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustContainWhitespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustMeetCharacterPercentage">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DestructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationHeadersMustNotContainBlankLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludedDocumentationXPathDoesNotExist">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludeNodeDoesNotContainValidFileAndPath">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InheritDocMustBeUsedWithInheritingClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustBeSpelledCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMustHaveHeader">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustShowCopyright">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveCopyrightText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustContainFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveValidCompanyText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchTypeName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules">
<Rules>
<Rule Name="TabsMustNotBeUsed">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.LayoutRules">
<Rules>
<Rule Name="CurlyBracketsForMultiLineStatementsMustNotShareLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StatementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CurlyBracketsMustNotBeOmitted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeSeparatedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.OrderingRules">
<Rules>
<Rule Name="UsingDirectivesMustBePlacedWithinNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustAppearInTheCorrectOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeOrderedByAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.ReadabilityRules">
<Rules>
<Rule Name="CodeMustNotContainMultipleStatementsOnOneLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseStringEmptyForEmptyStrings">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixLocalCallsWithThis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixCallsCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParametersMustBeOnSameLineOrSeparateLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterMustFollowComma">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SplitParametersMustStartOnLineAfterDeclaration">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.MaintainabilityRules">
<Rules>
<Rule Name="AccessModifierMustBeDeclared">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldsMustBePrivate">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMayOnlyContainASingleClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ArithmeticExpressionsMustDeclarePrecedence">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
</Analyzers>
</StyleCopSettings>

View File

@@ -39,6 +39,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeoIP", "GeoIP\GeoIP.csproj
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Irc", "OpenRA.Irc\OpenRA.Irc.csproj", "{85B48234-8B31-4BE6-AF9C-665CC6866841}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Irc", "OpenRA.Irc\OpenRA.Irc.csproj", "{85B48234-8B31-4BE6-AF9C-665CC6866841}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Renderer.Sdl2", "OpenRA.Renderer.Sdl2\OpenRA.Renderer.Sdl2.csproj", "{33D03738-C154-4028-8EA8-63A3C488A651}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@@ -134,6 +136,14 @@ Global
{E9C01A96-C3E2-4772-825B-A740AC513D31}.Release|Any CPU.Build.0 = Release|Any CPU {E9C01A96-C3E2-4772-825B-A740AC513D31}.Release|Any CPU.Build.0 = Release|Any CPU
{E9C01A96-C3E2-4772-825B-A740AC513D31}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {E9C01A96-C3E2-4772-825B-A740AC513D31}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{E9C01A96-C3E2-4772-825B-A740AC513D31}.Release|Mixed Platforms.Build.0 = Release|Any CPU {E9C01A96-C3E2-4772-825B-A740AC513D31}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Debug|Any CPU.Build.0 = Debug|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Release|Any CPU.ActiveCfg = Release|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Release|Any CPU.Build.0 = Release|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{33D03738-C154-4028-8EA8-63A3C488A651}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{52FD9F0B-B209-4ED7-8A32-AC8033363263}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {52FD9F0B-B209-4ED7-8A32-AC8033363263}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{52FD9F0B-B209-4ED7-8A32-AC8033363263}.Debug|Any CPU.Build.0 = Debug|Any CPU {52FD9F0B-B209-4ED7-8A32-AC8033363263}.Debug|Any CPU.Build.0 = Debug|Any CPU
{52FD9F0B-B209-4ED7-8A32-AC8033363263}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {52FD9F0B-B209-4ED7-8A32-AC8033363263}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU

BIN
thirdparty/SDL2#.dll vendored Executable file

Binary file not shown.

22
thirdparty/SDL2#.dll.config vendored Normal file
View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="windows" target="SDL2.dll"/>
<dllmap dll="SDL2.dll" os="osx" target="/Library/Frameworks/SDL2.framework/SDL2"/>
<dllmap dll="SDL2.dll" os="linux" target="libSDL2-2.0.so.0"/>
<dllmap dll="SDL2_image.dll" os="windows" target="SDL2_image.dll"/>
<dllmap dll="SDL2_image.dll" os="osx" target="libSDL2_image-2.0.0.dylib"/>
<dllmap dll="SDL2_image.dll" os="linux" target="libSDL2_image-2.0.so.0"/>
<dllmap dll="SDL2_mixer.dll" os="windows" target="SDL2_mixer.dll"/>
<dllmap dll="SDL2_mixer.dll" os="osx" target="libSDL2_mixer-2.0.0.dylib"/>
<dllmap dll="SDL2_mixer.dll" os="linux" target="libSDL2_mixer-2.0.so.0"/>
<dllmap dll="SDL2_ttf.dll" os="windows" target="SDL2_ttf.dll"/>
<dllmap dll="SDL2_ttf.dll" os="osx" target="libSDL2_ttf-2.0.0.dylib"/>
<dllmap dll="SDL2_ttf.dll" os="linux" target="libSDL2_ttf-2.0.so.0"/>
<dllmap dll="openal32.dll" os="windows" target="openal32.dll"/>
<dllmap dll="openal32.dll" os="osx" target="libopenal.1.dylib"/>
<dllmap dll="openal32.dll" os="linux" target="libopenal.so.1"/>
</configuration>