Browse Source

Added render target sample for windows

dellis1972 13 years ago
parent
commit
e92ef9db5f

+ 2 - 2
Samples/MacOS/RenderTarget2DSample/Game1.cs

@@ -63,8 +63,8 @@ namespace RenderTarget2DSample
 #if ANDROID || IOS
             graphics.IsFullScreen = true;
 #else
-			graphics.PreferredBackBufferWidth = screenWidth;
-			graphics.PreferredBackBufferHeight = screenHeight;
+			graphics.PreferredBackBufferWidth = 800;
+			graphics.PreferredBackBufferHeight = 600;
 			graphics.IsFullScreen = false;
 #endif
 

+ 39 - 0
Samples/MonoGame.Samples.Windows.sln

@@ -1,12 +1,17 @@
 
 Microsoft Visual Studio Solution File, Format Version 11.00
 # Visual Studio 2010
+# SharpDevelop 4.0.0.7070
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network.Windows", "..\..\MonoGame\ThirdParty\Lidgren.Network\Lidgren.Network.Windows.csproj", "{AE483C29-042E-4226-BA52-D247CE7676DA}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Framework.Windows", "..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.Windows.csproj", "{7DE47032-A904-4C29-BD22-2D235E8D91BA}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Samples.Draw2D.Windows", "Windows\Draw2D\MonoGame.Samples.Draw2D.Windows.csproj", "{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetRumble", "Windows\NetRumble\NetRumble.csproj", "{36CDED1D-BE90-4C12-BC0A-F923AB92B98D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RenderTarget2D", "Windows\RenderTarget2D\RenderTarget2D.csproj", "{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -65,6 +70,40 @@ Global
 		{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
+		{36CDED1D-BE90-4C12-BC0A-F923AB92B98D}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+		{36CDED1D-BE90-4C12-BC0A-F923AB92B98D}.Debug|Mixed Platforms.Build.0 = Debug|x86
+		{36CDED1D-BE90-4C12-BC0A-F923AB92B98D}.Debug|x86.ActiveCfg = Debug|x86
+		{36CDED1D-BE90-4C12-BC0A-F923AB92B98D}.Debug|x86.Build.0 = Debug|x86
+		{36CDED1D-BE90-4C12-BC0A-F923AB92B98D}.Release|Any CPU.ActiveCfg = Release|x86
+		{36CDED1D-BE90-4C12-BC0A-F923AB92B98D}.Release|iPhone.ActiveCfg = Release|x86
+		{36CDED1D-BE90-4C12-BC0A-F923AB92B98D}.Release|iPhoneSimulator.ActiveCfg = Release|x86
+		{36CDED1D-BE90-4C12-BC0A-F923AB92B98D}.Release|Mixed Platforms.ActiveCfg = Release|x86
+		{36CDED1D-BE90-4C12-BC0A-F923AB92B98D}.Release|Mixed Platforms.Build.0 = Release|x86
+		{36CDED1D-BE90-4C12-BC0A-F923AB92B98D}.Release|x86.ActiveCfg = Release|x86
+		{36CDED1D-BE90-4C12-BC0A-F923AB92B98D}.Release|x86.Build.0 = Release|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Debug|Any CPU.Build.0 = Debug|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Debug|Any CPU.ActiveCfg = Debug|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Debug|iPhone.Build.0 = Debug|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Debug|iPhone.ActiveCfg = Debug|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Debug|iPhoneSimulator.Build.0 = Debug|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Debug|Mixed Platforms.Build.0 = Debug|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Debug|x86.Build.0 = Debug|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Debug|x86.ActiveCfg = Debug|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Release|Any CPU.Build.0 = Release|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Release|Any CPU.ActiveCfg = Release|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Release|iPhone.Build.0 = Release|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Release|iPhone.ActiveCfg = Release|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Release|iPhoneSimulator.Build.0 = Release|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Release|iPhoneSimulator.ActiveCfg = Release|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Release|Mixed Platforms.Build.0 = Release|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Release|Mixed Platforms.ActiveCfg = Release|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Release|x86.Build.0 = Release|x86
+		{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}.Release|x86.ActiveCfg = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 2 - 2
Samples/Windows/NetRumble/NetRumble.csproj

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

+ 27 - 0
Samples/Windows/RenderTarget2D/Program.cs

@@ -0,0 +1,27 @@
+/*
+ * Created by SharpDevelop.
+ * User: d_ellis
+ * Date: 06/10/2011
+ * Time: 19:07
+ * 
+ * To change this template use Tools | Options | Coding | Edit Standard Headers.
+ */
+using System;
+
+namespace RenderTarget2DSample
+{
+	class Program
+	{
+		private static Game1 game;
+
+        /// <summary>
+        /// The main entry point for the application.
+        /// </summary>
+        [STAThread]
+        static void Main()
+        {
+            game = new Game1();
+            game.Run();
+        }
+	}
+}

+ 31 - 0
Samples/Windows/RenderTarget2D/Properties/AssemblyInfo.cs

@@ -0,0 +1,31 @@
+#region Using directives
+
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+#endregion
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("RenderTarget2D")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("RenderTarget2D")]
+[assembly: AssemblyCopyright("Copyright 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// This sets the default COM visibility of types in the assembly to invisible.
+// If you need to expose a type to COM, use [ComVisible(true)] on that type.
+[assembly: ComVisible(false)]
+
+// The assembly version has following format :
+//
+// Major.Minor.Build.Revision
+//
+// You can specify all the values or you can use the default the Revision and 
+// Build Numbers by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.*")]

+ 71 - 0
Samples/Windows/RenderTarget2D/RenderTarget2D.csproj

@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
+  <PropertyGroup>
+    <ProjectGuid>{B3DD03E0-4DEC-45A0-A481-2CF90A51C516}</ProjectGuid>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>RenderTarget2D</RootNamespace>
+    <AssemblyName>RenderTarget2D</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Platform)' == 'x86' ">
+    <PlatformTarget>x86</PlatformTarget>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
+    <OutputPath>bin\Debug\</OutputPath>
+    <DebugSymbols>True</DebugSymbols>
+    <DebugType>Full</DebugType>
+    <Optimize>False</Optimize>
+    <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
+    <OutputPath>bin\Release\</OutputPath>
+    <DebugSymbols>False</DebugSymbols>
+    <DebugType>None</DebugType>
+    <Optimize>True</Optimize>
+    <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
+    <DefineConstants>TRACE</DefineConstants>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\..\MacOS\RenderTarget2DSample\Game1.cs">
+      <Link>Game1.cs</Link>
+    </Compile>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.Windows.csproj">
+      <Project>{7DE47032-A904-4C29-BD22-2D235E8D91BA}</Project>
+      <Name>MonoGame.Framework.Windows</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\MonoGame\ThirdParty\Lidgren.Network\Lidgren.Network.Windows.csproj">
+      <Project>{AE483C29-042E-4226-BA52-D247CE7676DA}</Project>
+      <Name>Lidgren.Network.Windows</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="Content" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="..\..\MacOS\RenderTarget2DSample\Content\MooTheMerciless.xnb">
+      <Link>Content\MooTheMerciless.xnb</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\MacOS\RenderTarget2DSample\Content\wood.xnb">
+      <Link>Content\wood.xnb</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
+</Project>