Commits

Anonymous committed ae04a9e

initial commit

  • Participants

Comments (0)

Files changed (22)

File android-lobster-csharp/Activity1.cs

+using System;
+
+using Android.App;
+using Android.Content;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+using Android.OS;
+
+namespace androidlobstercsharp
+{
+	[Activity (Label = "android-lobster-csharp", MainLauncher = true)]
+	public class Activity1 : Activity
+	{
+		GLView1 view;
+
+		protected override void OnCreate (Bundle bundle)
+		{
+			base.OnCreate (bundle);
+
+			// Create our OpenGL view, and display it
+			view = new GLView1 (this);
+			SetContentView (view);
+		}
+
+		protected override void OnPause ()
+		{
+			base.OnPause ();
+			view.Pause ();
+		}
+
+		protected override void OnResume ()
+		{
+			base.OnResume ();
+			view.Resume ();
+		}
+	}
+}
+
+

File android-lobster-csharp/Assets/AboutAssets.txt

+Any raw assets you want to be deployed with your application can be placed in
+this directory (and child directories) and given a Build Action of "AndroidAsset".
+
+These files will be deployed with you package and will be accessible using Android's
+AssetManager, like this:
+
+public class ReadAsset : Activity
+{
+	protected override void OnCreate (Bundle bundle)
+	{
+		base.OnCreate (bundle);
+
+		InputStream input = Assets.Open ("my_asset.txt");
+	}
+}
+
+Additionally, some Android functions will automatically load asset files:
+
+Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");

File android-lobster-csharp/GLView1.cs

+using System;
+
+using OpenTK;
+using OpenTK.Graphics;
+using OpenTK.Graphics.ES11;
+using OpenTK.Platform;
+using OpenTK.Platform.Android;
+
+using Android.Views;
+using Android.Content;
+
+namespace androidlobstercsharp
+{
+	class GLView1 : AndroidGameView
+	{
+		public GLView1 (Context context) : base (context)
+		{
+		}
+
+		// This gets called when the drawing surface is ready
+		protected override void OnLoad (EventArgs e)
+		{
+			base.OnLoad (e);
+
+			// Run the render loop
+			Run ();
+		}
+
+		// This gets called on each frame render
+		protected override void OnRenderFrame (FrameEventArgs e)
+		{
+			base.OnRenderFrame (e);
+
+			GL.MatrixMode (All.Projection);
+			GL.LoadIdentity ();
+			GL.Ortho (-1.0f, 1.0f, -1.5f, 1.5f, -1.0f, 1.0f);
+			GL.MatrixMode (All.Modelview);
+			GL.Rotate (3.0f, 0.0f, 0.0f, 1.0f);
+
+			GL.ClearColor (0.5f, 0.5f, 0.5f, 1.0f);
+			GL.Clear ((uint)All.ColorBufferBit);
+
+			GL.VertexPointer (2, All.Float, 0, square_vertices);
+			GL.EnableClientState (All.VertexArray);
+			GL.ColorPointer (4, All.UnsignedByte, 0, square_colors);
+			GL.EnableClientState (All.ColorArray);
+
+			GL.DrawArrays (All.TriangleStrip, 0, 4);
+
+			SwapBuffers ();
+		}
+
+		float[] square_vertices = {
+			-0.5f, -0.5f,
+			0.5f, -0.5f,
+			-0.5f, 0.5f, 
+			0.5f, 0.5f,
+		};
+		byte[] square_colors = {
+			255, 255,   0, 255,
+			0,   255, 255, 255,
+			0,     0,    0,  0,
+			255,   0,  255, 255,
+		};
+	}
+}
+

File android-lobster-csharp/Properties/AssemblyInfo.cs

+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("android-lobster-csharp")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("stopiccot")]
+[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.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("")]
+

File android-lobster-csharp/Resources/AboutResources.txt

+Images, layout descriptions, binary blobs and string dictionaries can be included 
+in your application as resource files.  Various Android APIs are designed to 
+operate on the resource IDs instead of dealing with images, strings or binary blobs 
+directly.
+
+For example, a sample Android app that contains a user interface layout (main.axml),
+an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 
+would keep its resources in the "Resources" directory of the application:
+
+Resources/
+    drawable/
+        icon.png
+
+    layout/
+        main.axml
+
+    values/
+        strings.xml
+
+In order to get the build system to recognize Android resources, set the build action to
+"AndroidResource".  The native Android APIs do not operate directly with filenames, but 
+instead operate on resource IDs.  When you compile an Android application that uses resources, 
+the build system will package the resources for distribution and generate a class called "R" 
+(this is an Android convention) that contains the tokens for each one of the resources 
+included. For example, for the above Resources layout, this is what the R class would expose:
+
+public class R {
+    public class drawable {
+        public const int icon = 0x123;
+    }
+
+    public class layout {
+        public const int main = 0x456;
+    }
+
+    public class strings {
+        public const int first_string = 0xabc;
+        public const int second_string = 0xbcd;
+    }
+}
+
+You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main 
+to reference the layout/main.axml file, or R.strings.first_string to reference the first 
+string in the dictionary file values/strings.xml.

