Browse Source

Merge branch 'master' of github.com:CartBlanche/MonoGame-Samples

Kenneth Pouncey 13 years ago
parent
commit
09a0ac4283
22 changed files with 529 additions and 125 deletions
  1. 1 2
      Samples/Android/ChaseAndEvade/MonoGame.Samples.ChaseAndEvade.Android.csproj
  2. 1 1
      Samples/Android/ChaseAndEvade/Resources/Resource.Designer.cs
  3. 1 2
      Samples/Android/Draw2D/MonoGame.Samples.Draw2D.Android.csproj
  4. 1 1
      Samples/Android/Draw2D/Resources/Resource.Designer.cs
  5. 26 0
      Samples/Android/MonoGame.Samples.Input/Activity1.cs
  6. 132 0
      Samples/Android/MonoGame.Samples.Input/Game1.cs
  7. 83 0
      Samples/Android/MonoGame.Samples.Input/MonoGame.Samples.Input.csproj
  8. 7 0
      Samples/Android/MonoGame.Samples.Input/Properties/AndroidManifest.xml
  9. 28 0
      Samples/Android/MonoGame.Samples.Input/Properties/AssemblyInfo.cs
  10. 87 0
      Samples/Android/MonoGame.Samples.Input/Resources/Resource.designer.cs
  11. BIN
      Samples/Android/MonoGame.Samples.Input/Resources/drawable/Icon.png
  12. BIN
      Samples/Android/MonoGame.Samples.Input/Resources/drawable/Splash.png
  13. 14 0
      Samples/Android/MonoGame.Samples.Input/Resources/layout/Main.axml
  14. 5 0
      Samples/Android/MonoGame.Samples.Input/Resources/values/Strings.xml
  15. 7 0
      Samples/Android/MonoGame.Samples.Input/Resources/values/Styles.xml
  16. 1 2
      Samples/Android/Peer2Peer/MonoGame.Samples.Peer2Peer.Android.csproj
  17. 1 1
      Samples/Android/Peer2Peer/Resources/Resource.Designer.cs
  18. 1 1
      Samples/Android/RenderTarget2D/Resources/Resource.designer.cs
  19. 2 3
      Samples/Android/Sound/Sound.csproj
  20. 17 4
      Samples/MacOS/RenderTarget2DSample/Game1.cs
  21. 107 107
      Samples/MacOS/VideoPlayer/Game1.cs
  22. 7 1
      Samples/MonoGame.Samples.Android.sln

+ 1 - 2
Samples/Android/ChaseAndEvade/MonoGame.Samples.ChaseAndEvade.Android.csproj

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?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>
@@ -16,7 +16,6 @@
     <AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
     <AndroidSupportedAbis>armeabi</AndroidSupportedAbis>
     <AndroidStoreUncompressedFileExtensions />
-    <TargetFrameworkVersion>v2.2</TargetFrameworkVersion>
     <MandroidI18n />
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

+ 1 - 1
Samples/Android/ChaseAndEvade/Resources/Resource.Designer.cs

@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.235
+//     Runtime Version:4.0.30319.239
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.

+ 1 - 2
Samples/Android/Draw2D/MonoGame.Samples.Draw2D.Android.csproj

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?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>
@@ -15,7 +15,6 @@
     <AndroidApplication>true</AndroidApplication>
     <AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
     <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
-    <TargetFrameworkVersion>v2.2</TargetFrameworkVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>

+ 1 - 1
Samples/Android/Draw2D/Resources/Resource.Designer.cs

@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.235
+//     Runtime Version:4.0.30319.239
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.

+ 26 - 0
Samples/Android/MonoGame.Samples.Input/Activity1.cs

