2
0
Эх сурвалжийг харах

Fixed the Windows Samples

Dean Ellis 12 жил өмнө
parent
commit
ac4c7afd7b

+ 2 - 2
CatapultNetWars/CatapaultNetWars.Windows.csproj

@@ -118,9 +118,9 @@
     </Compile>
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\MonoGame.Framework\MonoGame.Framework.Windows.csproj">
+    <ProjectReference Include="..\..\MonoGame.Framework\MonoGame.Framework.WindowsGL.csproj">
       <Project>{7DE47032-A904-4C29-BD22-2D235E8D91BA}</Project>
-      <Name>MonoGame.Framework.Windows</Name>
+      <Name>MonoGame.Framework.WindowsGL</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\ThirdParty\Lidgren.Network\Lidgren.Network.Windows.csproj">
       <Project>{AE483C29-042E-4226-BA52-D247CE7676DA}</Project>

BIN
Draw2D/Content/monogameicon.png


BIN
Draw2D/Content/purpleBall.xnb


BIN
Draw2D/Content/spriteFont1.xnb


+ 86 - 0
Draw2D/Draw2D.Windows.csproj

@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Draw2D</RootNamespace>
+    <AssemblyName>Draw2D</AssemblyName>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <PlatformTarget>x86</PlatformTarget>
+    <DebugSymbols>True</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>False</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <PlatformTarget>x86</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>True</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE;WINDOWS</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup>
+    <StartupObject />
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="FPSCounterComponent.cs" />
+    <Compile Include="Game1.cs" />
+    <Compile Include="main.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Default.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\ThirdParty\Libs\OpenTK.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Default.png">
+      <Link>Default.png</Link>
+    </Content>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\MonoGame.Framework\MonoGame.Framework.WindowsGL.csproj">
+      <Project>{7DE47032-A904-4C29-BD22-2D235E8D91BA}</Project>
+      <Name>MonoGame.Framework.WindowsGL</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup />
+  <ItemGroup>
+    <Content Include="..\CompiledContent\Windows\Content\Fonts\Font.xnb">
+      <Link>Content\Font.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\CompiledContent\Windows\Content\Textures\logo.xnb">
+      <Link>Content\logo.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 3 - 4
Draw2D/Game1.cs