File android-lobster-csharp/Resources/Resource.designer.cs

+// ------------------------------------------------------------------------------
+//  <autogenerated>
+//      This code was generated by a tool.
+//      Mono Runtime Version: 4.0.30319.1
+// 
+//      Changes to this file may cause incorrect behavior and will be lost if 
+//      the code is regenerated.
+//  </autogenerated>
+// ------------------------------------------------------------------------------
+
+namespace androidlobstercsharp
+{
+	
+	
+	public partial class Resource
+	{
+		
+		public partial class Attribute
+		{
+			
+			private Attribute()
+			{
+			}
+		}
+		
+		public partial class Drawable
+		{
+			
+			// aapt resource value: 0x7f020000
+			public const int Icon = 2130837504;
+			
+			private Drawable()
+			{
+			}
+		}
+		
+		public partial class Layout
+		{
+			
+			// aapt resource value: 0x7f030000
+			public const int Main = 2130903040;
+			
+			private Layout()
+			{
+			}
+		}
+		
+		public partial class String
+		{
+			
+			// aapt resource value: 0x7f040000
+			public const int app_name = 2130968576;
+			
+			private String()
+			{
+			}
+		}
+	}
+}

File android-lobster-csharp/Resources/drawable/Icon.png

Added
New image

File android-lobster-csharp/Resources/layout/Main.axml

+<?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"
+    >
+</LinearLayout>
+

File android-lobster-csharp/Resources/values/Strings.xml

+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+	<string name="app_name">android-lobster-csharp</string>
+</resources>

File android-lobster-csharp/android-lobster-csharp.csproj

+<?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>{C1AB3A6A-2879-4A16-8A86-EE18DCBF7CC9}</ProjectGuid>
+    <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <OutputType>Library</OutputType>
+    <RootNamespace>androidlobstercsharp</RootNamespace>
+    <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
+    <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
+    <AndroidResgenClass>Resource</AndroidResgenClass>
+    <AndroidApplication>True</AndroidApplication>
+    <AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
+    <AssemblyName>android-lobster-csharp</AssemblyName>
+    <TargetFrameworkVersion>v2.3</TargetFrameworkVersion>
+  </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>
+    <ConsolePause>false</ConsolePause>
+    <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
+    <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="GLView1.cs" />
+    <Compile Include="Resources\Resource.designer.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\AboutResources.txt" />
+    <None Include="Assets\AboutAssets.txt" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidResource Include="Resources\layout\Main.axml" />
+    <AndroidResource Include="Resources\values\Strings.xml" />
+    <AndroidResource Include="Resources\drawable\Icon.png" />
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
+</Project>

File code/Application.cs

+using System;
+
+using OpenTK;
+using OpenTK.Graphics.ES20;
+using GL1 = OpenTK.Graphics.ES11.GL;
+using All1 = OpenTK.Graphics.ES11.All;
+
+namespace Lobster
+{
+	public class Application
+	{
+		public Application()
+		{
+			
+		}
+		
+		public bool Init()
+		{
+			return true;
+		}
+		
+		public void Timer(float time, float delta)
+		{
+			//...
+		}
+		
+		static float[] squareVertices = {
+			-0.5f, -0.33f,
+			0.5f, -0.33f,
+			-0.5f,  0.33f,
+			0.5f,  0.33f,
+		};
+		
+		static byte[] squareColors = {
+			255, 255,   0, 255,
+			0,   255, 255, 255,
+			0,     0,   0,   0,
+			255,   0, 255, 255,
+		};
+		
+		static float transY = 0.0f;
+		
+		public void Render()
+		{
+			GL.ClearColor(0.5f, 0.5f, 0.5f, 1.0f);
+			GL.Clear((int)All.ColorBufferBit);
+			
+			GL1.MatrixMode(All1.Projection);
+			GL1.LoadIdentity();
+			GL1.MatrixMode(All1.Modelview);
+			GL1.LoadIdentity ();
+			GL1.Translate(0.0f, (float)Math.Sin(transY) / 2.0f, 0.0f);
+			transY += 0.075f;
+				
+			GL1.VertexPointer(2, All1.Float, 0, squareVertices);
+			GL1.EnableClientState(All1.VertexArray);
+			GL1.ColorPointer(4, All1.UnsignedByte, 0, squareColors);
+			GL1.EnableClientState(All1.ColorArray);
+			
+			GL.DrawArrays(All.TriangleStrip, 0, 4);
+		}
+	}
+}
+

