Skip to content

Commit

Permalink
Add double support in separate configurations (DebugDouble/ReleaseDou…
Browse files Browse the repository at this point in the history
…ble) [skip ci]
  • Loading branch information
speps committed Feb 18, 2016
1 parent b0d93da commit ff63836
Show file tree
Hide file tree
Showing 11 changed files with 137 additions and 69 deletions.
6 changes: 4 additions & 2 deletions LibTessDotNet.sln
@@ -1,6 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibTessDotNet", "LibTessDotNet\LibTessDotNet.csproj", "{5EE39029-873A-45A0-9259-2198BF8729F4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TessBed", "TessBed\TessBed.csproj", "{AA3C13F4-2628-43D5-BAAE-751AE013C865}"
Expand Down
151 changes: 90 additions & 61 deletions LibTessDotNet/LibTessDotNet.csproj
@@ -1,63 +1,92 @@
<?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>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{5EE39029-873A-45A0-9259-2198BF8729F4}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LibTessDotNet</RootNamespace>
<AssemblyName>LibTessDotNet</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Build\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>default</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Build\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>default</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="Sources\Dict.cs" />
<Compile Include="Sources\Geom.cs" />
<Compile Include="Sources\Mesh.cs" />
<Compile Include="Sources\MeshUtils.cs" />
<Compile Include="Sources\PriorityHeap.cs" />
<Compile Include="Sources\PriorityQueue.cs" />
<Compile Include="Sources\Sweep.cs" />
<Compile Include="Sources\Tess.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\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>
-->
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{5EE39029-873A-45A0-9259-2198BF8729F4}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LibTessDotNet</RootNamespace>
<AssemblyName>LibTessDotNet</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Build\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>default</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<UseVSHostingProcess>false</UseVSHostingProcess>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Build\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>default</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<UseVSHostingProcess>false</UseVSHostingProcess>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugDouble|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\Build\DebugDouble\</OutputPath>
<DefineConstants>TRACE;DEBUG;DOUBLE</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<LangVersion>default</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RootNamespace>LibTessDotNet.Double</RootNamespace>
<AssemblyName>LibTessDotNet.Double</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseDouble|AnyCPU' ">
<OutputPath>..\Build\ReleaseDouble\</OutputPath>
<DefineConstants>TRACE;DOUBLE</DefineConstants>
<Optimize>true</Optimize>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<LangVersion>default</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RootNamespace>LibTessDotNet.Double</RootNamespace>
<AssemblyName>LibTessDotNet.Double</AssemblyName>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="Sources\Dict.cs" />
<Compile Include="Sources\Geom.cs" />
<Compile Include="Sources\Mesh.cs" />
<Compile Include="Sources\MeshUtils.cs" />
<Compile Include="Sources\PriorityHeap.cs" />
<Compile Include="Sources\PriorityQueue.cs" />
<Compile Include="Sources\Sweep.cs" />
<Compile Include="Sources\Tess.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\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>
4 changes: 4 additions & 0 deletions LibTessDotNet/Sources/Dict.cs
Expand Up @@ -31,7 +31,11 @@
** LibTessDotNet: Remi Gillig, https://github.com/speps/LibTessDotNet
*/

#if DOUBLE
namespace LibTessDotNet.Double
#else
namespace LibTessDotNet
#endif
{
internal class Dict<TValue> where TValue : class
{
Expand Down
6 changes: 5 additions & 1 deletion LibTessDotNet/Sources/Geom.cs
Expand Up @@ -34,9 +34,13 @@
using System;
using System.Diagnostics;

#if DOUBLE
using Real = System.Double;
namespace LibTessDotNet.Double
#else
using Real = System.Single;

namespace LibTessDotNet
#endif
{
internal static class Geom
{
Expand Down
4 changes: 4 additions & 0 deletions LibTessDotNet/Sources/Mesh.cs
Expand Up @@ -34,7 +34,11 @@
using System;
using System.Diagnostics;

#if DOUBLE
namespace LibTessDotNet.Double
#else
namespace LibTessDotNet
#endif
{
internal class Mesh : MeshUtils.Pooled<Mesh>
{
Expand Down
6 changes: 5 additions & 1 deletion LibTessDotNet/Sources/MeshUtils.cs
Expand Up @@ -35,9 +35,13 @@
using System.Collections.Generic;
using System.Diagnostics;

#if DOUBLE
using Real = System.Double;
namespace LibTessDotNet.Double
#else
using Real = System.Single;

namespace LibTessDotNet
#endif
{
public struct Vec3
{
Expand Down
4 changes: 4 additions & 0 deletions LibTessDotNet/Sources/PriorityHeap.cs
Expand Up @@ -34,7 +34,11 @@
using System;
using System.Diagnostics;

#if DOUBLE
namespace LibTessDotNet.Double
#else
namespace LibTessDotNet
#endif
{
internal struct PQHandle
{
Expand Down
4 changes: 4 additions & 0 deletions LibTessDotNet/Sources/PriorityQueue.cs
Expand Up @@ -35,7 +35,11 @@
using System.Collections.Generic;
using System.Diagnostics;

#if DOUBLE
namespace LibTessDotNet.Double
#else
namespace LibTessDotNet
#endif
{
internal class PriorityQueue<TValue> where TValue : class
{
Expand Down
6 changes: 5 additions & 1 deletion LibTessDotNet/Sources/Sweep.cs
Expand Up @@ -34,9 +34,13 @@
using System;
using System.Diagnostics;

#if DOUBLE
using Real = System.Double;
namespace LibTessDotNet.Double
#else
using Real = System.Single;

namespace LibTessDotNet
#endif
{
public partial class Tess
{
Expand Down
6 changes: 5 additions & 1 deletion LibTessDotNet/Sources/Tess.cs
Expand Up @@ -34,9 +34,13 @@
using System;
using System.Diagnostics;

#if DOUBLE
using Real = System.Double;
namespace LibTessDotNet.Double
#else
using Real = System.Single;

namespace LibTessDotNet
#endif
{
public enum WindingRule
{
Expand Down
9 changes: 7 additions & 2 deletions TessBed/TessBed.csproj
Expand Up @@ -6,7 +6,7 @@
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{AA3C13F4-2628-43D5-BAAE-751AE013C865}</ProjectGuid>
<OutputType>WinExe</OutputType>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TessBed</RootNamespace>
<AssemblyName>TessBed</AssemblyName>
Expand Down Expand Up @@ -35,6 +35,9 @@
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework">
<HintPath>Externals\NUnit\nunit.framework.dll</HintPath>
Expand Down Expand Up @@ -138,7 +141,9 @@
<EmbeddedResource Include="TestData\tank.testdat" />
<EmbeddedResource Include="TestData\test.testdat" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LibTessDotNet\LibTessDotNet.csproj">
<Project>{5EE39029-873A-45A0-9259-2198BF8729F4}</Project>
Expand Down

0 comments on commit ff63836

Please sign in to comment.