@@ -22,7 +22,7 @@ namespace Microsoft.Xna.Samples.Draw2D
 	{
 		GraphicsDeviceManager graphics;
 		SpriteBatch spriteBatch;		
-		Texture2D texture, ball;
+		Texture2D texture;
 		SpriteFont font;
 		float size, rotation;
 		float clippingSize = 0.0f;
@@ -71,9 +71,8 @@ namespace Microsoft.Xna.Samples.Draw2D
 			spriteBatch = new SpriteBatch (GraphicsDevice);
 
 			// TODO: use this.Content to load your game content here
-			texture = Content.Load<Texture2D> ("monogameicon");
-			// TODO ball = Content.Load<Texture2D> ("purpleBall.xnb");
-			font = Content.Load<SpriteFont> ("spriteFont1");
+			texture = Content.Load<Texture2D> ("logo");
+			font = Content.Load<SpriteFont> ("Font");
 
 			fps = new FPSCounterComponent (this,spriteBatch,font);
 			Components.Add(fps);

+ 36 - 36
MonoGame.Samples.Windows.sln

@@ -1,17 +1,17 @@
 
 Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual C# Express 2010
+# Visual Studio 2010
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network.Windows", "..\ThirdParty\Lidgren.Network\Lidgren.Network.Windows.csproj", "{AE483C29-042E-4226-BA52-D247CE7676DA}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Framework.Windows", "..\MonoGame.Framework\MonoGame.Framework.Windows.csproj", "{7DE47032-A904-4C29-BD22-2D235E8D91BA}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetRumble.Windows", "NetRumble\NetRumble.Windows.csproj", "{36CDED1D-BE90-4C12-BC0A-F923AB92B98D}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Samples.Draw2D.Windows", "Draw2D\MonoGame.Samples.Draw2D.Windows.csproj", "{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RenderTarget2D.Windows", "RenderTarget2DSample\RenderTarget2D.Windows.csproj", "{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetRumble", "NetRumble\NetRumble.Windows.csproj", "{36CDED1D-BE90-4C12-BC0A-F923AB92B98D}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CatapaultNetWars.Windows", "CatapultNetWars\CatapaultNetWars.Windows.csproj", "{0BCF8950-A28D-4688-BA92-85BD49637ED0}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RenderTarget2D", "RenderTarget2DSample\RenderTarget2D.Windows.csproj", "{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Framework.WindowsGL", "..\MonoGame.Framework\MonoGame.Framework.WindowsGL.csproj", "{7DE47032-A904-4C29-BD22-2D235E8D91BA}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CatapaultNetWars", "CatapultNetWars\CatapaultNetWars.Windows.csproj", "{0BCF8950-A28D-4688-BA92-85BD49637ED0}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Draw2D.Windows", "Draw2D\Draw2D.Windows.csproj", "{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -41,36 +41,6 @@ Global
 		{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
 		{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
 		{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|x86.ActiveCfg = Release|Any CPU
-		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|iPhone.ActiveCfg = Debug|Any CPU
-		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
-		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
-		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
-		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|x86.ActiveCfg = Debug|x86
-		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|x86.Build.0 = Debug|x86
-		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|Any CPU.Build.0 = Release|Any CPU
-		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|iPhone.ActiveCfg = Release|Any CPU
-		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
-		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
-		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
-		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|x86.ActiveCfg = Release|x86
-		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|x86.Build.0 = Release|x86
-		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Debug|Any CPU.ActiveCfg = Debug|x86
-		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Debug|iPhone.ActiveCfg = Debug|x86
-		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86
-		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
-		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Debug|Mixed Platforms.Build.0 = Debug|x86
-		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Debug|x86.ActiveCfg = Debug|x86
-		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Debug|x86.Build.0 = Debug|x86
-		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Release|Any CPU.ActiveCfg = Release|x86
-		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Release|iPhone.ActiveCfg = Release|x86
-		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Release|iPhoneSimulator.ActiveCfg = Release|x86
-		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Release|Mixed Platforms.ActiveCfg = Release|x86
-		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Release|Mixed Platforms.Build.0 = Release|x86
-		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Release|x86.ActiveCfg = Release|x86
-		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Release|x86.Build.0 = Release|x86
 		{36CDED1D-BE90-4C12-BC0A-F923AB92B98D}.Debug|Any CPU.ActiveCfg = Debug|x86
 		{36CDED1D-BE90-4C12-BC0A-F923AB92B98D}.Debug|iPhone.ActiveCfg = Debug|x86
 		{36CDED1D-BE90-4C12-BC0A-F923AB92B98D}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86
@@ -119,6 +89,36 @@ Global
 		{0BCF8950-A28D-4688-BA92-85BD49637ED0}.Release|Mixed Platforms.Build.0 = Release|x86
 		{0BCF8950-A28D-4688-BA92-85BD49637ED0}.Release|x86.ActiveCfg = Release|x86
 		{0BCF8950-A28D-4688-BA92-85BD49637ED0}.Release|x86.Build.0 = Release|x86
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|x86.ActiveCfg = Debug|x86
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|x86.Build.0 = Debug|x86
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|Any CPU.Build.0 = Release|Any CPU
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|iPhone.ActiveCfg = Release|Any CPU
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|x86.ActiveCfg = Release|x86
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|x86.Build.0 = Release|x86
+		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Debug|Any CPU.ActiveCfg = Debug|x86
+		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Debug|iPhone.ActiveCfg = Debug|x86
+		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86
+		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Debug|Mixed Platforms.Build.0 = Debug|x86
+		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Debug|x86.ActiveCfg = Debug|x86
+		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Debug|x86.Build.0 = Debug|x86
+		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Release|Any CPU.ActiveCfg = Release|x86
+		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Release|iPhone.ActiveCfg = Release|x86
+		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Release|iPhoneSimulator.ActiveCfg = Release|x86
+		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Release|Mixed Platforms.ActiveCfg = Release|x86
+		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Release|Mixed Platforms.Build.0 = Release|x86
+		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Release|x86.ActiveCfg = Release|x86
+		{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Release|x86.Build.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 0 - 41
NetRumble/Content/BloomPostprocess/Effects/BloomCombine.fsh

@@ -1,41 +0,0 @@
-uniform sampler2D BloomSampler_s0;
-uniform sampler2D BaseSampler_s1;
-
-uniform float BloomIntensity;
-uniform float BaseIntensity;
-
-uniform float BloomSaturation;
-uniform float BaseSaturation;
-
-// Helper for modifying the saturation of a color.
-vec4 AdjustSaturation(vec4 color, float saturation)
-{
-    // The constants 0.3, 0.59, and 0.11 are chosen because the
-    // human eye is more sensitive to green light, and less to blue.
-    //float grey = dot(color, vec3(0.3, 0.59, 0.11));
-
-    //return lerp(grey, color, saturation);
-	vec3 grayXfer = vec3(0.3, 0.59, 0.11);
-	vec3 color3 = vec3(color);
-	vec3 gray = vec3(dot(color3, grayXfer));
-	//return vec4(mix(color, gray, Desaturation), 1.0);
-	return vec4(mix(gray, color3, saturation), 1.0);
-}
-
-void main()
-{
-	// Look up the bloom and original base image colors.
-	vec4 bloom = gl_Color * texture2D(BloomSampler_s0, gl_TexCoord[0].xy);
-	vec4 base = gl_Color * texture2D(BaseSampler_s1, gl_TexCoord[0].xy);	
-	// Adjust color saturation and intensity.
-	bloom = AdjustSaturation(bloom, BloomSaturation) * BloomIntensity;
-	base = AdjustSaturation(base, BaseSaturation) * BaseIntensity;
-	
-   // Darken down the base image in areas where there is a lot of bloom,
-    // to prevent things looking excessively burned-out.
-    //base *= (1 - saturate(bloom));
-	base *= clamp(bloom, 0.0, 1.0);
-    // Combine the two images.
-    gl_FragColor = base + bloom;
-	//gl_FragColor = gl_Color * bloom; //texture2D(TextureSampler, 
-}

+ 0 - 51
NetRumble/Content/BloomPostprocess/Effects/BloomCombine.fx

@@ -1,51 +0,0 @@
-// Pixel shader combines the bloom image with the original
-// scene, using tweakable intensity levels and saturation.
-// This is the final step in applying a bloom postprocess.
-
-sampler BloomSampler : register(s0);
-sampler BaseSampler : register(s1);
-
-float BloomIntensity;
-float BaseIntensity;
-
-float BloomSaturation;
-float BaseSaturation;
-
-
-// Helper for modifying the saturation of a color.
-float4 AdjustSaturation(float4 color, float saturation)
-{
-    // The constants 0.3, 0.59, and 0.11 are chosen because the
-    // human eye is more sensitive to green light, and less to blue.
-    float grey = dot(color, float3(0.3, 0.59, 0.11));
-
-    return lerp(grey, color, saturation);
-}
-
-
-float4 PixelShaderF(float2 texCoord : TEXCOORD0) : COLOR0
-{
-    // Look up the bloom and original base image colors.
-    float4 bloom = tex2D(BloomSampler, texCoord);
-    float4 base = tex2D(BaseSampler, texCoord);
-    
-    // Adjust color saturation and intensity.
-    bloom = AdjustSaturation(bloom, BloomSaturation) * BloomIntensity;
-    base = AdjustSaturation(base, BaseSaturation) * BaseIntensity;
-    
-    // Darken down the base image in areas where there is a lot of bloom,
-    // to prevent things looking excessively burned-out.
-    base *= (1 - saturate(bloom));
-    
-    // Combine the two images.
-    return base + bloom;
-}
-
-
-technique BloomCombine
-{
-    pass Pass1
-    {
-        PixelShader = compile ps_2_0 PixelShaderF();
-    }
-}

BIN
NetRumble/Content/BloomPostprocess/Effects/BloomCombine.xnb


+ 0 - 9
NetRumble/Content/BloomPostprocess/Effects/BloomExtract.fsh

@@ -1,9 +0,0 @@
-uniform sampler2D TextureSampler_s0;
-uniform float BloomThreshold;
-
-void main()
-{
-  vec4 c = texture2D(TextureSampler_s0, gl_TexCoord[0].xy);
-  gl_FragColor = clamp((c - BloomThreshold )/ (1.0-BloomThreshold),0.0, 1.0);
-}
-

+ 0 - 25
NetRumble/Content/BloomPostprocess/Effects/BloomExtract.fx

@@ -1,25 +0,0 @@
-// Pixel shader extracts the brighter areas of an image.
-// This is the first step in applying a bloom postprocess.
-
-sampler TextureSampler : register(s0);
-
-float BloomThreshold;
-
-
-float4 PixelShaderF(float2 texCoord : TEXCOORD0) : COLOR0
-{
-    // Look up the original image color.
-    float4 c = tex2D(TextureSampler, texCoord);
-
-    // Adjust it to keep only values brighter than the specified threshold.
-    return saturate((c - BloomThreshold) / (1 - BloomThreshold));
-}
-
-
-technique BloomExtract
-{
-    pass Pass1
-    {
-        PixelShader = compile ps_2_0 PixelShaderF();
-    }
-}

BIN
NetRumble/Content/BloomPostprocess/Effects/BloomExtract.xnb


+ 0 - 18
NetRumble/Content/BloomPostprocess/Effects/GaussianBlur.fsh

@@ -1,18 +0,0 @@
-// Pixel shader applies a one dimensional gaussian blur filter.
-// This is used twice by the bloom postprocess, first to
-// blur horizontally, and then again to blur vertically.
-uniform sampler2D TextureSampler_s0;
-uniform vec2 SampleOffsets[15];
-uniform float SampleWeights[15];
-
-
-void main()
-{
-     vec4 c = vec4(0);
-     for(int i=0; i < 15; i++) 
-     {
-          c += texture2D(TextureSampler_s0, gl_TexCoord[0].xy + SampleOffsets[i]) * SampleWeights[i];
-     }
-	 gl_FragColor = c;
-}
-

+ 0 - 33
NetRumble/Content/BloomPostprocess/Effects/GaussianBlur.fx

@@ -1,33 +0,0 @@
-// Pixel shader applies a one dimensional gaussian blur filter.
-// This is used twice by the bloom postprocess, first to
-// blur horizontally, and then again to blur vertically.
-
-sampler TextureSampler : register(s0);
-
-#define SAMPLE_COUNT 15
-
-float2 SampleOffsets[SAMPLE_COUNT];
-float SampleWeights[SAMPLE_COUNT];
-
-
-float4 PixelShaderF(float2 texCoord : TEXCOORD0) : COLOR0
-{
-    float4 c = 0;
-    
-    // Combine a number of weighted image filter taps.
-    for (int i = 0; i < SAMPLE_COUNT; i++)
-    {
-        c += tex2D(TextureSampler, texCoord + SampleOffsets[i]) * SampleWeights[i];
-    }
-    
-    return c;
-}
-
-
-technique GaussianBlur
-{
-    pass Pass1
-    {
-        PixelShader = compile ps_2_0 PixelShaderF();
-    }
-}

BIN
NetRumble/Content/BloomPostprocess/Effects/GaussianBlur.xnb


+ 0 - 18
NetRumble/Content/Effects/Clouds.fsh

@@ -1,18 +0,0 @@
-uniform sampler2D TextureSampler;
-
-uniform vec2 Position;
-
-void main()
-{
-    vec4 texCoord = vec4(gl_TexCoord[0].xy, 0, 0);
-
-    texCoord.x  += (Position.x  * 0.000250000);
-    texCoord.y  += (Position.y  * 0.000250000);
-    texCoord *= 0.500000;
-    vec4 results = (vec4( 0.000000, 0.000000, 1.00000, 0.250000) * texture2D( TextureSampler, texCoord.xy));
-    texCoord.x  += ((Position.x  * 0.000250000) + 0.250000);
-    texCoord.y  += ((Position.y  * 0.000250000) - 0.150000);
-    texCoord *= 0.400000;
-    results += (vec4( 0.000000, 1.00000, 0.000000, 0.150000) * texture2D( TextureSampler, texCoord.xy));
-    gl_FragColor = results;
-}

BIN
NetRumble/Content/Effects/Clouds.xnb


+ 22 - 17
NetRumble/NetRumble.Windows.csproj

@@ -4,7 +4,7 @@
     <ProjectGuid>{36CDED1D-BE90-4C12-BC0A-F923AB92B98D}</ProjectGuid>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
-    <OutputType>Exe</OutputType>
+    <OutputType>WinExe</OutputType>
     <RootNamespace>NetRumble</RootNamespace>
     <AssemblyName>NetRumble</AssemblyName>
     <AppDesignerFolder>Properties</AppDesignerFolder>
@@ -32,10 +32,14 @@
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
     <WarningLevel>4</WarningLevel>
+    <DefineConstants>TRACE;DEBUG;WINDOWS</DefineConstants>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
+  <PropertyGroup>
+    <StartupObject />
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System.Core">
@@ -200,18 +204,6 @@
     <Content Include="Content\Audio\wav\rocket.xnb">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
-    <Content Include="Content\BloomPostprocess\Effects\BloomCombine.fsh">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="Content\BloomPostprocess\Effects\BloomExtract.fsh">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="Content\BloomPostprocess\Effects\GaussianBlur.fsh">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="Content\Effects\Clouds.fsh">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
     <Content Include="Content\Fonts\MenuFont.xnb">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
@@ -341,18 +333,31 @@
     <Content Include="Content\Textures\Particles\spark.xnb">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
-    <None Include="app.config" />
-    <Content Include="Content\Effects\Clouds.xnb">
+    <Content Include="..\CompiledContent\Windows\Content\Effects\Clouds.xnb">
+      <Link>Content\Effects\Clouds.xnb</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
+    <Content Include="..\CompiledContent\Windows\Content\Effects\BloomCombine.xnb">
+      <Link>Content\BloomPostprocess\Effects\BloomCombine.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\CompiledContent\Windows\Content\Effects\BloomExtract.xnb">
+      <Link>Content\BloomPostprocess\Effects\BloomExtract.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\CompiledContent\Windows\Content\Effects\GaussianBlur.xnb">
+      <Link>Content\BloomPostprocess\Effects\GaussianBlur.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <None Include="app.config" />
   </ItemGroup>
   <ItemGroup>
     <Folder Include="Effects\" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\MonoGame.Framework\MonoGame.Framework.Windows.csproj">
+    <ProjectReference Include="..\..\MonoGame.Framework\MonoGame.Framework.WindowsGL.csproj">
       <Project>{7DE47032-A904-4C29-BD22-2D235E8D91BA}</Project>
-      <Name>MonoGame.Framework.Windows</Name>
+      <Name>MonoGame.Framework.WindowsGL</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\ThirdParty\Lidgren.Network\Lidgren.Network.Windows.csproj">
       <Project>{AE483C29-042E-4226-BA52-D247CE7676DA}</Project>

+ 1 - 1
NetRumble/NetRumbleGame.cs

@@ -73,7 +73,7 @@ namespace NetRumble
             // initialize the graphics device manager
             graphics = new GraphicsDeviceManager(this);
 
-#if LINUX || MONOMAC || LINUX
+#if LINUX || MONOMAC || LINUX || WINDOWS
             graphics.PreferredBackBufferWidth = 1280;
             graphics.PreferredBackBufferHeight = 720;
 #else

BIN
RenderTarget2DSample/Content/MooTheMerciless.xnb


BIN
RenderTarget2DSample/Content/wood.xnb


+ 9 - 9
RenderTarget2DSample/Game1.cs

@@ -39,12 +39,12 @@ namespace RenderTarget2DSample
 		/// <summary>
 		/// This is a texture we'll be using to load a picture of Seamus the dog.
 		/// </summary>
-		Texture2D mooTheMerciless;
+		Texture2D logo;
 
 		/// <summary>
 		/// This is a texture we'll be using to load a picture of a tileable wood surface.
 		/// </summary>
-		Texture2D wood;
+		Texture2D checker;
 		bool oneTimeOnly = true;
 
 		/// <summary>
@@ -96,10 +96,10 @@ namespace RenderTarget2DSample
 				GraphicsDevice.PresentationParameters.BackBufferHeight, false, SurfaceFormat.Color, DepthFormat.None);
             
 			// Load in our wood tile.
-			wood = Content.Load<Texture2D> ("wood");
+			checker = Content.Load<Texture2D> ("checker");
 			
 			// Load in the picture of Seamus.
-			mooTheMerciless = Content.Load<Texture2D> ("MooTheMerciless");
+			logo = Content.Load<Texture2D> ("logo");
 
 			
 		}
@@ -182,13 +182,13 @@ namespace RenderTarget2DSample
 						// return 1 and the spriteBatch.Draw call gets skipped. If it's even, it'll return 0 so
 						// spriteBatch.Draw will get called and it'll draw a tile there.
 						if (xBlank % 2 == 0) {
-							spriteBatch.Draw (wood, woodPosition, Color.White);
+							spriteBatch.Draw (checker, woodPosition, Color.White);
 						}
 						// Increment xBlank by one so that every other tile will get drawn.
 						xBlank++;
 						// Increase the X coordinate of where we'll draw the wood tile in order to progressively draw
 						// each column of tiles.
-						woodPosition.X += wood.Width;
+						woodPosition.X += checker.Width;
 
 						// We draw so long as woodPosition.X is less than our renderTarget's width
 					} while (woodPosition.X < renderTarget.Width);
@@ -210,14 +210,14 @@ namespace RenderTarget2DSample
 
 					// Increase the Y coord of where we'll draw the wood tile in order to progressively draw each
 					// row of tiles.
-					woodPosition.Y += wood.Height;
+					woodPosition.Y += checker.Height;
 
 					// We draw so long as woodPosition.Y is less than our renderTarget's width
 				} while (woodPosition.Y < renderTarget.Height);
 
 				// Now that we've drawn the wood tiles, we draw Moo the Merciless. We draw him centered in the rendertarget.
-				spriteBatch.Draw (mooTheMerciless, 
-				new Vector2 ((renderTarget.Width / 2f) - (mooTheMerciless.Width / 2f), (renderTarget.Height / 2f) - (mooTheMerciless.Height / 2f)), 
+				spriteBatch.Draw (logo, 
+				new Vector2 ((renderTarget.Width / 2f) - (logo.Width / 2f), (renderTarget.Height / 2f) - (logo.Height / 2f)), 
 				Color.White);
 
 				// End the spriteBatch draw.

+ 12 - 12
RenderTarget2DSample/RenderTarget2D.Windows.csproj

@@ -48,9 +48,7 @@
     </Reference>
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="Game1.cs">
-      <Link>Game1.cs</Link>
-    </Compile>
+    <Compile Include="Game1.cs" />
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
@@ -59,21 +57,23 @@
       <Link>SDL.dll</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
-    <Content Include="Content\MooTheMerciless.xnb">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
-    <Content Include="Content\wood.xnb">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
+  <ItemGroup />
   <ItemGroup>
-    <ProjectReference Include="..\..\MonoGame.Framework\MonoGame.Framework.Windows.csproj">
+    <ProjectReference Include="..\..\MonoGame.Framework\MonoGame.Framework.WindowsGL.csproj">
       <Project>{7DE47032-A904-4C29-BD22-2D235E8D91BA}</Project>
-      <Name>MonoGame.Framework.Windows</Name>
+      <Name>MonoGame.Framework.WindowsGL</Name>
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <Folder Include="Content\" />
+    <Content Include="..\CompiledContent\Windows\Content\Textures\checker.xnb">
+      <Link>Content\checker.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\CompiledContent\Windows\Content\Textures\logo.xnb">
+      <Link>Content\logo.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
   </ItemGroup>
 </Project>