File iphone-lobster-csharp/AppDelegate.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+
+namespace iphonelobstercsharp
+{
+	/// <summary>
+	/// The UIApplicationDelegate for the application. This class is responsible for launching the 
+	/// User Interface of the application, as well as listening (and optionally responding) to 
+	/// application events from iOS.
+	/// </summary>
+	[Register ("AppDelegate")]
+	public partial class AppDelegate : UIApplicationDelegate
+	{
+		// class-level declarations
+		UIWindow window;
+		OpenGLViewController viewController;
+		
+		// This method is invoked when the application has loaded its UI and is ready to run
+		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
+		{
+			// create a new window instance based on the screen size
+			window = new UIWindow (UIScreen.MainScreen.Bounds);
+
+			// load the appropriate UI, depending on whether the app is running on an iPhone or iPad
+			if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone) {
+				viewController = new OpenGLViewController ("OpenGLViewController_iPhone", null);
+			} else {
+				viewController = new OpenGLViewController ("OpenGLViewController_iPad", null);
+			}
+			window.RootViewController = viewController;
+
+			// make the window visible
+			window.MakeKeyAndVisible ();
+			
+			return true;
+		}
+	}
+}

File iphone-lobster-csharp/EAGLView.cs

+using System;
+
+using OpenTK;
+using OpenTK.Graphics.ES20;
+using GL1 = OpenTK.Graphics.ES11.GL;
+using All1 = OpenTK.Graphics.ES11.All;
+using OpenTK.Platform.iPhoneOS;
+
+using MonoTouch.Foundation;
+using MonoTouch.CoreAnimation;
+using MonoTouch.ObjCRuntime;
+using MonoTouch.OpenGLES;
+using MonoTouch.UIKit;
+
+namespace iphonelobstercsharp
+{
+	[Register ("EAGLView")]
+	public class EAGLView : iPhoneOSGameView
+	{
+		private Lobster.Application lobsterApplication = null;
+		
+		[Export("initWithCoder:")]
+		public EAGLView (NSCoder coder) : base (coder)
+		{
+			LayerRetainsBacking = true;
+			LayerColorFormat = EAGLColorFormat.RGBA8;
+		}
+		
+		[Export ("layerClass")]
+		public static new Class GetLayerClass ()
+		{
+			return iPhoneOSGameView.GetLayerClass ();
+		}
+		
+		protected override void ConfigureLayer (CAEAGLLayer eaglLayer)
+		{
+			eaglLayer.Opaque = true;
+		}
+		
+		protected override void CreateFrameBuffer ()
+		{
+			//try {
+			//	ContextRenderingApi = EAGLRenderingAPI.OpenGLES2;
+			//	base.CreateFrameBuffer ();
+			//} catch (Exception) {
+				ContextRenderingApi = EAGLRenderingAPI.OpenGLES1;
+				base.CreateFrameBuffer ();
+			//}
+			
+			if (ContextRenderingApi == EAGLRenderingAPI.OpenGLES2)
+				LoadShaders ();
+			
+			lobsterApplication = new Lobster.Application();
+			lobsterApplication.Init();
+		}
+		
+		protected override void DestroyFrameBuffer ()
+		{
+			base.DestroyFrameBuffer ();
+			DestroyShaders ();
+		}
+		
+		#region DisplayLink support
+		
+		int frameInterval;
+		CADisplayLink displayLink;
+		
+		public bool IsAnimating { get; private set; }
+		
+		// How many display frames must pass between each time the display link fires.
+		public int FrameInterval {
+			get {
+				return frameInterval;
+			}
+			set {
+				if (value <= 0)
+					throw new ArgumentException ();
+				frameInterval = value;
+				if (IsAnimating) {
+					StopAnimating ();
+					StartAnimating ();
+				}
+			}
+		}
+		
+		public void StartAnimating ()
+		{
+			if (IsAnimating)
+				return;
+			
+			CreateFrameBuffer ();
+			CADisplayLink displayLink = UIScreen.MainScreen.CreateDisplayLink (this, new Selector ("drawFrame"));
+			displayLink.FrameInterval = frameInterval;
+			displayLink.AddToRunLoop (NSRunLoop.Current, NSRunLoop.NSDefaultRunLoopMode);
+			this.displayLink = displayLink;
+			
+			IsAnimating = true;
+		}
+		
+		public void StopAnimating ()
+		{
+			if (!IsAnimating)
+				return;
+			displayLink.Invalidate ();
+			displayLink = null;
+			DestroyFrameBuffer ();
+			IsAnimating = false;
+		}
+		
+		[Export ("drawFrame")]
+		void DrawFrame ()
+		{
+			OnRenderFrame (new FrameEventArgs ());
+		}
+		
+		#endregion
+		
+		static float[] squareVertices = {
+			-0.5f, -0.33f,
+			0.5f, -0.33f,
+			-0.5f,  0.33f,
+			0.5f,  0.33f,
+		};
+		static byte[] squareColors = {
+			255, 255,   0, 255,
+			0,   255, 255, 255,
+			0,     0,   0,   0,
+			255,   0, 255, 255,
+		};
+		static float transY = 0.0f;
+		const int UNIFORM_TRANSLATE = 0;
+		const int UNIFORM_COUNT = 1;
+		int[] uniforms = new int [UNIFORM_COUNT];
+		const int ATTRIB_VERTEX = 0;
+		const int ATTRIB_COLOR = 1;
+		const int ATTRIB_COUNT = 2;
+		int program;
+		
+		protected override void OnRenderFrame(FrameEventArgs e)
+		{
+			base.OnRenderFrame (e);
+			
+			MakeCurrent ();
+			
+			GL.ClearColor(1.0f, 0.0f, 0.0f, 1.0f);
+			GL.Clear((int)All.ColorBufferBit);
+			
+			lobsterApplication.Render();
+			
+			SwapBuffers();
+			
+			return;
+			
+			// Replace the implementation of this method to do your own custom drawing.
+			GL.ClearColor (0.5f, 0.5f, 0.5f, 1.0f);
+			GL.Clear ((int)All.ColorBufferBit);
+			
+			if (ContextRenderingApi == EAGLRenderingAPI.OpenGLES2) {
+				// Use shader program.
+				GL.UseProgram (program);
+				
+				// Update uniform value.
+				GL.Uniform1 (uniforms [UNIFORM_TRANSLATE], transY);
+				transY += 0.075f;
+				
+				// Update attribute values.
+				GL.VertexAttribPointer (ATTRIB_VERTEX, 2, All.Float, false, 0, squareVertices);
+				GL.EnableVertexAttribArray (ATTRIB_VERTEX);
+				GL.VertexAttribPointer (ATTRIB_COLOR, 4, All.UnsignedByte, true, 0, squareColors);
+				GL.EnableVertexAttribArray (ATTRIB_COLOR);
+				
+				// Validate program before drawing. This is a good check, but only really necessary in a debug build.
+#if DEBUG
+				if (!ValidateProgram (program)) {
+					Console.WriteLine ("Failed to validate program {0:x}", program);
+					return;
+				}
+#endif
+			} else {
+				GL1.MatrixMode (All1.Projection);
+				GL1.LoadIdentity ();
+				GL1.MatrixMode (All1.Modelview);
+				GL1.LoadIdentity ();
+				GL1.Translate (0.0f, (float)Math.Sin (transY) / 2.0f, 0.0f);
+				transY += 0.075f;
+				
+				GL1.VertexPointer (2, All1.Float, 0, squareVertices);
+				GL1.EnableClientState (All1.VertexArray);
+				GL1.ColorPointer (4, All1.UnsignedByte, 0, squareColors);
+				GL1.EnableClientState (All1.ColorArray);
+			}
+			
+			GL.DrawArrays (All.TriangleStrip, 0, 4);
+			
+			SwapBuffers ();
+		}
+		
+		bool LoadShaders ()
+		{
+			int vertShader, fragShader;
+			
+			// Create shader program.
+			program = GL.CreateProgram ();
+			
+			// Create and compile vertex shader.
+			var vertShaderPathname = NSBundle.MainBundle.PathForResource ("Shader", "vsh");
+			if (!CompileShader (All.VertexShader, vertShaderPathname, out vertShader)) {
+				Console.WriteLine ("Failed to compile vertex shader");
+				return false;
+			}
+			
+			// Create and compile fragment shader.
+			var fragShaderPathname = NSBundle.MainBundle.PathForResource ("Shader", "fsh");
+			if (!CompileShader (All.FragmentShader, fragShaderPathname, out fragShader)) {
+				Console.WriteLine ("Failed to compile fragment shader");
+				return false;
+			}
+			
+			// Attach vertex shader to program.
+			GL.AttachShader (program, vertShader);
+			
+			// Attach fragment shader to program.
+			GL.AttachShader (program, fragShader);
+			
+			// Bind attribute locations.
+			// This needs to be done prior to linking.
+			GL.BindAttribLocation (program, ATTRIB_VERTEX, "position");
+			GL.BindAttribLocation (program, ATTRIB_COLOR, "color");
+			
+			// Link program.
+			if (!LinkProgram (program)) {
+				Console.WriteLine ("Failed to link program: {0:x}", program);
+				
+				if (vertShader != 0)
+					GL.DeleteShader (vertShader);
+				
+				if (fragShader != 0)
+					GL.DeleteShader (fragShader);
+				
+				if (program != 0) {
+					GL.DeleteProgram (program);
+					program = 0;
+				}
+				return false;
+			}
+			
+			// Get uniform locations.
+			uniforms [UNIFORM_TRANSLATE] = GL.GetUniformLocation (program, "translate");
+			
+			// Release vertex and fragment shaders.
+			if (vertShader != 0) {
+				GL.DetachShader (program, vertShader);
+				GL.DeleteShader (vertShader);
+			}
+				
+			if (fragShader != 0) {
+				GL.DetachShader (program, fragShader);
+				GL.DeleteShader (fragShader);
+			}
+			
+			return true;
+		}
+		
+		void DestroyShaders ()
+		{
+			if (program != 0) {
+				GL.DeleteProgram (program);
+				program = 0;
+			}
+		}
+		
+		#region Shader utilities
+		
+		static bool CompileShader (All type, string file, out int shader)
+		{
+			string src = System.IO.File.ReadAllText (file);
+			shader = GL.CreateShader (type);
+			GL.ShaderSource (shader, 1, new string[] { src }, (int[])null);
+			GL.CompileShader (shader);
+			
+#if DEBUG
+			int logLength = 0;
+			GL.GetShader (shader, All.InfoLogLength, ref logLength);
+			if (logLength > 0) {
+				var infoLog = new System.Text.StringBuilder ();
+				GL.GetShaderInfoLog (shader, logLength, ref logLength, infoLog);
+				Console.WriteLine ("Shader compile log:\n{0}", infoLog);
+			}
+#endif
+			int status = 0;
+			GL.GetShader (shader, All.CompileStatus, ref status);
+			if (status == 0) {
+				GL.DeleteShader (shader);
+				return false;
+			}
+			
+			return true;
+		}
+		
+		static bool LinkProgram (int prog)
+		{
+			GL.LinkProgram (prog);
+			
+#if DEBUG
+			int logLength = 0;
+			GL.GetProgram (prog, All.InfoLogLength, ref logLength);
+			if (logLength > 0) {
+				var infoLog = new System.Text.StringBuilder ();
+				GL.GetProgramInfoLog (prog, logLength, ref logLength, infoLog);
+				Console.WriteLine ("Program link log:\n{0}", infoLog);
+			}
+#endif
+			int status = 0;
+			GL.GetProgram (prog, All.LinkStatus, ref status);
+			if (status == 0)
+				return false;
+			
+			return true;
+		}
+		
+		static bool ValidateProgram (int prog)
+		{
+			GL.ValidateProgram (prog);
+			
+			int logLength = 0;
+			GL.GetProgram (prog, All.InfoLogLength, ref logLength);
+			if (logLength > 0) {
+				var infoLog = new System.Text.StringBuilder ();
+				GL.GetProgramInfoLog (prog, logLength, ref logLength, infoLog);
+				Console.WriteLine ("Program validate log:\n{0}", infoLog);
+			}
+			
+			int status = 0;
+			GL.GetProgram (prog, All.LinkStatus, ref status);
+			if (status == 0)
+				return false;
+			
+			return true;
+		}
+		
+		#endregion
+	}
+}