@@ -0,0 +1,26 @@
+using System;
+
+using Android.App;
+using Android.Content;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+using Android.OS;
+
+namespace MonoGame.Samples.Input
+{
+	[Activity (Label = "MonoGame.Samples.Input", MainLauncher = true,Icon = "@drawable/icon", Theme = "@style/Theme.Splash")]
+	public class Activity1 :  Microsoft.Xna.Framework.AndroidGameActivity
+	{
+		protected override void OnCreate (Bundle bundle)
+		{
+			base.OnCreate (bundle);
+	        Game1.Activity = this;
+            var g = new Game1();
+            SetContentView(g.Window);
+            g.Run();
+		}
+	}
+}
+
+

+ 132 - 0
Samples/Android/MonoGame.Samples.Input/Game1.cs

@@ -0,0 +1,132 @@
+using System;
+using System.Collections.Generic;
+
+#if ANDROID
+using Android.App;
+#endif
+
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+using Microsoft.Xna.Framework.Input.Touch;
+using Microsoft.Xna.Framework.Media;
+using Microsoft.Xna.Framework.Storage;
+
+namespace MonoGame.Samples.Input
+{
+	public class Game1 : Microsoft.Xna.Framework.Game
+	{
+		GraphicsDeviceManager graphics;
+		SpriteBatch spriteBatch;		
+		
+		SpriteFont font;
+		
+		KeyboardState currentKeyboardState;
+		GamePadState currentGamePadState;
+		TouchCollection currentTouchState;
+		
+		public Game1 ()
+		{
+			graphics = new GraphicsDeviceManager (this);
+			
+			Content.RootDirectory = "Content";
+			
+			graphics.PreferMultiSampling = true;
+			graphics.IsFullScreen = true;	
+
+			graphics.SupportedOrientations = DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight 
+				//| DisplayOrientation.Portrait
+				;
+		}
+		
+		/// <summary>
+		/// Allows the game to perform any initialization it needs to before starting to run.
+		/// This is where it can query for any required services and load any non-graphic
+		/// related content.  Calling base.Initialize will enumerate through any components
+		/// and initialize them as well.
+		/// </summary>
+		protected override void Initialize ()
+		{
+			// TODO: Add your initialization logic here
+
+			base.Initialize ();
+		}
+		
+		/// <summary>
+		/// LoadContent will be called once per game and is the place to load
+		/// all of your content.
+		/// </summary>
+		protected override void LoadContent ()
+		{
+			// Create a new SpriteBatch, which can be used to draw textures.
+			spriteBatch = new SpriteBatch (GraphicsDevice);
+
+			// TODO: use this.Content to load your game content here
+			font = Content.Load<SpriteFont> ("spriteFont1");
+						
+		}
+
+		/// <summary>
+		/// Allows the game to run logic such as updating the world,
+		/// checking for collisions, gathering input, and playing audio.
+		/// </summary>
+		/// <param name="gameTime">Provides a snapshot of timing values.</param>
+		protected override void Update (GameTime gameTime)
+		{			
+			currentKeyboardState = Keyboard.GetState ();
+			currentGamePadState = GamePad.GetState (PlayerIndex.One);
+			currentTouchState = TouchPanel.GetState();
+									
+			base.Update (gameTime);
+		}
+				
+		/// <summary>
+		/// This is called when the game should draw itself.
+		/// </summary>
+		/// <param name="gameTime">Provides a snapshot of timing values.</param>
+		protected override void Draw (GameTime gameTime)
+		{
+			graphics.GraphicsDevice.Clear (Color.CornflowerBlue);
+			
+			// Won't be visible until we hide the movie
+			spriteBatch.Begin();	
+			
+			Vector2 center = new Vector2(GraphicsDevice.Viewport.Width /2, GraphicsDevice.Viewport.Height /2);
+			Vector2 s1 = font.MeasureString("Touch the Screen");
+			center.X -= (s1.X /2);
+			spriteBatch.DrawString(font, "Touch the Screen", center, Color.Red);
+			center.Y += 20;
+			spriteBatch.DrawString(font, GraphicsDevice.Viewport.Width.ToString() + " x " + GraphicsDevice.Viewport.Height.ToString(), center, Color.Red);
+			center.Y += 20;
+			spriteBatch.DrawString(font, GraphicsDevice.PresentationParameters.DisplayOrientation.ToString(), center, Color.Red);
+			
+			
+			spriteBatch.DrawString(font, "0,0", new Vector2(0,0), Color.Red);
+			string s = GraphicsDevice.Viewport.Width.ToString() + ",0";
+			Vector2 v = font.MeasureString(s);			
+			spriteBatch.DrawString(font, s, new Vector2(GraphicsDevice.Viewport.Width-v.X, 0), Color.Red);
+			s = "0,"+GraphicsDevice.Viewport.Height.ToString();
+			v = font.MeasureString(s);			
+			spriteBatch.DrawString(font, s , new Vector2(0, GraphicsDevice.Viewport.Height-v.Y), Color.Red);
+		    string wandh = GraphicsDevice.Viewport.Width.ToString() + ", " + GraphicsDevice.Viewport.Height.ToString();
+			Vector2 wh = font.MeasureString(wandh);
+			spriteBatch.DrawString(font, wandh, new Vector2(GraphicsDevice.Viewport.Width-wh.X, GraphicsDevice.Viewport.Height-wh.Y), Color.Red);
+			
+								
+			if (currentTouchState != null && currentTouchState.Count > 0) 
+			{
+				for (int i = 0 ; i < currentTouchState.Count; i++)
+				{
+					center.Y += s1.Y;
+					Vector2 p = currentTouchState[i].Position;
+					spriteBatch.DrawString(font, "+", p, Color.Red);
+					spriteBatch.DrawString(font, p.ToString(), center, Color.Red);
+				}
+			}
+			
+			spriteBatch.End();
+		}
+	}
+}
+

