From df1201b4c29542154363c02dc0b8da5f76b14be4 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Tue, 12 Jul 2011 21:40:50 +1200 Subject: [PATCH] start moving common parts of the renderer into OpenRA.Renderer.SdlCommon --- Makefile | 22 +++- OpenRA.Editor/OpenRA.Editor.csproj | 2 +- OpenRA.Renderer.Cg/OpenRA.Renderer.Cg.csproj | 6 +- OpenRA.Renderer.Gl/GraphicsDevice.cs | 71 +++------- OpenRA.Renderer.Gl/OpenRA.Renderer.Gl.csproj | 6 +- OpenRA.Renderer.Gl/Shader.cs | 59 ++++----- OpenRA.Renderer.SdlCommon/ErrorHandler.cs | 58 +++++++++ .../OpenRA.Renderer.SdlCommon.csproj | 1 + OpenRA.Renderer.SdlCommon/Texture.cs | 122 ++++++++++++++++++ OpenRA.Renderer.SdlCommon/VertexBuffer.cs | 58 +++++++++ OpenRA.sln | 10 ++ 11 files changed, 321 insertions(+), 94 deletions(-) create mode 100644 OpenRA.Renderer.SdlCommon/ErrorHandler.cs create mode 100644 OpenRA.Renderer.SdlCommon/OpenRA.Renderer.SdlCommon.csproj create mode 100644 OpenRA.Renderer.SdlCommon/Texture.cs create mode 100644 OpenRA.Renderer.SdlCommon/VertexBuffer.cs diff --git a/Makefile b/Makefile index 9097219f7a..379795a69d 100644 --- a/Makefile +++ b/Makefile @@ -37,30 +37,38 @@ game: $(game_TARGET) # # Renderer dlls # +rsdl_SRCS := $(shell find OpenRA.Renderer.SdlCommon/ -iname '*.cs') +rsdl_TARGET = OpenRA.Renderer.SdlCommon.dll +rsdl_KIND = library +rsdl_DEPS = $(fileformats_TARGET) $(game_TARGET) +rsdl_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll \ + thirdparty/Tao/Tao.OpenGl.dll thirdparty/Tao/Tao.Sdl.dll \ + $(rsdl_DEPS) + rcg_SRCS := $(shell find OpenRA.Renderer.Cg/ -iname '*.cs') rcg_TARGET = OpenRA.Renderer.Cg.dll rcg_KIND = library -rcg_DEPS = $(fileformats_TARGET) $(game_TARGET) +rcg_DEPS = $(fileformats_TARGET) $(game_TARGET) $(rsdl_TARGET) rcg_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll \ thirdparty/Tao/Tao.Cg.dll thirdparty/Tao/Tao.OpenGl.dll thirdparty/Tao/Tao.Sdl.dll \ - $(rcg_DEPS) $(game_TARGET) + $(rcg_DEPS) rgl_SRCS := $(shell find OpenRA.Renderer.Gl/ -iname '*.cs') rgl_TARGET = OpenRA.Renderer.Gl.dll rgl_KIND = library -rgl_DEPS = $(fileformats_TARGET) $(game_TARGET) +rgl_DEPS = $(fileformats_TARGET) $(game_TARGET) $(rsdl_TARGET) rgl_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll \ thirdparty/Tao/Tao.Cg.dll thirdparty/Tao/Tao.OpenGl.dll thirdparty/Tao/Tao.Sdl.dll \ - $(rgl_DEPS) $(game_TARGET) + $(rgl_DEPS) rnull_SRCS := $(shell find OpenRA.Renderer.Null/ -iname '*.cs') rnull_TARGET = OpenRA.Renderer.Null.dll rnull_KIND = library rnull_DEPS = $(fileformats_TARGET) $(game_TARGET) rnull_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll \ - $(rnull_DEPS) $(game_TARGET) -PROGRAMS += rcg rgl rnull -renderers: $(rcg_TARGET) $(rgl_TARGET) $(rnull_TARGET) + $(rnull_DEPS) +PROGRAMS += rcg rgl rnull rsdl +renderers: $(rcg_TARGET) $(rgl_TARGET) $(rnull_TARGET) $(rsdl_TARGET) # # Official Mods diff --git a/OpenRA.Editor/OpenRA.Editor.csproj b/OpenRA.Editor/OpenRA.Editor.csproj index bfe0cced83..e89bcccdbf 100644 --- a/OpenRA.Editor/OpenRA.Editor.csproj +++ b/OpenRA.Editor/OpenRA.Editor.csproj @@ -1,4 +1,4 @@ - + Debug diff --git a/OpenRA.Renderer.Cg/OpenRA.Renderer.Cg.csproj b/OpenRA.Renderer.Cg/OpenRA.Renderer.Cg.csproj index 19e972edb5..e39b1125e8 100644 --- a/OpenRA.Renderer.Cg/OpenRA.Renderer.Cg.csproj +++ b/OpenRA.Renderer.Cg/OpenRA.Renderer.Cg.csproj @@ -1,4 +1,4 @@ - + Debug @@ -70,6 +70,10 @@ {0DFB103F-2962-400F-8C6D-E2C28CCBA633} OpenRA.Game + + {52FD9F0B-B209-4ED7-8A32-AC8033363263} + OpenRA.Renderer.SdlCommon +