File iphone-lobster-csharp/Info.plist

+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>UIDeviceFamily</key>
+	<array>
+		<integer>1</integer>
+		<integer>2</integer>
+	</array>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+</dict>
+</plist>

File iphone-lobster-csharp/Main.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+
+namespace iphonelobstercsharp
+{
+	public class Application
+	{
+		// This is the main entry point of the application.
+		static void Main (string[] args)
+		{
+			// if you want to use a different Application Delegate class from "AppDelegate"
+			// you can specify it here.
+			UIApplication.Main (args, null, "AppDelegate");
+		}
+	}
+}

File iphone-lobster-csharp/OpenGLViewController.cs

+using System;
+
+using OpenTK;
+using OpenTK.Graphics.ES20;
+using OpenTK.Platform.iPhoneOS;
+
+using MonoTouch.Foundation;
+using MonoTouch.CoreAnimation;
+using MonoTouch.ObjCRuntime;
+using MonoTouch.OpenGLES;
+using MonoTouch.UIKit;
+
+namespace iphonelobstercsharp
+{
+	[Register ("OpenGLViewController")]
+	public partial class OpenGLViewController : UIViewController
+	{
+		public OpenGLViewController (string nibName, NSBundle bundle) : base (nibName, bundle)
+		{
+		}
+		
+		new EAGLView View { get { return (EAGLView)base.View; } }
+		
+		public override void ViewDidLoad ()
+		{
+			base.ViewDidLoad ();
+			
+			NSNotificationCenter.DefaultCenter.AddObserver (UIApplication.WillResignActiveNotification, a => {
+				if (IsViewLoaded && View.Window != null)
+					View.StopAnimating ();
+			}, this);
+			NSNotificationCenter.DefaultCenter.AddObserver (UIApplication.DidBecomeActiveNotification, a => {
+				if (IsViewLoaded && View.Window != null)
+					View.StartAnimating ();
+			}, this);
+			NSNotificationCenter.DefaultCenter.AddObserver (UIApplication.WillTerminateNotification, a => {
+				if (IsViewLoaded && View.Window != null)
+					View.StopAnimating ();
+			}, this);
+		}
+		
+		protected override void Dispose (bool disposing)
+		{
+			base.Dispose (disposing);
+			
+			NSNotificationCenter.DefaultCenter.RemoveObserver (this);
+		}
+		
+		public override void DidReceiveMemoryWarning ()
+		{
+			// Releases the view if it doesn't have a superview.
+			base.DidReceiveMemoryWarning ();
+			
+			// Release any cached data, images, etc that aren't in use.
+		}
+		
+		public override void ViewWillAppear (bool animated)
+		{
+			base.ViewWillAppear (animated);
+			View.StartAnimating ();
+		}
+		
+		public override void ViewWillDisappear (bool animated)
+		{
+			base.ViewWillDisappear (animated);
+			View.StopAnimating ();
+		}
+		
+		public override void ViewDidUnload ()
+		{
+			base.ViewDidUnload ();
+		}
+	}
+}