+ 83 - 0
Samples/Android/MonoGame.Samples.Input/MonoGame.Samples.Input.csproj

@@ -0,0 +1,83 @@
+<?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>{CB2084E4-BEC8-4318-8011-93CC2E3C9E94}</ProjectGuid>
+    <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <OutputType>Library</OutputType>
+    <RootNamespace>MonoGame.Samples.Input</RootNamespace>
+    <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
+    <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
+    <AndroidResgenClass>Resource</AndroidResgenClass>
+    <AndroidApplication>True</AndroidApplication>
+    <AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
+    <AssemblyName>MonoGame.Samples.Input</AssemblyName>
+    <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <AndroidLinkMode>None</AndroidLinkMode>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
+    <ConsolePause>false</ConsolePause>
+    <AndroidLinkMode>SdkOnly</AndroidLinkMode>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Core" />
+    <Reference Include="Mono.Android" />
+    <Reference Include="OpenTK" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Activity1.cs" />
+    <Compile Include="Resources\Resource.designer.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Game1.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidResource Include="Resources\layout\Main.axml" />
+    <AndroidResource Include="Resources\values\Strings.xml" />
+    <AndroidResource Include="Resources\drawable\Icon.png" />
+    <AndroidResource Include="Resources\drawable\Splash.png" />
+    <AndroidResource Include="Resources\values\Styles.xml" />
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\MonoGame\ThirdParty\Lidgren.Network\Lidgren.Network.Android.csproj">
+      <Project>{565129E0-4EE5-4F6F-B403-C3484C9740BE}</Project>
+      <Name>Lidgren.Network.Android</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.Android.csproj">
+      <Project>{BA9476CF-99BA-4D03-92F2-73D2C5E58883}</Project>
+      <Name>MonoGame.Framework.Android</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="Assets\Content\" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Properties\AndroidManifest.xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="..\..\iOS\Draw2D\Content\spriteFont1.xnb">
+      <Link>Assets\Content\spriteFont1.xnb</Link>
+    </AndroidAsset>
+  </ItemGroup>
+</Project>

