Commits

Anonymous committed 289e050

windows port work in progress

Comments (0)

Files changed (5)

 windows-lobster-csharp/bin/*
 windows-lobster-csharp/obj/*
 *.suo
+*.user
+windows-lobster-csharp/code/*

code/Application.cs

-using System;
+using System;
 
 using OpenTK;
 using OpenTK.Graphics.ES20;
 		
 		public void Render()
 		{
-			GL.ClearColor(0.5f, 0.5f, 0.5f, 1.0f);
+			GL.ClearColor(1.0f, 0.5f, 0.5f, 1.0f);
+		#if WINDOWS
+			GL.Clear(ClearBufferMask.ColorBufferBit);
+		#else
 			GL.Clear((int)All.ColorBufferBit);
+		#endif
 			
 			GL1.MatrixMode(All1.Projection);
 			GL1.LoadIdentity();
 			GL1.VertexPointer(2, All1.Float, 0, squareVertices);
 			GL1.EnableClientState(All1.VertexArray);
 			GL1.ColorPointer(4, All1.UnsignedByte, 0, squareColors);
-			GL1.EnableClientState(All1.ColorArray);
-			
+			GL1.EnableClientState(All1.ColorArray);
+
+		#if WINDOWS
+			GL.DrawArrays(BeginMode.TriangleStrip, 0, 4);
+		#else
 			GL.DrawArrays(All.TriangleStrip, 0, 4);
+		#endif
 		}
 	}
 }

windows-lobster-csharp/MainForm.cs

 {
     public partial class MainForm : Form
     {
+        private Lobster.Application app = null;
+
         public MainForm()
         {
             InitializeComponent();
         {
             glInitialized = true;
 
+            app = new Lobster.Application();
+
             GL.ClearColor(0.5f, 0.5f, 0.5f, 1.0f);
         }
 
             if (!glInitialized)
                 return;
 
-            GL.Clear(ClearBufferMask.ColorBufferBit);
+            app.Render();
             glControl.SwapBuffers();
         }
     }

windows-lobster-csharp/mklink.bat

+mklink /D code ..\code
+pause

windows-lobster-csharp/windows-lobster-csharp.csproj

     <AssemblyName>windows-lobster-csharp</AssemblyName>
     <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
     <PlatformTarget>x86</PlatformTarget>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DefineConstants>TRACE;DEBUG;WINDOWS</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="code\Application.cs" />
     <Compile Include="MainForm.cs">
       <SubType>Form</SubType>
     </Compile>
       <DesignTimeSharedInput>True</DesignTimeSharedInput>
     </Compile>
   </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
     <PostBuildEvent>copy $(ProjectDir)\References\*.dll $(ProjectDir)\$(OutDir)</PostBuildEvent>