File iphone-lobster-csharp/OpenGLViewController_iPad.xib

+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="7.10">
+	<data>
+		<int key="IBDocument.SystemTarget">1056</int>
+		<string key="IBDocument.SystemVersion">10H574</string>
+		<string key="IBDocument.InterfaceBuilderVersion">1248</string>
+		<string key="IBDocument.AppKitVersion">1038.35</string>
+		<string key="IBDocument.HIToolboxVersion">461.00</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+			<string key="NS.object.0">106</string>
+		</object>
+		<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<string>IBProxyObject</string>
+			<string>IBUIView</string>
+		</object>
+		<object class="NSArray" key="IBDocument.PluginDependencies">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.Metadata">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="NSArray" key="dict.sortedKeys" id="0">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+			</object>
+			<reference key="dict.values" ref="0"/>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="IBProxyObject" id="372490531">
+				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+			</object>
+			<object class="IBProxyObject" id="975951072">
+				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+			</object>
+			<object class="IBUIView" id="191373211">
+				<reference key="NSNextResponder"/>
+				<int key="NSvFlags">274</int>
+				<string key="NSFrame">{{0, 20}, {768, 1004}}</string>
+				<reference key="NSSuperview"/>
+				<reference key="NSWindow"/>
+				<reference key="NSNextKeyView"/>
+				<object class="NSColor" key="IBUIBackgroundColor">
+					<int key="NSColorSpace">3</int>
+					<bytes key="NSWhite">MQA</bytes>
+					<object class="NSColorSpace" key="NSCustomColorSpace">
+						<int key="NSID">2</int>
+					</object>
+				</object>
+				<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
+					<int key="IBUIStatusBarStyle">2</int>
+				</object>
+				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+			</object>
+		</object>
+		<object class="IBObjectContainer" key="IBDocument.Objects">
+			<object class="NSMutableArray" key="connectionRecords">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">view</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="191373211"/>
+					</object>
+					<int key="connectionID">3</int>
+				</object>
+			</object>
+			<object class="IBMutableOrderedSet" key="objectRecords">
+				<object class="NSArray" key="orderedObjects">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBObjectRecord">
+						<int key="objectID">0</int>
+						<reference key="object" ref="0"/>
+						<reference key="children" ref="1000"/>
+						<nil key="parent"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">1</int>
+						<reference key="object" ref="191373211"/>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-1</int>
+						<reference key="object" ref="372490531"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">File's Owner</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-2</int>
+						<reference key="object" ref="975951072"/>
+						<reference key="parent" ref="0"/>
+					</object>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="flattenedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="NSArray" key="dict.sortedKeys">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>-1.CustomClassName</string>
+					<string>-2.CustomClassName</string>
+					<string>1.CustomClassName</string>
+					<string>1.IBEditorWindowLastContentRect</string>
+					<string>1.IBPluginDependency</string>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>OpenGLIPadViewController</string>
+					<string>UIResponder</string>
+					<string>EAGLView</string>
+					<string>{{514, 109}, {768, 1024}}</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="unlocalizedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0"/>
+				<reference key="dict.values" ref="0"/>
+			</object>
+			<nil key="activeLocalization"/>
+			<object class="NSMutableDictionary" key="localizations">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0"/>
+				<reference key="dict.values" ref="0"/>
+			</object>
+			<nil key="sourceID"/>
+			<int key="maxID">3</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">EAGLView</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./classes-xjh84/EAGLView.h</string>
+					</object>
+				</object>
+			</object>
+		</object>
+		<int key="IBDocument.localizationMode">0</int>
+		<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+			<integer value="3100" key="NS.object.0"/>
+		</object>
+		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+		<nil key="IBDocument.LastKnownRelativeProjectPath"/>
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
+		<string key="IBCocoaTouchPluginVersion">106</string>
+	</data>
+</archive>