+ 7 - 0
Samples/Android/MonoGame.Samples.Input/Properties/AndroidManifest.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="monogamesamplesinput.monogamesamplesinput">
+	<application android:label="MonoGame.Samples.Input" android:debuggable="true" android:icon="@drawable/icon"></application>
+	<uses-sdk android:minSdkVersion="8" />
+	<uses-permission android:name="android.permission.INTERNET" />
+	<uses-permission android:name="android.permission.SET_ORIENTATION" />
+</manifest>

+ 28 - 0
Samples/Android/MonoGame.Samples.Input/Properties/AssemblyInfo.cs

@@ -0,0 +1,28 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using Android.App;
+
+// Information about this assembly is defined by the following attributes. 
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("MonoGame.Samples.Input")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("technomage")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly, 
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+

+ 87 - 0
Samples/Android/MonoGame.Samples.Input/Resources/Resource.designer.cs

@@ -0,0 +1,87 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.239
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace MonoGame.Samples.Input
+{
+	
+	
+	public partial class Resource
+	{
+		
+		public partial class Attribute
+		{
+			
+			private Attribute()
+			{
+			}
+		}
+		
+		public partial class Drawable
+		{
+			
+			// aapt resource value: 0x7f020000
+			public const int Icon = 2130837504;
+			
+			// aapt resource value: 0x7f020001
+			public const int Splash = 2130837505;
+			
+			private Drawable()
+			{
+			}
+		}
+		
+		public partial class Id
+		{
+			
+			// aapt resource value: 0x7f060000
+			public const int myButton = 2131099648;
+			
+			private Id()
+			{
+			}
+		}
+		
+		public partial class Layout
+		{
+			
+			// aapt resource value: 0x7f030000
+			public const int Main = 2130903040;
+			
+			private Layout()
+			{
+			}
+		}
+		
+		public partial class String
+		{
+			
+			// aapt resource value: 0x7f040001
+			public const int app_name = 2130968577;
+			
+			// aapt resource value: 0x7f040000
+			public const int hello = 2130968576;
+			
+			private String()
+			{
+			}
+		}
+		
+		public partial class Style
+		{
+			
+			// aapt resource value: 0x7f050000
+			public const int Theme_Splash = 2131034112;
+			
+			private Style()
+			{
+			}
+		}
+	}
+}

BIN
Samples/Android/MonoGame.Samples.Input/Resources/drawable/Icon.png


BIN
Samples/Android/MonoGame.Samples.Input/Resources/drawable/Splash.png


+ 14 - 0
Samples/Android/MonoGame.Samples.Input/Resources/layout/Main.axml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    >
+<Button  
+    android:id="@+id/myButton"
+    android:layout_width="fill_parent" 
+    android:layout_height="wrap_content" 
+    android:text="@string/hello"
+    />
+</LinearLayout>
+

+ 5 - 0
Samples/Android/MonoGame.Samples.Input/Resources/values/Strings.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+	<string name="hello">Hello World, Click Me!</string>
+	<string name="app_name">MonoGame.Samples.Input</string>
+</resources>

+ 7 - 0
Samples/Android/MonoGame.Samples.Input/Resources/values/Styles.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+  <style name="Theme.Splash" parent="android:Theme">
+    <item name="android:windowBackground">@drawable/splash</item>
+    <item name="android:windowNoTitle">true</item>
+  </style>
+</resources>

+ 1 - 2
Samples/Android/Peer2Peer/MonoGame.Samples.Peer2Peer.Android.csproj

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?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>
@@ -16,7 +16,6 @@
     <AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
     <AndroidSupportedAbis>armeabi</AndroidSupportedAbis>
     <AndroidStoreUncompressedFileExtensions />
-    <TargetFrameworkVersion>v2.2</TargetFrameworkVersion>
     <MandroidI18n />
     <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
   </PropertyGroup>

+ 1 - 1
Samples/Android/Peer2Peer/Resources/Resource.Designer.cs

@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.235
+//     Runtime Version:4.0.30319.239
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.

+ 1 - 1
Samples/Android/RenderTarget2D/Resources/Resource.designer.cs

@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.237
+//     Runtime Version:4.0.30319.239
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.

+ 2 - 3
Samples/Android/Sound/Sound.csproj

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?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>
@@ -24,7 +24,6 @@
     <DefineConstants>TRACE;DEBUG;ANDROID</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
     <AndroidLinkMode>None</AndroidLinkMode>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -34,7 +33,7 @@
     <DefineConstants>TRACE;ANDROID</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
+    <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
     <AndroidLinkMode>SdkOnly</AndroidLinkMode>
   </PropertyGroup>
   <ItemGroup>

+ 17 - 4
Samples/MacOS/RenderTarget2DSample/Game1.cs

@@ -95,11 +95,13 @@ namespace RenderTarget2DSample
 			renderTarget = new RenderTarget2D (GraphicsDevice, GraphicsDevice.PresentationParameters.BackBufferWidth,
 				GraphicsDevice.PresentationParameters.BackBufferHeight, false, SurfaceFormat.Color, DepthFormat.None);
             
+			// Load in our wood tile.
+			wood = Content.Load<Texture2D> ("lava");
+			
 			// Load in the picture of Seamus.
 			mooTheMerciless = Content.Load<Texture2D> ("MooTheMerciless");
 
-			// Load in our wood tile.
-			wood = Content.Load<Texture2D> ("wood");
+			
 		}
 
 		/// <summary>
@@ -154,13 +156,14 @@ namespace RenderTarget2DSample
 		{
 			
 			// A one time only flag to help test for memory leaks
+			
 			if (oneTimeOnly) 
 			{				
 				oneTimeOnly = false;
 
 				// Set renderTarget as the surface to draw to instead of the back buffer
 				GraphicsDevice.SetRenderTarget (renderTarget);
-
+			 
 				// Clear the renderTarget. By default it's all a bright purple color. I like to use Color.Transparent to
 				// enable easy alpha blending.
 				GraphicsDevice.Clear (Color.Transparent);
@@ -219,9 +222,11 @@ namespace RenderTarget2DSample
 
 				// End the spriteBatch draw.
 				spriteBatch.End ();
-
+				 								
 				// Switch back to drawing onto the back buffer
 				GraphicsDevice.SetRenderTarget (null);
+				
+				//GrabScreenshot(renderTarget);
 			}
 			// Now that we're back to drawing onto the back buffer, we want to clear it. If we had done so earlier
 			// then when we switched to drawing to the render target, the old back buffer would've just be filled with
@@ -259,5 +264,13 @@ namespace RenderTarget2DSample
 
 			base.Draw (gameTime);
 		}
+		
+		public static void GrabScreenshot(RenderTarget2D rendertarget)
+        {
+			Color[] data = new Color[(rendertarget.Width * rendertarget.Height) * 3];
+            //OpenTK.Graphics.ES11.GL.ReadPixels(0, 0, rendertarget.Width, rendertarget.Height, OpenTK.Graphics.ES11.All.Rgb, OpenTK.Graphics.ES11.All.UnsignedByte, ref data);            
+			rendertarget.GetData<Color>(data);
+        }
+
 	}
 }

+ 107 - 107
Samples/MacOS/VideoPlayer/Game1.cs