File iphone-lobster-csharp/OpenGLViewController_iPhone.xib

+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+	<data>
+		<int key="IBDocument.SystemTarget">1024</int>
+		<string key="IBDocument.SystemVersion">10H574</string>
+		<string key="IBDocument.InterfaceBuilderVersion">1248</string>
+		<string key="IBDocument.AppKitVersion">1038.35</string>
+		<string key="IBDocument.HIToolboxVersion">461.00</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+			<string key="NS.object.0">106</string>
+		</object>
+		<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<string>IBProxyObject</string>
+			<string>IBUIView</string>
+		</object>
+		<object class="NSArray" key="IBDocument.PluginDependencies">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.Metadata">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="NSArray" key="dict.sortedKeys" id="0">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+			</object>
+			<reference key="dict.values" ref="0"/>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="IBProxyObject" id="841351856">
+				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBProxyObject" id="371349661">
+				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBUIView" id="184854543">
+				<reference key="NSNextResponder"/>
+				<int key="NSvFlags">274</int>
+				<string key="NSFrameSize">{320, 460}</string>
+				<reference key="NSSuperview"/>
+				<reference key="NSWindow"/>
+				<reference key="NSNextKeyView"/>
+				<object class="NSColor" key="IBUIBackgroundColor">
+					<int key="NSColorSpace">3</int>
+					<bytes key="NSWhite">MQA</bytes>
+					<object class="NSColorSpace" key="NSCustomColorSpace">
+						<int key="NSID">2</int>
+					</object>
+				</object>
+				<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+		</object>
+		<object class="IBObjectContainer" key="IBDocument.Objects">
+			<object class="NSMutableArray" key="connectionRecords">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">view</string>
+						<reference key="source" ref="841351856"/>
+						<reference key="destination" ref="184854543"/>
+					</object>
+					<int key="connectionID">3</int>
+				</object>
+			</object>
+			<object class="IBMutableOrderedSet" key="objectRecords">
+				<object class="NSArray" key="orderedObjects">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBObjectRecord">
+						<int key="objectID">0</int>
+						<reference key="object" ref="0"/>
+						<reference key="children" ref="1000"/>
+						<nil key="parent"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-1</int>
+						<reference key="object" ref="841351856"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">File's Owner</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-2</int>
+						<reference key="object" ref="371349661"/>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">2</int>
+						<reference key="object" ref="184854543"/>
+						<reference key="parent" ref="0"/>
+					</object>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="flattenedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="NSArray" key="dict.sortedKeys">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>-1.CustomClassName</string>
+					<string>-2.CustomClassName</string>
+					<string>2.CustomClassName</string>
+					<string>2.IBEditorWindowLastContentRect</string>
+					<string>2.IBPluginDependency</string>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>OpenGLIPhoneViewController</string>
+					<string>UIResponder</string>
+					<string>EAGLView</string>
+					<string>{{401, 662}, {320, 460}}</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="unlocalizedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0"/>
+				<reference key="dict.values" ref="0"/>
+			</object>
+			<nil key="activeLocalization"/>
+			<object class="NSMutableDictionary" key="localizations">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0"/>
+				<reference key="dict.values" ref="0"/>
+			</object>
+			<nil key="sourceID"/>
+			<int key="maxID">4</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes"/>
+		<int key="IBDocument.localizationMode">0</int>
+		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+			<integer value="1024" key="NS.object.0"/>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+			<integer value="3100" key="NS.object.0"/>
+		</object>
+		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+		<string key="IBDocument.LastKnownRelativeProjectPath">Untitled.xcodeproj</string>
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
+		<string key="IBCocoaTouchPluginVersion">106</string>
+	</data>
+</archive>

File iphone-lobster-csharp/Shader.fsh

+varying lowp vec4 colorVarying;
+
+void main()
+{
+    gl_FragColor = colorVarying;
+}

File iphone-lobster-csharp/Shader.vsh

+attribute vec4 position;
+attribute vec4 color;
+
+varying vec4 colorVarying;
+
+uniform float translate;
+
+void main()
+{
+    gl_Position = position;
+    gl_Position.y += sin(translate) / 2.0;
+
+    colorVarying = color;
+}

File iphone-lobster-csharp/iphone-lobster-csharp.csproj

+<?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)' == '' ">iPhoneSimulator</Platform>
+    <ProductVersion>10.0.0</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{6980A2BD-3DE0-494A-BBD6-7B24B6288DFF}</ProjectGuid>
+    <ProjectTypeGuids>{6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>iphonelobstercsharp</RootNamespace>
+    <AssemblyName>iphonelobstercsharp</AssemblyName>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
+    <DefineConstants>DEBUG;</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <MtouchDebug>true</MtouchDebug>
+    <MtouchProfiling>true</MtouchProfiling>
+    <MtouchLink>None</MtouchLink>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\iPhoneSimulator\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <MtouchLink>None</MtouchLink>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\iPhone\Debug</OutputPath>
+    <DefineConstants>DEBUG;</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <CodesignKey>iPhone Developer</CodesignKey>
+    <MtouchDebug>true</MtouchDebug>
+    <MtouchProfiling>true</MtouchProfiling>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\iPhone\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <CodesignKey>iPhone Developer</CodesignKey>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Core" />
+    <Reference Include="monotouch" />
+    <Reference Include="OpenTK" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Info.plist" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Main.cs" />
+    <Compile Include="AppDelegate.cs" />
+    <Compile Include="OpenGLViewController.cs" />
+    <Compile Include="EAGLView.cs" />
+    <Compile Include="..\code\Application.cs">
+      <Link>Application.cs</Link>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <InterfaceDefinition Include="OpenGLViewController_iPhone.xib" />
+    <InterfaceDefinition Include="OpenGLViewController_iPad.xib" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Shader.fsh" />
+    <Content Include="Shader.vsh" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+</Project>

File lobster-csharp.sln

+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iphone-lobster-csharp", "iphone-lobster-csharp\iphone-lobster-csharp.csproj", "{6980A2BD-3DE0-494A-BBD6-7B24B6288DFF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "android-lobster-csharp", "android-lobster-csharp\android-lobster-csharp.csproj", "{C1AB3A6A-2879-4A16-8A86-EE18DCBF7CC9}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|iPhoneSimulator = Debug|iPhoneSimulator
+		Release|iPhoneSimulator = Release|iPhoneSimulator
+		Debug|iPhone = Debug|iPhone
+		Release|iPhone = Release|iPhone
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{6980A2BD-3DE0-494A-BBD6-7B24B6288DFF}.Debug|iPhone.ActiveCfg = Debug|iPhone
+		{6980A2BD-3DE0-494A-BBD6-7B24B6288DFF}.Debug|iPhone.Build.0 = Debug|iPhone
+		{6980A2BD-3DE0-494A-BBD6-7B24B6288DFF}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+		{6980A2BD-3DE0-494A-BBD6-7B24B6288DFF}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+		{6980A2BD-3DE0-494A-BBD6-7B24B6288DFF}.Release|iPhone.ActiveCfg = Release|iPhone
+		{6980A2BD-3DE0-494A-BBD6-7B24B6288DFF}.Release|iPhone.Build.0 = Release|iPhone
+		{6980A2BD-3DE0-494A-BBD6-7B24B6288DFF}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+		{6980A2BD-3DE0-494A-BBD6-7B24B6288DFF}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+		{C1AB3A6A-2879-4A16-8A86-EE18DCBF7CC9}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+		{C1AB3A6A-2879-4A16-8A86-EE18DCBF7CC9}.Debug|iPhone.Build.0 = Debug|Any CPU
+		{C1AB3A6A-2879-4A16-8A86-EE18DCBF7CC9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+		{C1AB3A6A-2879-4A16-8A86-EE18DCBF7CC9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+		{C1AB3A6A-2879-4A16-8A86-EE18DCBF7CC9}.Release|iPhone.ActiveCfg = Release|Any CPU
+		{C1AB3A6A-2879-4A16-8A86-EE18DCBF7CC9}.Release|iPhone.Build.0 = Release|Any CPU
+		{C1AB3A6A-2879-4A16-8A86-EE18DCBF7CC9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+		{C1AB3A6A-2879-4A16-8A86-EE18DCBF7CC9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(MonoDevelopProperties) = preSolution
+		StartupItem = iphone-lobster-csharp\iphone-lobster-csharp.csproj
+	EndGlobalSection
+EndGlobal