@@ -1,107 +1,107 @@
-using System;
-using System.Collections.Generic;
-
-#if ANDROID
-using Android.App;
-#endif
-
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Content;
-using Microsoft.Xna.Framework.Graphics;
-using Microsoft.Xna.Framework.Input;
-using Microsoft.Xna.Framework.Media;
-using Microsoft.Xna.Framework.Storage;
-
-namespace MonoGame.Samples.VideoPlayer
-{
-	/// <summary>
-	/// This is the main type for your game
-	/// </summary>
-	public class Game1 : Microsoft.Xna.Framework.Game
-	{
-		GraphicsDeviceManager graphics;
-		SpriteBatch spriteBatch;		
-		
-		SpriteFont font;
-		
-		Video video;
-		Microsoft.Xna.Framework.Media.VideoPlayer videoPlayer;
-		bool playVideo = false;
-		
-        public Game1 ()  
-		{
-			graphics = new GraphicsDeviceManager (this);
-			
-			Content.RootDirectory = "Content";
-			
-			graphics.PreferMultiSampling = true;
-			graphics.IsFullScreen = true;	
-
-			graphics.SupportedOrientations = DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight;
-		}
-		
-		/// <summary>
-		/// Allows the game to perform any initialization it needs to before starting to run.
-		/// This is where it can query for any required services and load any non-graphic
-		/// related content.  Calling base.Initialize will enumerate through any components
-		/// and initialize them as well.
-		/// </summary>
-		protected override void Initialize ()
-		{
-			// TODO: Add your initialization logic here
-
-			base.Initialize ();
-		}
-
-		/// <summary>
-		/// LoadContent will be called once per game and is the place to load
-		/// all of your content.
-		/// </summary>
-		protected override void LoadContent ()
-		{
-			// Create a new SpriteBatch, which can be used to draw textures.
-			spriteBatch = new SpriteBatch (GraphicsDevice);
-
-			// TODO: use this.Content to load your game content here
-			font = Content.Load<SpriteFont> ("spriteFont1");
-			
-			video = Content.Load<Video> ("sintel_trailer");
-			videoPlayer = new Microsoft.Xna.Framework.Media.VideoPlayer(this);
-			playVideo = true;
-		}
-
-		/// <summary>
-		/// Allows the game to run logic such as updating the world,
-		/// checking for collisions, gathering input, and playing audio.
-		/// </summary>
-		/// <param name="gameTime">Provides a snapshot of timing values.</param>
-		protected override void Update (GameTime gameTime)
-		{
-			// TODO: Add your update logic here
-			if (playVideo)
-			{
-				if (videoPlayer.State == MediaState.Stopped) 
-				{
-					videoPlayer.Play(video);
-					playVideo = false;
-				}
-			}
-
-			base.Update (gameTime);
-		}
-
-		/// <summary>
-		/// This is called when the game should draw itself.
-		/// </summary>
-		/// <param name="gameTime">Provides a snapshot of timing values.</param>
-		protected override void Draw (GameTime gameTime)
-		{
-			graphics.GraphicsDevice.Clear (Color.CornflowerBlue);
-			
-			// Won't be visible until we hide the movie
-			spriteBatch.Begin();
-			spriteBatch.DrawString(font, "Video has ended, let the Game BEGIN!!", new Vector2 (50, 40), Color.Red);
-			spriteBatch.End();
-		}
-	}
-}
+using System;
+using System.Collections.Generic;
+
+#if ANDROID
+using Android.App;
+#endif
+
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+using Microsoft.Xna.Framework.Media;
+using Microsoft.Xna.Framework.Storage;
+
+namespace MonoGame.Samples.VideoPlayer
+{
+	/// <summary>
+	/// This is the main type for your game
+	/// </summary>
+	public class Game1 : Microsoft.Xna.Framework.Game
+	{
+		GraphicsDeviceManager graphics;
+		SpriteBatch spriteBatch;		
+		
+		SpriteFont font;
+		
+		Video video;
+		Microsoft.Xna.Framework.Media.VideoPlayer videoPlayer;
+		bool playVideo = false;
+		
+        public Game1 ()  
+		{
+			graphics = new GraphicsDeviceManager (this);
+			
+			Content.RootDirectory = "Content";
+			
+			graphics.PreferMultiSampling = true;
+			graphics.IsFullScreen = true;	
+
+			graphics.SupportedOrientations = DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight;
+		}
+		
+		/// <summary>
+		/// Allows the game to perform any initialization it needs to before starting to run.
+		/// This is where it can query for any required services and load any non-graphic
+		/// related content.  Calling base.Initialize will enumerate through any components
+		/// and initialize them as well.
+		/// </summary>
+		protected override void Initialize ()
+		{
+			// TODO: Add your initialization logic here
+
+			base.Initialize ();
+		}
+
+		/// <summary>
+		/// LoadContent will be called once per game and is the place to load
+		/// all of your content.
+		/// </summary>
+		protected override void LoadContent ()
+		{
+			// Create a new SpriteBatch, which can be used to draw textures.
+			spriteBatch = new SpriteBatch (GraphicsDevice);
+
+			// TODO: use this.Content to load your game content here
+			font = Content.Load<SpriteFont> ("spriteFont1");
+			
+			video = Content.Load<Video> ("sintel_trailer");
+			videoPlayer = new Microsoft.Xna.Framework.Media.VideoPlayer(this);
+			playVideo = true;
+		}
+
+		/// <summary>
+		/// Allows the game to run logic such as updating the world,
+		/// checking for collisions, gathering input, and playing audio.
+		/// </summary>
+		/// <param name="gameTime">Provides a snapshot of timing values.</param>
+		protected override void Update (GameTime gameTime)
+		{
+			// TODO: Add your update logic here
+			if (playVideo)
+			{
+				if (videoPlayer.State == MediaState.Stopped) 
+				{
+					videoPlayer.Play(video);
+					playVideo = false;
+				}
+			}
+
+			base.Update (gameTime);
+		}
+
+		/// <summary>
+		/// This is called when the game should draw itself.
+		/// </summary>
+		/// <param name="gameTime">Provides a snapshot of timing values.</param>
+		protected override void Draw (GameTime gameTime)
+		{
+			graphics.GraphicsDevice.Clear (Color.CornflowerBlue);
+			
+			// Won't be visible until we hide the movie
+			spriteBatch.Begin();
+			spriteBatch.DrawString(font, "Video has ended, let the Game BEGIN!!", new Vector2 (50, 40), Color.Red);
+			spriteBatch.End();
+		}
+	}
+}

+ 7 - 1
Samples/MonoGame.Samples.Android.sln

@@ -17,6 +17,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sound", "Android\Sound\Soun
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Samples.VideoPlayer", "Android\VideoPlayer\MonoGame.Samples.VideoPlayer.csproj", "{27C3DD7C-5322-4C2D-8EE4-07610390CDAF}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Samples.Input", "Android\MonoGame.Samples.Input\MonoGame.Samples.Input.csproj", "{CB2084E4-BEC8-4318-8011-93CC2E3C9E94}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -43,6 +45,10 @@ Global
 		{BA9476CF-99BA-4D03-92F2-73D2C5E58883}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{BA9476CF-99BA-4D03-92F2-73D2C5E58883}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{BA9476CF-99BA-4D03-92F2-73D2C5E58883}.Release|Any CPU.Build.0 = Release|Any CPU
+		{CB2084E4-BEC8-4318-8011-93CC2E3C9E94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{CB2084E4-BEC8-4318-8011-93CC2E3C9E94}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{CB2084E4-BEC8-4318-8011-93CC2E3C9E94}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{CB2084E4-BEC8-4318-8011-93CC2E3C9E94}.Release|Any CPU.Build.0 = Release|Any CPU
 		{DEDD20B5-8F83-46FD-AD05-8F8FCC49FCD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{DEDD20B5-8F83-46FD-AD05-8F8FCC49FCD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{DEDD20B5-8F83-46FD-AD05-8F8FCC49FCD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -59,7 +65,7 @@ Global
 		{E2B6ED3C-A769-47AF-9605-A7410F194B1C}.Release|Any CPU.Deploy.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(MonoDevelopProperties) = preSolution
-		StartupItem = ..\..\MonoGame\ThirdParty\Lidgren.Network\Lidgren.Network.Android.csproj
+		StartupItem = Android\MonoGame.Samples.Input\MonoGame.Samples.Input.csproj
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE