Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'develop3d' into mgfx3

  • Loading branch information...
commit 9897eb0d13aa2b2bda10a7a865b83daf6fc59b29 2 parents 524476d + 62a1522
Tom Spilman tomspilman authored
Showing with 593 additions and 387 deletions.
  1. +54 −3 MonoGame.Framework.Content.Pipeline/MonoGame.Framework.Content.Pipeline.MacOS.csproj
  2. +20 −2 MonoGame.Framework.Content.Pipeline/Serialization/Compiler/BuiltInContentWriter.cs
  3. +50 −3 MonoGame.Framework.Content.Pipeline/Serialization/Compiler/ContentCompiler.cs
  4. +5 −0 MonoGame.Framework.Content.Pipeline/Serialization/Compiler/ContentWriter.cs
  5. +19 −10 MonoGame.Framework.Content.Pipeline/TextureImporter.cs
  6. +2 −0  MonoGame.Framework/Audio/SoundEffectInstance.cs
  7. +4 −4 MonoGame.Framework/Content/ContentReaders/SongReader.cs
  8. +16 −3 MonoGame.Framework/Graphics/GraphicsDevice.cs
  9. +9 −9 MonoGame.Framework/Graphics/States/BlendState.cs
  10. +1 −1  MonoGame.Framework/Media/MediaPlayer.cs
  11. +26 −21 MonoGame.Framework/MonoGame.Framework.MacOS.csproj
  12. +4 −0 MonoGame.Framework/Properties/AssemblyInfo.cs
  13. +0 −4 MonoGame.Framework/WindowsPhone/WPGamePlatform.cs
  14. +1 −0  MonoGame.Framework/WindowsPhone/XamlGame.cs
  15. +1 −1  MonoGame.Framework/iOS/Devices/Sensors/Accelerometer.cs
  16. +1 −1  MonoGame.Framework/iOS/Devices/Sensors/Compass.cs
  17. +8 −5 README.md
  18. +1 −1  ThirdParty/Libs
  19. +2 −2 Tools/2MGFX/DXShaderData.mojo.cs
  20. +2 −2 Tools/2MGFX/DXShaderData.sharpdx.cs
  21. +9 −137 Tools/2MGFX/MGFX.tpg
  22. +11 −139 Tools/2MGFX/ParseTree.cs
  23. +297 −6 Tools/2MGFX/ShaderInfo.cs
  24. +14 −2 Tools/MGCB/MGCB.MacOS.csproj
  25. +9 −0 Tools/MGCB/MGCB.MacOS.sln
  26. +4 −0 Tools/MGCB/Nvidia.TextureTools.dll.config
  27. +23 −31 default.build
57 MonoGame.Framework.Content.Pipeline/MonoGame.Framework.Content.Pipeline.MacOS.csproj
View
@@ -13,9 +13,9 @@
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
+ <DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
- <Optimize>false</Optimize>
+ <Optimize>False</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MACOS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
@@ -23,7 +23,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
+ <Optimize>True</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;MACOS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
@@ -41,6 +41,12 @@
<Reference Include="NAudio">
<HintPath>..\ThirdParty\Libs\NAudio\NAudio.dll</HintPath>
</Reference>
+ <Reference Include="Nvidia.TextureTools">
+ <HintPath>..\ThirdParty\Libs\NVTT\Windows\Nvidia.TextureTools.dll</HintPath>
+ </Reference>
+ <Reference Include="MonoMac, Version=0.0.0.0, Culture=neutral">
+ <Private>False</Private>
+ </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Audio\AudioContent.cs" />
@@ -146,6 +152,45 @@
<Compile Include="WmvImporter.cs" />
<Compile Include="XImporter.cs" />
<Compile Include="XmlImporter.cs" />
+ <Compile Include="Serialization\Compiler\ArrayWriter.cs" />
+ <Compile Include="Serialization\Compiler\BooleanWriter.cs" />
+ <Compile Include="Serialization\Compiler\BoundingBoxWriter.cs" />
+ <Compile Include="Serialization\Compiler\BoundingFrustumWriter.cs" />
+ <Compile Include="Serialization\Compiler\BoundingSphereWriter.cs" />
+ <Compile Include="Serialization\Compiler\BuiltInContentWriter.cs" />
+ <Compile Include="Serialization\Compiler\ByteWriter.cs" />
+ <Compile Include="Serialization\Compiler\CharWriter.cs" />
+ <Compile Include="Serialization\Compiler\ColorWriter.cs" />
+ <Compile Include="Serialization\Compiler\CurveWriter.cs" />
+ <Compile Include="Serialization\Compiler\DateTimeWriter.cs" />
+ <Compile Include="Serialization\Compiler\DecimalWriter.cs" />
+ <Compile Include="Serialization\Compiler\DictionaryWriter.cs" />
+ <Compile Include="Serialization\Compiler\DoubleWriter.cs" />
+ <Compile Include="Serialization\Compiler\EnumWriter.cs" />
+ <Compile Include="Serialization\Compiler\ExternalReferenceWriter.cs" />
+ <Compile Include="Serialization\Compiler\Int16Writer.cs" />
+ <Compile Include="Serialization\Compiler\Int32Writer.cs" />
+ <Compile Include="Serialization\Compiler\Int64Writer.cs" />
+ <Compile Include="Serialization\Compiler\ListWriter.cs" />
+ <Compile Include="Serialization\Compiler\MatrixWriter.cs" />
+ <Compile Include="Serialization\Compiler\NullableWriter.cs" />
+ <Compile Include="Serialization\Compiler\PlaneWriter.cs" />
+ <Compile Include="Serialization\Compiler\PointWriter.cs" />
+ <Compile Include="Serialization\Compiler\QuaternionWriter.cs" />
+ <Compile Include="Serialization\Compiler\RayWriter.cs" />
+ <Compile Include="Serialization\Compiler\RectangleWriter.cs" />
+ <Compile Include="Serialization\Compiler\SByteWriter.cs" />
+ <Compile Include="Serialization\Compiler\SingleWriter.cs" />
+ <Compile Include="Serialization\Compiler\StringWriter.cs" />
+ <Compile Include="Serialization\Compiler\TimeSpanWriter.cs" />
+ <Compile Include="Serialization\Compiler\UInt16Writer.cs" />
+ <Compile Include="Serialization\Compiler\UInt32Writer.cs" />
+ <Compile Include="Serialization\Compiler\UInt64Writer.cs" />
+ <Compile Include="Serialization\Compiler\Vector2Writer.cs" />
+ <Compile Include="Serialization\Compiler\Vector3Writer.cs" />
+ <Compile Include="Serialization\Compiler\Vector4Writer.cs" />
+ <Compile Include="Graphics\DXTBitmapContent.cs" />
+ <Compile Include="Graphics\PVRTCBitmapContent.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.
@@ -155,4 +200,10 @@
<Target Name="AfterBuild">
</Target>
-->
+ <ItemGroup>
+ <ProjectReference Include="..\MonoGame.Framework\MonoGame.Framework.MacOS.csproj">
+ <Project>{36C538E6-C32A-4A8D-A39C-566173D7118E}</Project>
+ <Name>MonoGame.Framework.MacOS</Name>
+ </ProjectReference>
+ </ItemGroup>
</Project>
22 MonoGame.Framework.Content.Pipeline/Serialization/Compiler/BuiltInContentWriter.cs
View
@@ -30,9 +30,27 @@ public override string GetRuntimeReader(TargetPlatform targetPlatform)
{
// Change "Writer" in this class name to "Reader" and use the runtime type namespace and assembly
string readerClassName = this.GetType().Name.Replace("Writer", "Reader");
+
+ // Add generic arguments if they exist
+ var args = this.GetType().GetGenericArguments();
+ if (args.Length > 0)
+ {
+ readerClassName += "[";
+ for (int i = 0; i < args.Length; ++i)
+ {
+ var arg = args[i];
+ readerClassName += "[";
+ readerClassName += arg.AssemblyQualifiedName;
+ readerClassName += "]";
+ if (i < args.Length - 1)
+ readerClassName += ", ";
+ }
+ readerClassName += "]";
+ }
+
string readerNamespace = typeof(ContentTypeReader).Namespace;
- string assemblyName = typeof(ContentTypeReader).Assembly.FullName;
- return readerNamespace + "." + readerClassName + ", " + assemblyName;
+ // From looking at XNA-produced XNBs, it appears built-in type readers don't need assembly qualification
+ return readerNamespace + "." + readerClassName;
}
}
}
53 MonoGame.Framework.Content.Pipeline/Serialization/Compiler/ContentCompiler.cs
View
@@ -6,6 +6,7 @@
using System.IO;
using Microsoft.Xna.Framework.Graphics;
using System.Collections.Generic;
+using System.Reflection;
namespace Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler
{
@@ -51,7 +52,7 @@ void GetTypeWriters()
{
// Find the content type this writer implements
Type baseType = type.BaseType;
- while ((baseType != null) && (baseType.Name != contentTypeWriterType.Name))
+ while ((baseType != null) && (baseType.GetGenericTypeDefinition() != contentTypeWriterType))
baseType = baseType.BaseType;
if (baseType != null)
typeWriterMap.Add(baseType, type);
@@ -68,11 +69,57 @@ void GetTypeWriters()
/// <remarks>This should be called from the ContentTypeWriter.Initialize method.</remarks>
public ContentTypeWriter GetTypeWriter(Type type)
{
+ ContentTypeWriter result = null;
var contentTypeWriterType = typeof(ContentTypeWriter<>).MakeGenericType(type);
Type typeWriterType;
if (!typeWriterMap.TryGetValue(contentTypeWriterType, out typeWriterType))
- throw new InvalidContentException(String.Format("Could not find ContentTypeWriter for type '{0}'", type.Name));
- var result = (ContentTypeWriter)Activator.CreateInstance(typeWriterType);
+ {
+ var inputTypeDef = type.GetGenericTypeDefinition();
+
+ Type chosen = null;
+ foreach (var kvp in typeWriterMap)
+ {
+ var args = kvp.Key.GetGenericArguments();
+
+ if (args.Length == 0)
+ continue;
+
+ if (!args[0].IsGenericType)
+ continue;
+
+ // Compare generic type definition
+ var keyTypeDef = args[0].GetGenericTypeDefinition();
+ if (inputTypeDef.Equals(keyTypeDef))
+ {
+ chosen = kvp.Value;
+ break;
+ }
+ }
+
+ try
+ {
+ var concreteType = type.GetGenericArguments();
+ result = (ContentTypeWriter)Activator.CreateInstance(chosen.MakeGenericType(concreteType));
+
+ // save it for next time.
+ typeWriterMap.Add(contentTypeWriterType, result.GetType());
+ }
+ catch (Exception)
+ {
+ throw new InvalidContentException(String.Format("Could not find ContentTypeWriter for type '{0}'", type.Name));
+ }
+ }
+ else
+ {
+ result = (ContentTypeWriter)Activator.CreateInstance(typeWriterType);
+ }
+
+ if (result != null)
+ {
+ MethodInfo dynMethod = result.GetType().GetMethod("Initialize", BindingFlags.NonPublic | BindingFlags.Instance);
+ dynMethod.Invoke(result, new object[] { this });
+ }
+
return result;
}
5 MonoGame.Framework.Content.Pipeline/Serialization/Compiler/ContentWriter.cs
View
@@ -242,6 +242,10 @@ internal ContentTypeWriter GetTypeWriter(Type type)
typeWriters.Add(typeWriter);
typeWriterMap.Add(typeWriter, index);
typeMap.Add(type, typeWriter);
+
+ var args = type.GetGenericArguments();
+ foreach (var arg in args)
+ GetTypeWriter(arg);
}
return typeWriter;
}
@@ -289,6 +293,7 @@ public void WriteExternalReference<T>(ExternalReference<T> reference)
/// <remarks>This method can be called recursively with a null value.</remarks>
public void WriteObject<T>(T value)
{
+ GetTypeWriter(typeof(Dictionary<int, List<string>>));
WriteObject<T>(value, GetTypeWriter(value.GetType()));
}
29 MonoGame.Framework.Content.Pipeline/TextureImporter.cs
View
@@ -27,19 +27,28 @@ public TextureImporter()
/// <param name="filename">Name of a game asset file.</param>
/// <param name="context">Contains information for importing a game asset, such as a logger interface.</param>
/// <returns>Resulting game asset.</returns>
- public override TextureContent Import(string filename, ContentImporterContext context)
- {
- var output = new Texture2DContent();
- output._bitmap = new Bitmap(filename);
+ public override TextureContent Import (string filename, ContentImporterContext context)
+ {
+ var output = new Texture2DContent ();
+ output._bitmap = new Bitmap (filename);
+
+ var width = output._bitmap.Width;
+ var height = output._bitmap.Height;
+
+ // Force the input's pixelformat to ARGB32, so we can have a common pixel format to deal with.
+ if (output._bitmap.PixelFormat != System.Drawing.Imaging.PixelFormat.Format32bppArgb) {
+
+ var bitmap = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
+ using ( var graphics = System.Drawing.Graphics.FromImage(bitmap)) {
+ graphics.DrawImage(output._bitmap, 0,0, width, height);
+ }
- // Force the input's pixelformat to ARGB32, so we can have a common pixel format to deal with.
- if (output._bitmap.PixelFormat != System.Drawing.Imaging.PixelFormat.Format32bppArgb)
- output._bitmap = output._bitmap.Clone(new System.Drawing.Rectangle(System.Drawing.Point.Empty, output._bitmap.Size),
- System.Drawing.Imaging.PixelFormat.Format32bppArgb);
+ output._bitmap = bitmap;
+ }
- var imageData = output._bitmap.GetData();
+ var imageData = output._bitmap.GetData();
- var bitmapContent = new PixelBitmapContent<Color>(output._bitmap.Width, output._bitmap.Height);
+ var bitmapContent = new PixelBitmapContent<Color>(width, height);
bitmapContent.SetPixelData(imageData);
output.Faces.Add(new MipmapChain(bitmapContent));
2  MonoGame.Framework/Audio/SoundEffectInstance.cs
View
@@ -171,6 +171,8 @@ public void Pause ()
public void Play ()
{
+ if (State == SoundState.Playing)
+ return;
#if DIRECTX
if (_voice != null)
{
8 MonoGame.Framework/Content/ContentReaders/SongReader.cs
View
@@ -61,7 +61,7 @@ internal static string Normalize(string fileName)
protected internal override Song Read(ContentReader input, Song existingInstance)
{
- string path = input.ReadString();
+ var path = input.ReadString();
if (!String.IsNullOrEmpty(path))
{
@@ -85,12 +85,12 @@ protected internal override Song Read(ContentReader input, Song existingInstance
path = dst.LocalPath.Substring(1);
// Adds the ContentManager's RootDirectory
- path = input.ContentManager.RootDirectoryFullPath + separator + path;
+ path = Path.Combine(input.ContentManager.RootDirectoryFullPath, path);
}
- int durationMS = input.ReadObject<int>();
+ var durationMs = input.ReadObject<int>();
- return new Song(path, durationMS);
+ return new Song(path, durationMs);
}
}
}
19 MonoGame.Framework/Graphics/GraphicsDevice.cs
View
@@ -2078,13 +2078,26 @@ private int SetUserIndexBuffer<T>(T[] indexData, int indexOffset, int indexCount
}
#endif
- public void DrawIndexedPrimitives(PrimitiveType primitiveType, int baseVertex, int minVertexIndex, int numbVertices, int startIndex, int primitiveCount)
+ /// <summary>
+ /// Draw geometry by indexing into the vertex buffer.
+ /// </summary>
+ /// <param name="primitiveType">The type of primitives in the index buffer.</param>
+ /// <param name="baseVertex">Used to offset the vertex range indexed from the vertex buffer.</param>
+ /// <param name="minVertexIndex">A hint of the lowest vertex indexed relative to baseVertex.</param>
+ /// <param name="numVertices">An hint of the maximum vertex indexed.</param>
+ /// <param name="startIndex">The index within the index buffer to start drawing from.</param>
+ /// <param name="primitiveCount">The number of primitives to render from the index buffer.</param>
+ /// <remarks>Note that minVertexIndex and numVertices are unused in MonoGame and will be ignored.</remarks>
+ public void DrawIndexedPrimitives(PrimitiveType primitiveType, int baseVertex, int minVertexIndex, int numVertices, int startIndex, int primitiveCount)
{
Debug.Assert(_vertexBuffer != null, "The vertex buffer is null!");
Debug.Assert(_indexBuffer != null, "The index buffer is null!");
- if (minVertexIndex > 0)
- throw new NotImplementedException ("minVertexIndex > 0 is supported");
+ // NOTE: minVertexIndex and numVertices are only hints of the
+ // range of vertex data which will be indexed.
+ //
+ // They will only be used if the graphics API can use
+ // this range hint to optimize rendering.
#if DIRECTX
18 MonoGame.Framework/Graphics/States/BlendState.cs
View
@@ -199,12 +199,12 @@ internal void ApplyState(GraphicsDevice device)
AlphaDestinationBlend == Opaque.AlphaDestinationBlend);
targetDesc.BlendOperation = GetBlendOperation(ColorBlendFunction);
- targetDesc.SourceBlend = GetBlendOption(ColorSourceBlend);
- targetDesc.DestinationBlend = GetBlendOption(ColorDestinationBlend);
+ targetDesc.SourceBlend = GetBlendOption(ColorSourceBlend, false);
+ targetDesc.DestinationBlend = GetBlendOption(ColorDestinationBlend, false);
targetDesc.AlphaBlendOperation = GetBlendOperation(AlphaBlendFunction);
- targetDesc.SourceAlphaBlend = GetBlendOption(AlphaSourceBlend);
- targetDesc.DestinationAlphaBlend = GetBlendOption(AlphaDestinationBlend);
+ targetDesc.SourceAlphaBlend = GetBlendOption(AlphaSourceBlend, true);
+ targetDesc.DestinationAlphaBlend = GetBlendOption(AlphaDestinationBlend, true);
// Set the first 4 targets to the same settings.
desc.RenderTarget[0] = targetDesc;
@@ -263,7 +263,7 @@ static private SharpDX.Direct3D11.BlendOperation GetBlendOperation(BlendFunction
}
}
- static private SharpDX.Direct3D11.BlendOption GetBlendOption(Blend blend)
+ static private SharpDX.Direct3D11.BlendOption GetBlendOption(Blend blend, bool alpha)
{
switch (blend)
{
@@ -274,7 +274,7 @@ static private SharpDX.Direct3D11.BlendOption GetBlendOption(Blend blend)
return SharpDX.Direct3D11.BlendOption.DestinationAlpha;
case Blend.DestinationColor:
- return SharpDX.Direct3D11.BlendOption.DestinationColor;
+ return alpha ? SharpDX.Direct3D11.BlendOption.DestinationAlpha : SharpDX.Direct3D11.BlendOption.DestinationColor;
case Blend.InverseBlendFactor:
return SharpDX.Direct3D11.BlendOption.InverseBlendFactor;
@@ -283,13 +283,13 @@ static private SharpDX.Direct3D11.BlendOption GetBlendOption(Blend blend)
return SharpDX.Direct3D11.BlendOption.InverseDestinationAlpha;
case Blend.InverseDestinationColor:
- return SharpDX.Direct3D11.BlendOption.InverseDestinationColor;
+ return alpha ? SharpDX.Direct3D11.BlendOption.InverseDestinationAlpha : SharpDX.Direct3D11.BlendOption.InverseDestinationColor;
case Blend.InverseSourceAlpha:
return SharpDX.Direct3D11.BlendOption.InverseSourceAlpha;
case Blend.InverseSourceColor:
- return SharpDX.Direct3D11.BlendOption.InverseSourceColor;
+ return alpha ? SharpDX.Direct3D11.BlendOption.InverseSourceAlpha : SharpDX.Direct3D11.BlendOption.InverseSourceColor;
case Blend.One:
return SharpDX.Direct3D11.BlendOption.One;
@@ -301,7 +301,7 @@ static private SharpDX.Direct3D11.BlendOption GetBlendOption(Blend blend)
return SharpDX.Direct3D11.BlendOption.SourceAlphaSaturate;
case Blend.SourceColor:
- return SharpDX.Direct3D11.BlendOption.SourceColor;
+ return alpha ? SharpDX.Direct3D11.BlendOption.SourceAlpha : SharpDX.Direct3D11.BlendOption.SourceColor;
case Blend.Zero:
return SharpDX.Direct3D11.BlendOption.Zero;
2  MonoGame.Framework/Media/MediaPlayer.cs
View
@@ -173,7 +173,7 @@ public static TimeSpan PlayPosition
get
{
#if WINDOWS_MEDIA_ENGINE
- return TimeSpan.Zero;
+ return TimeSpan.FromSeconds(_mediaEngineEx.CurrentTime);
#elif WINDOWS_MEDIA_SESSION
return _clock != null ? TimeSpan.FromTicks(_clock.Time) : TimeSpan.Zero;
#else
47 MonoGame.Framework/MonoGame.Framework.MacOS.csproj
View
@@ -10,47 +10,51 @@
<OutputType>Library</OutputType>
<RootNamespace>Microsoft.Xna.Framework</RootNamespace>
<AssemblyName>MonoGame.Framework</AssemblyName>
+ <SuppressXamMacUpsell>True</SuppressXamMacUpsell>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
+ <DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
- <Optimize>false</Optimize>
+ <Optimize>False</Optimize>
<OutputPath>bin\MacOS\Debug</OutputPath>
<DefineConstants>DEBUG;MONOMAC;OPENGL</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
- <ConsolePause>false</ConsolePause>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <EnableCodeSigning>false</EnableCodeSigning>
- <CreatePackage>false</CreatePackage>
- <EnablePackageSigning>false</EnablePackageSigning>
- <IncludeMonoRuntime>false</IncludeMonoRuntime>
+ <ConsolePause>False</ConsolePause>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ <EnableCodeSigning>False</EnableCodeSigning>
+ <CreatePackage>False</CreatePackage>
+ <EnablePackageSigning>False</EnablePackageSigning>
+ <IncludeMonoRuntime>False</IncludeMonoRuntime>
+ <UseSGen>False</UseSGen>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
- <Optimize>false</Optimize>
+ <Optimize>False</Optimize>
<OutputPath>bin\MacOS\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
- <ConsolePause>false</ConsolePause>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ConsolePause>False</ConsolePause>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<DefineConstants>MONOMAC;OPENGL</DefineConstants>
- <EnableCodeSigning>false</EnableCodeSigning>
- <CreatePackage>false</CreatePackage>
- <EnablePackageSigning>false</EnablePackageSigning>
- <IncludeMonoRuntime>false</IncludeMonoRuntime>
+ <EnableCodeSigning>False</EnableCodeSigning>
+ <CreatePackage>False</CreatePackage>
+ <EnablePackageSigning>False</EnablePackageSigning>
+ <IncludeMonoRuntime>False</IncludeMonoRuntime>
+ <UseSGen>False</UseSGen>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Distribution|AnyCPU' ">
<DebugType>none</DebugType>
- <Optimize>false</Optimize>
+ <Optimize>False</Optimize>
<OutputPath>bin\MacOS\Distribution</OutputPath>
<WarningLevel>4</WarningLevel>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<DefineConstants>MONOMAC;OPENGL</DefineConstants>
- <EnableCodeSigning>false</EnableCodeSigning>
- <CreatePackage>false</CreatePackage>
- <EnablePackageSigning>false</EnablePackageSigning>
- <IncludeMonoRuntime>false</IncludeMonoRuntime>
+ <EnableCodeSigning>False</EnableCodeSigning>
+ <CreatePackage>False</CreatePackage>
+ <EnablePackageSigning>False</EnablePackageSigning>
+ <IncludeMonoRuntime>False</IncludeMonoRuntime>
+ <UseSGen>False</UseSGen>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@@ -434,6 +438,7 @@
<Compile Include="FrameworkDispatcher.cs" />
<Compile Include="Graphics\Shader\ShaderProgramCache.cs" />
<Compile Include="Utilities\Hash.cs" />
+ <Compile Include="Media\VideoSoundtrackType.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="MacOS\" />
4 MonoGame.Framework/Properties/AssemblyInfo.cs
View
@@ -12,7 +12,11 @@
#elif ANDROID
[assembly: AssemblyDescription("MonoGame for Android")]
#elif WINDOWS
+#if DIRECTX
+[assembly: AssemblyDescription("MonoGame for Windows Desktop (DirectX)")]
+#else
[assembly: AssemblyDescription("MonoGame for Windows Desktop (OpenGL)")]
+#endif
#elif PSM
[assembly: AssemblyDescription("MonoGame for PlayStation Mobile")]
#elif LINUX
4 MonoGame.Framework/WindowsPhone/WPGamePlatform.cs
View
@@ -171,10 +171,6 @@ public override bool BeforeUpdate(GameTime gameTime)
public override bool BeforeDraw(GameTime gameTime)
{
- var device = Game.GraphicsDevice;
- if (device != null)
- device.ResetRenderTargets();
-
return true;
}
1  MonoGame.Framework/WindowsPhone/XamlGame.cs
View
@@ -101,6 +101,7 @@ public override void Draw(Device device, DeviceContext context, RenderTargetView
if (deviceChanged)
_game.GraphicsDevice.UpdateDevice(device, context);
_game.GraphicsDevice.UpdateTarget(renderTargetView);
+ _game.GraphicsDevice.ResetRenderTargets();
_game.Tick();
_host.RequestAdditionalFrame();
2  MonoGame.Framework/iOS/Devices/Sensors/Accelerometer.cs
View
@@ -84,7 +84,7 @@ private void ReadingChangedHandler(CMAccelerometerData data, NSError error)
if (this.IsDataValid)
{
this.IsDataValid = true;
- reading.Acceleration = new Vector3((float)motionManager.AccelerometerData.Acceleration.X, (float)motionManager.AccelerometerData.Acceleration.Y, (float)motionManager.AccelerometerData.Acceleration.Z);
+ reading.Acceleration = new Vector3((float)data.Acceleration.X, (float)data.Acceleration.Y, (float)data.Acceleration.Z);
reading.Timestamp = DateTime.Now;
this.CurrentValue = reading;
this.IsDataValid = error == null;
2  MonoGame.Framework/iOS/Devices/Sensors/Compass.cs
View
@@ -86,7 +86,7 @@ private void ReadingChangedHandler(CMDeviceMotion data, NSError error)
this.IsDataValid = error == null;
if (this.IsDataValid)
{
- reading.MagnetometerReading = new Vector3((float)motionManager.DeviceMotion.MagneticField.Field.Y, (float)-motionManager.DeviceMotion.MagneticField.Field.X, (float)motionManager.DeviceMotion.MagneticField.Field.Z);
+ reading.MagnetometerReading = new Vector3((float)data.MagneticField.Field.Y, (float)-data.MagneticField.Field.X, (float)data.MagneticField.Field.Z);
reading.TrueHeading = Math.Atan2(reading.MagnetometerReading.Y, reading.MagnetometerReading.X) / Math.PI * 180;
reading.MagneticHeading = reading.TrueHeading;
switch (data.MagneticField.Accuracy)
13 README.md
View
@@ -1,6 +1,8 @@
-# [MonoGame](http://monogame.net/) <a href='http://monogame.net/' target='_blank'><img src='https://github.com/mono/MonoGame/blob/develop3d/Graphics/Logos/MonogameLogo32x32.png?raw=true' width='16px' height'24px'></a> [![Build Status](http://sickie.sickheadgames.com:8080/job/develop3d/badge/icon)](http://sickie.sickheadgames.com:8080/job/develop3d/)
+# [MonoGame](http://monogame.net/) <a href='http://monogame.net/' target='_blank'><img src='https://github.com/mono/MonoGame/blob/develop3d/Graphics/Logos/MonogameLogo32x32.png?raw=true' width='16' height='16'></a> [![Build Status](http://sickie.sickheadgames.com:8080/job/develop3d/badge/icon)](http://sickie.sickheadgames.com:8080/job/develop3d/)
-[MonoGame](http://monogame.net) is an Open Source implementation of the Microsoft XNA 4.x Framework. Our goal is to allow XNA developers on Xbox 360, Windows & Windows Phone 7 to port their games to the iOS, Android, Mac OS X, Linux and Windows 8 Metro. OUYA, Windows Phone 8, PlayStation Mobile and Raspberry PI are currently in development.
+[MonoGame](http://monogame.net) is an open source implementation of the Microsoft XNA 4.x Framework.
+
+Our goal is to make it easy for XNA developers to create cross-platform games with extremely high code reuse.
## Supported Platforms
@@ -11,7 +13,7 @@
* Linux
* [Windows Store Apps](http://dev.windows.com) (for Windows 8 and Windows RT)
* [Windows Phone 8](http://dev.windowsphone.com)
-* PlayStation Mobile (currently 2D only)
+* [PlayStation Mobile](https://psm.playstation.net/portal/en/index.html) (currently 2D only)
* [OUYA](http://ouya.tv), an Android-based gaming console
## Quick Start
@@ -47,5 +49,6 @@ MonoGame is released under [Microsoft Public License (Ms-PL)](https://github.com
* The MonoGame 2.x series is now in maintenance mode.
* MonoGame 3.0 will mark the start of full support for the entire XNA API.
-* The Content Build Pipeline is currently under development. This will allow compiling of assets to optimized formats for the MonoGame supported platforms in Visual Studio or MonoDevelop without requiring XNA Game Studio 4.0 installed.
-* Add more platforms. SuperGiant Games have a version working in Google Chrome Native Client which we will merge back into our tree. Raspberry Pi has been shown to be working, but still needs some work.
+* The Content Pipeline is currently under development. This will allow compiling of assets to optimized formats for the MonoGame supported platforms in Visual Studio or MonoDevelop without requiring XNA Game Studio 4.0 installed.
+* SuperGiant Games have a version working in Google Chrome Native Client which we will merge back into our tree.
+* Raspberry Pi has been shown to be working, but still needs some work.
2  ThirdParty/Libs
@@ -1 +1 @@
-Subproject commit 8d0c752af62fbbdbac1b9d3095f5f6331e5aa61c
+Subproject commit c3d492e6a8218f13501d47254b37ea81eee69edb
4 Tools/2MGFX/DXShaderData.mojo.cs
View
@@ -145,8 +145,8 @@ public static DXShaderData CreateGLSL (byte[] byteCode, List<DXConstantBufferDat
SamplerStateInfo state;
if (samplerStates.TryGetValue(originalSamplerName, out state))
{
- sampler.state = state.state;
- sampler.parameterName = state.textureName ?? originalSamplerName;
+ sampler.state = state.State;
+ sampler.parameterName = state.TextureName ?? originalSamplerName;
}
// Store the sampler.
4 Tools/2MGFX/DXShaderData.sharpdx.cs
View
@@ -83,8 +83,8 @@ public static DXShaderData CreateHLSL(byte[] byteCode, bool isVertexShader, List
SamplerStateInfo state;
if (samplerStates.TryGetValue(rdesc.Name, out state))
{
- sampler.parameterName = state.textureName ?? rdesc.Name;
- sampler.state = state.state;
+ sampler.parameterName = state.TextureName ?? rdesc.Name;
+ sampler.state = state.State;
}
samplers.Add(sampler);
146 Tools/2MGFX/MGFX.tpg
View
@@ -71,83 +71,12 @@ Technique_Declaration -> Technique Identifier? OpenBracket Pass_Declaration+ Clo
Render_State_Expression -> Identifier Equals (Identifier | Number) Semicolon
{
- var pass = paramlist[0] as PassInfo;
var name = $Identifier[0] as string;
var value = ($Identifier[1] ?? $Number) as string;
- Microsoft.Xna.Framework.Graphics.Blend blend;
-
- switch (name.ToLower())
- {
- case "alphablendenable":
- if (!ParseTreeTools.ParseBool(value))
- {
- if (pass.blendState == null)
- pass.blendState = new Microsoft.Xna.Framework.Graphics.BlendState();
- pass.blendState.AlphaSourceBlend = Microsoft.Xna.Framework.Graphics.Blend.One;
- pass.blendState.ColorSourceBlend = Microsoft.Xna.Framework.Graphics.Blend.One;
- pass.blendState.ColorDestinationBlend = Microsoft.Xna.Framework.Graphics.Blend.Zero;
- pass.blendState.AlphaDestinationBlend = Microsoft.Xna.Framework.Graphics.Blend.Zero;
- }
- break;
- case "srcblend":
- blend = ParseTreeTools.ParseBlend(value);
- if (pass.blendState == null)
- pass.blendState = new Microsoft.Xna.Framework.Graphics.BlendState();
- pass.blendState.AlphaSourceBlend = blend;
- pass.blendState.ColorSourceBlend = blend;
- break;
- case "destblend":
- blend = ParseTreeTools.ParseBlend(value);
- if (pass.blendState == null)
- pass.blendState = new Microsoft.Xna.Framework.Graphics.BlendState();
- pass.blendState.AlphaDestinationBlend = blend;
- pass.blendState.ColorDestinationBlend = blend;
- break;
- case "blendop":
- if (pass.blendState == null)
- pass.blendState = new Microsoft.Xna.Framework.Graphics.BlendState();
- pass.blendState.AlphaBlendFunction = ParseTreeTools.ParseBlendFunction(value);
- break;
- case "zenable":
- if (pass.depthStencilState == null)
- pass.depthStencilState = new Microsoft.Xna.Framework.Graphics.DepthStencilState();
- pass.depthStencilState.DepthBufferEnable = ParseTreeTools.ParseBool(value);
- break;
- case "zwriteenable":
- if (pass.depthStencilState == null)
- pass.depthStencilState = new Microsoft.Xna.Framework.Graphics.DepthStencilState();
- pass.depthStencilState.DepthBufferWriteEnable = ParseTreeTools.ParseBool(value);
- break;
- case "depthbias":
- if (pass.rasterizerState == null)
- pass.rasterizerState= new Microsoft.Xna.Framework.Graphics.RasterizerState();
- pass.rasterizerState.DepthBias = float.Parse(value);
- break;
- case "cullmode":
- if (pass.rasterizerState == null)
- pass.rasterizerState= new Microsoft.Xna.Framework.Graphics.RasterizerState();
- pass.rasterizerState.CullMode = ParseTreeTools.ParseCullMode(value);
- break;
- case "fillmode":
- if (pass.rasterizerState == null)
- pass.rasterizerState= new Microsoft.Xna.Framework.Graphics.RasterizerState();
- pass.rasterizerState.FillMode = ParseTreeTools.ParseFillMode(value);
- break;
- case "multisampleantialias":
- if (pass.rasterizerState == null)
- pass.rasterizerState= new Microsoft.Xna.Framework.Graphics.RasterizerState();
- pass.rasterizerState.MultiSampleAntiAlias = ParseTreeTools.ParseBool(value);
- break;
- case "slopescaledepthbias":
- if (pass.rasterizerState == null)
- pass.rasterizerState= new Microsoft.Xna.Framework.Graphics.RasterizerState();
- pass.rasterizerState.SlopeScaleDepthBias = float.Parse(value);
- break;
- default:
- break;
- }
-
+ var pass = paramlist[0] as PassInfo;
+ pass.ParseRenderState(name, value);
+
return null;
};
@@ -187,47 +116,11 @@ PixelShader_Pass_Expression -> PixelShader Equals Compile ShaderModel Identifier
Sampler_State_Expression -> Identifier Equals (LessThan Identifier GreaterThan | Identifier | Number) Semicolon
{
- var sampler = paramlist[0] as SamplerStateInfo;
var name = $Identifier[0] as string;
- var value = ($Identifier[1] ?? ($Identifier[2] ?? $Number[0])) as string;
- switch (name.ToLower())
- {
- case "texture":
- sampler.textureName = value;
- break;
- case "minfilter":
- sampler.MinFilter = ParseTreeTools.ParseTextureFilterType(value);
- break;
- case "magfilter":
- sampler.MagFilter = ParseTreeTools.ParseTextureFilterType(value);
- break;
- case "mipfilter":
- sampler.MipFilter = ParseTreeTools.ParseTextureFilterType(value);
- break;
- case "filter":
- sampler.MinFilter = sampler.MagFilter = sampler.MipFilter = ParseTreeTools.ParseTextureFilterType(value);
- break;
- case "addressu":
- sampler.state.AddressU = ParseTreeTools.ParseAddressMode(value);
- break;
- case "addressv":
- sampler.state.AddressV = ParseTreeTools.ParseAddressMode(value);
- break;
- case "addressw":
- sampler.state.AddressW = ParseTreeTools.ParseAddressMode(value);
- break;
- case "maxanisotropy":
- sampler.state.MaxAnisotropy = int.Parse(value);
- break;
- case "maxlod":
- sampler.state.MaxMipLevel = int.Parse(value);
- break;
- case "miplodbias":
- sampler.state.MipMapLevelOfDetailBias = float.Parse(value);
- break;
- default:
- break;
- }
+ var value = ($Identifier[1] ?? ($Identifier[2] ?? $Number[0])) as string;
+
+ var sampler = paramlist[0] as SamplerStateInfo;
+ sampler.Parse(name, value);
return null;
};
@@ -243,34 +136,13 @@ Sampler_Declaration -> Sampler Identifier (Sampler_Register_Expression)* (Equals
return null;
var sampler = new SamplerStateInfo();
- sampler.name = $Identifier as string;
- sampler.state = new Microsoft.Xna.Framework.Graphics.SamplerState();
+ sampler.Name = $Identifier as string;
foreach (ParseNode node in Nodes)
node.Eval(tree, sampler);
-
- // Figure out what kind of filter to set based on each individual min, mag, and mip filter
- if (sampler.MinFilter == TextureFilterType.Anisotropic)
- sampler.state.Filter = Microsoft.Xna.Framework.Graphics.TextureFilter.Anisotropic;
- else if (sampler.MinFilter == TextureFilterType.Linear && sampler.MagFilter == TextureFilterType.Linear && sampler.MipFilter == TextureFilterType.Linear)
- sampler.state.Filter = Microsoft.Xna.Framework.Graphics.TextureFilter.Linear;
- else if (sampler.MinFilter == TextureFilterType.Linear && sampler.MagFilter == TextureFilterType.Linear && sampler.MipFilter == TextureFilterType.Point)
- sampler.state.Filter = Microsoft.Xna.Framework.Graphics.TextureFilter.LinearMipPoint;
- else if (sampler.MinFilter == TextureFilterType.Linear && sampler.MagFilter == TextureFilterType.Point && sampler.MipFilter == TextureFilterType.Linear)
- sampler.state.Filter = Microsoft.Xna.Framework.Graphics.TextureFilter.MinLinearMagPointMipLinear;
- else if (sampler.MinFilter == TextureFilterType.Linear && sampler.MagFilter == TextureFilterType.Point && sampler.MipFilter == TextureFilterType.Point)
- sampler.state.Filter = Microsoft.Xna.Framework.Graphics.TextureFilter.MinLinearMagPointMipPoint;
- else if (sampler.MinFilter == TextureFilterType.Point && sampler.MagFilter == TextureFilterType.Linear && sampler.MipFilter == TextureFilterType.Linear)
- sampler.state.Filter = Microsoft.Xna.Framework.Graphics.TextureFilter.MinPointMagLinearMipLinear;
- else if (sampler.MinFilter == TextureFilterType.Point && sampler.MagFilter == TextureFilterType.Linear && sampler.MipFilter == TextureFilterType.Point)
- sampler.state.Filter = Microsoft.Xna.Framework.Graphics.TextureFilter.MinPointMagLinearMipPoint;
- else if (sampler.MinFilter == TextureFilterType.Point && sampler.MagFilter == TextureFilterType.Point && sampler.MipFilter == TextureFilterType.Point)
- sampler.state.Filter = Microsoft.Xna.Framework.Graphics.TextureFilter.Point;
- else if (sampler.MinFilter == TextureFilterType.Point && sampler.MagFilter == TextureFilterType.Point && sampler.MipFilter == TextureFilterType.Linear)
- sampler.state.Filter = Microsoft.Xna.Framework.Graphics.TextureFilter.PointMipLinear;
var shaderInfo = paramlist[0] as ShaderInfo;
- shaderInfo.SamplerStates.Add(sampler.name, sampler);
+ shaderInfo.SamplerStates.Add(sampler.Name, sampler);
return null;
};
150 Tools/2MGFX/ParseTree.cs
View
@@ -245,83 +245,12 @@ protected virtual object EvalTechnique_Declaration(ParseTree tree, params object
protected virtual object EvalRender_State_Expression(ParseTree tree, params object[] paramlist)
{
- var pass = paramlist[0] as PassInfo;
- var name = this.GetValue(tree, TokenType.Identifier, 0) as string;
+ var name = this.GetValue(tree, TokenType.Identifier, 0) as string;
var value = (this.GetValue(tree, TokenType.Identifier, 1) ?? this.GetValue(tree, TokenType.Number, 0)) as string;
- Microsoft.Xna.Framework.Graphics.Blend blend;
-
- switch (name.ToLower())
- {
- case "alphablendenable":
- if (!ParseTreeTools.ParseBool(value))
- {
- if (pass.blendState == null)
- pass.blendState = new Microsoft.Xna.Framework.Graphics.BlendState();
- pass.blendState.AlphaSourceBlend = Microsoft.Xna.Framework.Graphics.Blend.One;
- pass.blendState.ColorSourceBlend = Microsoft.Xna.Framework.Graphics.Blend.One;
- pass.blendState.ColorDestinationBlend = Microsoft.Xna.Framework.Graphics.Blend.Zero;
- pass.blendState.AlphaDestinationBlend = Microsoft.Xna.Framework.Graphics.Blend.Zero;
- }
- break;
- case "srcblend":
- blend = ParseTreeTools.ParseBlend(value);
- if (pass.blendState == null)
- pass.blendState = new Microsoft.Xna.Framework.Graphics.BlendState();
- pass.blendState.AlphaSourceBlend = blend;
- pass.blendState.ColorSourceBlend = blend;
- break;
- case "destblend":
- blend = ParseTreeTools.ParseBlend(value);
- if (pass.blendState == null)
- pass.blendState = new Microsoft.Xna.Framework.Graphics.BlendState();
- pass.blendState.AlphaDestinationBlend = blend;
- pass.blendState.ColorDestinationBlend = blend;
- break;
- case "blendop":
- if (pass.blendState == null)
- pass.blendState = new Microsoft.Xna.Framework.Graphics.BlendState();
- pass.blendState.AlphaBlendFunction = ParseTreeTools.ParseBlendFunction(value);
- break;
- case "zenable":
- if (pass.depthStencilState == null)
- pass.depthStencilState = new Microsoft.Xna.Framework.Graphics.DepthStencilState();
- pass.depthStencilState.DepthBufferEnable = ParseTreeTools.ParseBool(value);
- break;
- case "zwriteenable":
- if (pass.depthStencilState == null)
- pass.depthStencilState = new Microsoft.Xna.Framework.Graphics.DepthStencilState();
- pass.depthStencilState.DepthBufferWriteEnable = ParseTreeTools.ParseBool(value);
- break;
- case "depthbias":
- if (pass.rasterizerState == null)
- pass.rasterizerState= new Microsoft.Xna.Framework.Graphics.RasterizerState();
- pass.rasterizerState.DepthBias = float.Parse(value);
- break;
- case "cullmode":
- if (pass.rasterizerState == null)
- pass.rasterizerState= new Microsoft.Xna.Framework.Graphics.RasterizerState();
- pass.rasterizerState.CullMode = ParseTreeTools.ParseCullMode(value);
- break;
- case "fillmode":
- if (pass.rasterizerState == null)
- pass.rasterizerState= new Microsoft.Xna.Framework.Graphics.RasterizerState();
- pass.rasterizerState.FillMode = ParseTreeTools.ParseFillMode(value);
- break;
- case "multisampleantialias":
- if (pass.rasterizerState == null)
- pass.rasterizerState= new Microsoft.Xna.Framework.Graphics.RasterizerState();
- pass.rasterizerState.MultiSampleAntiAlias = ParseTreeTools.ParseBool(value);
- break;
- case "slopescaledepthbias":
- if (pass.rasterizerState == null)
- pass.rasterizerState= new Microsoft.Xna.Framework.Graphics.RasterizerState();
- pass.rasterizerState.SlopeScaleDepthBias = float.Parse(value);
- break;
- default:
- break;
- }
-
+ var pass = paramlist[0] as PassInfo;
+ pass.ParseRenderState(name, value);
+
return null;
}
@@ -361,47 +290,11 @@ protected virtual object EvalPixelShader_Pass_Expression(ParseTree tree, params
protected virtual object EvalSampler_State_Expression(ParseTree tree, params object[] paramlist)
{
- var sampler = paramlist[0] as SamplerStateInfo;
- var name = this.GetValue(tree, TokenType.Identifier, 0) as string;
- var value = (this.GetValue(tree, TokenType.Identifier, 1) ?? (this.GetValue(tree, TokenType.Identifier, 2) ?? this.GetValue(tree, TokenType.Number, 0))) as string;
- switch (name.ToLower())
- {
- case "texture":
- sampler.textureName = value;
- break;
- case "minfilter":
- sampler.MinFilter = ParseTreeTools.ParseTextureFilterType(value);
- break;
- case "magfilter":
- sampler.MagFilter = ParseTreeTools.ParseTextureFilterType(value);
- break;
- case "mipfilter":
- sampler.MipFilter = ParseTreeTools.ParseTextureFilterType(value);
- break;
- case "filter":
- sampler.MinFilter = sampler.MagFilter = sampler.MipFilter = ParseTreeTools.ParseTextureFilterType(value);
- break;
- case "addressu":
- sampler.state.AddressU = ParseTreeTools.ParseAddressMode(value);
- break;
- case "addressv":
- sampler.state.AddressV = ParseTreeTools.ParseAddressMode(value);
- break;
- case "addressw":
- sampler.state.AddressW = ParseTreeTools.ParseAddressMode(value);
- break;
- case "maxanisotropy":
- sampler.state.MaxAnisotropy = int.Parse(value);
- break;
- case "maxlod":
- sampler.state.MaxMipLevel = int.Parse(value);
- break;
- case "miplodbias":
- sampler.state.MipMapLevelOfDetailBias = float.Parse(value);
- break;
- default:
- break;
- }
+ var name = this.GetValue(tree, TokenType.Identifier, 0) as string;
+ var value = (this.GetValue(tree, TokenType.Identifier, 1) ?? (this.GetValue(tree, TokenType.Identifier, 2) ?? this.GetValue(tree, TokenType.Number, 0))) as string;
+
+ var sampler = paramlist[0] as SamplerStateInfo;
+ sampler.Parse(name, value);
return null;
}
@@ -417,34 +310,13 @@ protected virtual object EvalSampler_Declaration(ParseTree tree, params object[]
return null;
var sampler = new SamplerStateInfo();
- sampler.name = this.GetValue(tree, TokenType.Identifier, 0) as string;
- sampler.state = new Microsoft.Xna.Framework.Graphics.SamplerState();
+ sampler.Name = this.GetValue(tree, TokenType.Identifier, 0) as string;
foreach (ParseNode node in Nodes)
node.Eval(tree, sampler);
-
- // Figure out what kind of filter to set based on each individual min, mag, and mip filter
- if (sampler.MinFilter == TextureFilterType.Anisotropic)
- sampler.state.Filter = Microsoft.Xna.Framework.Graphics.TextureFilter.Anisotropic;
- else if (sampler.MinFilter == TextureFilterType.Linear && sampler.MagFilter == TextureFilterType.Linear && sampler.MipFilter == TextureFilterType.Linear)
- sampler.state.Filter = Microsoft.Xna.Framework.Graphics.TextureFilter.Linear;
- else if (sampler.MinFilter == TextureFilterType.Linear && sampler.MagFilter == TextureFilterType.Linear && sampler.MipFilter == TextureFilterType.Point)
- sampler.state.Filter = Microsoft.Xna.Framework.Graphics.TextureFilter.LinearMipPoint;
- else if (sampler.MinFilter == TextureFilterType.Linear && sampler.MagFilter == TextureFilterType.Point && sampler.MipFilter == TextureFilterType.Linear)
- sampler.state.Filter = Microsoft.Xna.Framework.Graphics.TextureFilter.MinLinearMagPointMipLinear;
- else if (sampler.MinFilter == TextureFilterType.Linear && sampler.MagFilter == TextureFilterType.Point && sampler.MipFilter == TextureFilterType.Point)
- sampler.state.Filter = Microsoft.Xna.Framework.Graphics.TextureFilter.MinLinearMagPointMipPoint;
- else if (sampler.MinFilter == TextureFilterType.Point && sampler.MagFilter == TextureFilterType.Linear && sampler.MipFilter == TextureFilterType.Linear)
- sampler.state.Filter = Microsoft.Xna.Framework.Graphics.TextureFilter.MinPointMagLinearMipLinear;
- else if (sampler.MinFilter == TextureFilterType.Point && sampler.MagFilter == TextureFilterType.Linear && sampler.MipFilter == TextureFilterType.Point)
- sampler.state.Filter = Microsoft.Xna.Framework.Graphics.TextureFilter.MinPointMagLinearMipPoint;
- else if (sampler.MinFilter == TextureFilterType.Point && sampler.MagFilter == TextureFilterType.Point && sampler.MipFilter == TextureFilterType.Point)
- sampler.state.Filter = Microsoft.Xna.Framework.Graphics.TextureFilter.Point;
- else if (sampler.MinFilter == TextureFilterType.Point && sampler.MagFilter == TextureFilterType.Point && sampler.MipFilter == TextureFilterType.Linear)
- sampler.state.Filter = Microsoft.Xna.Framework.Graphics.TextureFilter.PointMipLinear;
var shaderInfo = paramlist[0] as ShaderInfo;
- shaderInfo.SamplerStates.Add(sampler.name, sampler);
+ shaderInfo.SamplerStates.Add(sampler.Name, sampler);
return null;
}
303 Tools/2MGFX/ShaderInfo.cs
View
@@ -58,6 +58,96 @@ public void ValidateShaderModels(bool dx11Profile)
throw new Exception(String.Format("Pixel shader '{0}' must be SM 3.0 or lower!", psFunction));
}
}
+
+ private static Blend ToAlphaBlend(Blend blend)
+ {
+ switch (blend)
+ {
+ case Blend.SourceColor:
+ return Blend.SourceAlpha;
+ case Blend.InverseSourceColor:
+ return Blend.InverseSourceAlpha;
+ case Blend.DestinationColor:
+ return Blend.DestinationAlpha;
+ case Blend.InverseDestinationColor:
+ return Blend.InverseDestinationAlpha;
+ }
+ return blend;
+ }
+
+ public void ParseRenderState(string name, string value)
+ {
+ Blend blend;
+
+ switch (name.ToLower())
+ {
+ case "alphablendenable":
+ if (!ParseTreeTools.ParseBool(value))
+ {
+ if (blendState == null)
+ blendState = new BlendState();
+ blendState.ColorSourceBlend = Blend.One;
+ blendState.AlphaSourceBlend = Blend.One;
+ blendState.ColorDestinationBlend = Blend.Zero;
+ blendState.AlphaDestinationBlend = Blend.Zero;
+ }
+ break;
+ case "srcblend":
+ blend = ParseTreeTools.ParseBlend(value);
+ if (blendState == null)
+ blendState = new BlendState();
+ blendState.ColorSourceBlend = blend;
+ blendState.AlphaSourceBlend = ToAlphaBlend(blend);
+ break;
+ case "destblend":
+ blend = ParseTreeTools.ParseBlend(value);
+ if (blendState == null)
+ blendState = new BlendState();
+ blendState.ColorDestinationBlend = blend;
+ blendState.AlphaDestinationBlend = ToAlphaBlend(blend);
+ break;
+ case "blendop":
+ if (blendState == null)
+ blendState = new BlendState();
+ blendState.AlphaBlendFunction = ParseTreeTools.ParseBlendFunction(value);
+ break;
+ case "zenable":
+ if (depthStencilState == null)
+ depthStencilState = new DepthStencilState();
+ depthStencilState.DepthBufferEnable = ParseTreeTools.ParseBool(value);
+ break;
+ case "zwriteenable":
+ if (depthStencilState == null)
+ depthStencilState = new DepthStencilState();
+ depthStencilState.DepthBufferWriteEnable = ParseTreeTools.ParseBool(value);
+ break;
+ case "depthbias":
+ if (rasterizerState == null)
+ rasterizerState = new RasterizerState();
+ rasterizerState.DepthBias = float.Parse(value);
+ break;
+ case "cullmode":
+ if (rasterizerState == null)
+ rasterizerState = new RasterizerState();
+ rasterizerState.CullMode = ParseTreeTools.ParseCullMode(value);
+ break;
+ case "fillmode":
+ if (rasterizerState == null)
+ rasterizerState = new RasterizerState();
+ rasterizerState.FillMode = ParseTreeTools.ParseFillMode(value);
+ break;
+ case "multisampleantialias":
+ if (rasterizerState == null)
+ rasterizerState = new RasterizerState();
+ rasterizerState.MultiSampleAntiAlias = ParseTreeTools.ParseBool(value);
+ break;
+ case "slopescaledepthbias":
+ if (rasterizerState == null)
+ rasterizerState = new RasterizerState();
+ rasterizerState.SlopeScaleDepthBias = float.Parse(value);
+ break;
+ }
+ }
}
public enum TextureFilterType
@@ -67,12 +157,213 @@ public enum TextureFilterType
public class SamplerStateInfo
{
- public string name;
- public string textureName;
- public SamplerState state;
- public TextureFilterType MinFilter;
- public TextureFilterType MagFilter;
- public TextureFilterType MipFilter;
+ private SamplerState _state;
+
+ private bool _dirty;
+
+ private TextureFilterType _minFilter;
+ private TextureFilterType _magFilter;
+ private TextureFilterType _mipFilter;
+
+ private TextureAddressMode _addressU;
+ private TextureAddressMode _addressV;
+ private TextureAddressMode _addressW;
+
+ private int _maxAnisotropy;
+ private int _maxMipLevel;
+ private float _mipMapLevelOfDetailBias;
+
+ public string Name { get; set; }
+
+ public string TextureName { get; set; }
+
+ public TextureFilterType MinFilter
+ {
+ set
+ {
+ if (_minFilter == value)
+ return;
+ _minFilter = value;
+ _dirty = true;
+ }
+ }
+
+ public TextureFilterType MagFilter
+ {
+ set
+ {
+ if (_magFilter == value)
+ return;
+ _magFilter = value;
+ _dirty = true;
+ }
+ }
+
+ public TextureFilterType MipFilter
+ {
+ set
+ {
+ if (_mipFilter == value)
+ return;
+ _mipFilter = value;
+ _dirty = true;
+ }
+ }
+
+ public TextureAddressMode AddressU
+ {
+ set
+ {
+ if (_addressU == value)
+ return;
+ _addressU = value;
+ _dirty = true;
+ }
+ }
+
+ public TextureAddressMode AddressV
+ {
+ set
+ {
+ if (_addressV == value)
+ return;
+ _addressV = value;
+ _dirty = true;
+ }
+ }
+
+ public TextureAddressMode AddressW
+ {
+ set
+ {
+ if (_addressW == value)
+ return;
+ _addressW = value;
+ _dirty = true;
+ }
+ }
+
+ public int MaxAnisotropy
+ {
+ set
+ {
+ if (_maxAnisotropy == value)
+ return;
+ _maxAnisotropy = value;
+ _dirty = true;
+ }
+ }
+
+ public int MaxMipLevel
+ {
+ set
+ {
+ if (_maxMipLevel == value)
+ return;
+ _maxMipLevel = value;
+ _dirty = true;
+ }
+ }
+
+ public float MipMapLevelOfDetailBias
+ {
+ set
+ {
+ if (_mipMapLevelOfDetailBias == value)
+ return;
+ _mipMapLevelOfDetailBias = value;
+ _dirty = true;
+ }
+ }
+
+ private void UpdateSamplerState()
+ {
+ // Get the existing state or create it.
+ if (_state == null)
+ _state = new SamplerState();
+
+ _state.AddressU = _addressU;
+ _state.AddressV = _addressV;
+ _state.AddressW = _addressW;
+
+ _state.MaxAnisotropy = _maxAnisotropy;
+ _state.MaxMipLevel = _maxMipLevel;
+ _state.MipMapLevelOfDetailBias = _mipMapLevelOfDetailBias;
+
+ // Figure out what kind of filter to set based on each
+ // individual min, mag, and mip filter settings.
+ if (_minFilter == TextureFilterType.Anisotropic)
+ _state.Filter = TextureFilter.Anisotropic;
+ else if (_minFilter == TextureFilterType.Linear && _magFilter == TextureFilterType.Linear && _mipFilter == TextureFilterType.Linear)
+ _state.Filter = TextureFilter.Linear;
+ else if (_minFilter == TextureFilterType.Linear && _magFilter == TextureFilterType.Linear && _mipFilter == TextureFilterType.Point)
+ _state.Filter = TextureFilter.LinearMipPoint;
+ else if (_minFilter == TextureFilterType.Linear && _magFilter == TextureFilterType.Point && _mipFilter == TextureFilterType.Linear)
+ _state.Filter = TextureFilter.MinLinearMagPointMipLinear;
+ else if (_minFilter == TextureFilterType.Linear && _magFilter == TextureFilterType.Point && _mipFilter == TextureFilterType.Point)
+ _state.Filter = TextureFilter.MinLinearMagPointMipPoint;
+ else if (_minFilter == TextureFilterType.Point && _magFilter == TextureFilterType.Linear && _mipFilter == TextureFilterType.Linear)
+ _state.Filter = TextureFilter.MinPointMagLinearMipLinear;
+ else if (_minFilter == TextureFilterType.Point && _magFilter == TextureFilterType.Linear && _mipFilter == TextureFilterType.Point)
+ _state.Filter = TextureFilter.MinPointMagLinearMipPoint;
+ else if (_minFilter == TextureFilterType.Point && _magFilter == TextureFilterType.Point && _mipFilter == TextureFilterType.Point)
+ _state.Filter = TextureFilter.Point;
+ else if (_minFilter == TextureFilterType.Point && _magFilter == TextureFilterType.Point && _mipFilter == TextureFilterType.Linear)
+ _state.Filter = TextureFilter.PointMipLinear;
+
+ _dirty = false;
+ }
+
+ public void Parse(string name, string value)
+ {
+ switch (name.ToLower())
+ {
+ case "texture":
+ TextureName = value;
+ break;
+ case "minfilter":
+ MinFilter = ParseTreeTools.ParseTextureFilterType(value);
+ break;
+ case "magfilter":
+ MagFilter = ParseTreeTools.ParseTextureFilterType(value);
+ break;
+ case "mipfilter":
+ MipFilter = ParseTreeTools.ParseTextureFilterType(value);
+ break;
+ case "filter":
+ MinFilter = MagFilter = MipFilter = ParseTreeTools.ParseTextureFilterType(value);
+ break;
+ case "addressu":
+ AddressU = ParseTreeTools.ParseAddressMode(value);
+ break;
+ case "addressv":
+ AddressV = ParseTreeTools.ParseAddressMode(value);
+ break;
+ case "addressw":
+ AddressW = ParseTreeTools.ParseAddressMode(value);
+ break;
+ case "maxanisotropy":
+ MaxAnisotropy = int.Parse(value);
+ break;
+ case "maxlod":
+ MaxMipLevel = int.Parse(value);
+ break;
+ case "miplodbias":
+ MipMapLevelOfDetailBias = float.Parse(value);
+ break;
+ }
+ }
+
+ public SamplerState State
+ {
+ get
+ {
+ if (_dirty)
+ UpdateSamplerState();
+
+ return _state;
+ }
+ }
}
public class TechniqueInfo
16 Tools/MGCB/MGCB.MacOS.csproj
View
@@ -36,10 +36,9 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
- <PlatformTarget>anycpu</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugSymbols>false</DebugSymbols>
+ <DebugSymbols>False</DebugSymbols>
<DebugType>none</DebugType>
<OutputPath>bin\Release</OutputPath>
<DefineConstants />
@@ -65,6 +64,10 @@
<Project>{B950DE10-AC5D-4BD9-B817-51247C4A732D}</Project>
<Name>MonoGame.Framework.Content.Pipeline.MacOS</Name>
</ProjectReference>
+ <ProjectReference Include="..\..\MonoGame.Framework\MonoGame.Framework.MacOS.csproj">
+ <Project>{36C538E6-C32A-4A8D-A39C-566173D7118E}</Project>
+ <Name>MonoGame.Framework.MacOS</Name>
+ </ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
@@ -74,4 +77,13 @@
<Target Name="AfterBuild">
</Target>
-->
+ <ItemGroup>
+ <Content Include="Nvidia.TextureTools.dll.config">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="..\..\ThirdParty\Libs\NVTT\MacOS\libnvtt.dylib">
+ <Link>libnvtt.dylib</Link>
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ </ItemGroup>
</Project>
9 Tools/MGCB/MGCB.MacOS.sln
View
@@ -7,12 +7,21 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Framework.Content.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network.MacOS", "..\..\ThirdParty\Lidgren.Network\Lidgren.Network.MacOS.csproj", "{AE483C29-042E-4226-BA52-D247CE7676DA}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Framework.MacOS", "..\..\MonoGame.Framework\MonoGame.Framework.MacOS.csproj", "{36C538E6-C32A-4A8D-A39C-566173D7118E}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
+ Distribution|Any CPU = Distribution|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {36C538E6-C32A-4A8D-A39C-566173D7118E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {36C538E6-C32A-4A8D-A39C-566173D7118E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {36C538E6-C32A-4A8D-A39C-566173D7118E}.Distribution|Any CPU.ActiveCfg = Distribution|Any CPU
+ {36C538E6-C32A-4A8D-A39C-566173D7118E}.Distribution|Any CPU.Build.0 = Distribution|Any CPU
+ {36C538E6-C32A-4A8D-A39C-566173D7118E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {36C538E6-C32A-4A8D-A39C-566173D7118E}.Release|Any CPU.Build.0 = Release|Any CPU
{AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
4 Tools/MGCB/Nvidia.TextureTools.dll.config
View
@@ -0,0 +1,4 @@
+<configuration>
+<dllmap os="macos" dll="nvtt.dll" target="libnvtt.dylib"/>
+<dllmap os="linux" dll="nvtt.dll" target="libnvtt.so"/>
+</configuration>
54 default.build
View
@@ -6,7 +6,6 @@
<target name="build" description="Build MonoGame Release">
- <call target="clean"/>
<call target="buildwindows"/>
<call target="buildlinux"/>
<call target="buildandroid" />
@@ -21,45 +20,29 @@
</target>
-
- <target name="clean" description="Clean all binaries">
- <if test="${os == 'Win32NT'}">
- <exec program="msbuild " commandline="MonoGame.Framework.Windows.sln /t:Clean /p:Configuration=Release" />
- <exec program="msbuild " commandline="MonoGame.Framework.Linux.sln /t:Clean /p:Configuration=Release" />
- <if test="${file::exists('C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.CSharp.targets')}">
- <exec program="msbuild " commandline="MonoGame.Framework.Android.sln /t:Clean /p:Configuration=Release" />
- </if>
-
- <exec program="msbuild " commandline="MonoGame.Framework.Windows8.sln /t:Clean /p:Configuration=Release" />
- <if test="${file::exists('c:\Program Files (x86)\MSBuild\Microsoft\WindowsPhone\v8.0\Microsoft.Cpp.WindowsPhone.8.0.targets')}">
- <exec program="msbuild " commandline='MonoGame.Framework.WindowsPhone.sln /t:Clean /p:Configuration=Release /p:Platform="ARM"' />
- <exec program="msbuild " commandline='MonoGame.Framework.WindowsPhone.sln /t:Clean /p:Configuration=Release /p:Platform="x86"' />
- </if>
- <exec program="msbuild " commandline="Tools\2MGFX\2MGFX.sln /t:Clean /p:Configuration=Release" />
- <exec program="msbuild " commandline="MonoGame.ContentPipeline\ContentProcessors\MonoGameContentProcessors.sln /t:Clean /p:Configuration=Release" />
- </if>
- <if test="${os == 'Unix'}">
- <exec program="xbuild" commandline="/t:Clean /p:Configuration=Release MonoGame.Framework.Windows.sln" />
- <exec program="xbuild" commandline="/t:Clean /p:Configuration=Release MonoGame.Framework.Linux.sln" />
- <exec program="xbuild" commandline="/t:Clean /p:Configuration=Release MonoGame.Framework.Android.sln" />
- </if>
-
- </target>
-
+
<target name="buildwindows" description="Build Windows">
<if test="${os == 'Win32NT'}">
+ <exec program="msbuild " commandline="MonoGame.Framework.Windows.sln /t:Clean /p:Configuration=Release" />
<exec program="msbuild " commandline="MonoGame.Framework.Windows.sln /t:Build /p:Configuration=Release" />
+ <exec program="msbuild " commandline="MonoGame.Framework.WindowsGL.sln /t:Clean /p:Configuration=Release" />
+ <exec program="msbuild " commandline="MonoGame.Framework.WindowsGL.sln /t:Build /p:Configuration=Release" />
</if>
<if test="${os == 'Unix'}">
+ <exec program="xbuild" commandline="/t:Clean /p:Configuration=Release MonoGame.Framework.Windows.sln" />
<exec program="xbuild" commandline="/t:Build /p:Configuration=Release MonoGame.Framework.Windows.sln" />
+ <exec program="xbuild" commandline="/t:Clean /p:Configuration=Release MonoGame.Framework.WindowsGL.sln" />
+ <exec program="xbuild" commandline="/t:Build /p:Configuration=Release MonoGame.Framework.WindowsGL.sln" />
</if>
</target>
<target name="buildlinux" description="Build Linux">
<if test="${os == 'Win32NT'}">
+ <exec program="msbuild " commandline="MonoGame.Framework.Linux.sln /t:Clean /p:Configuration=Release" />
<exec program="msbuild " commandline="MonoGame.Framework.Linux.sln /t:Build /p:Configuration=Release" />
</if>
<if test="${os == 'Unix'}">
+ <exec program="xbuild" commandline="/t:Build /p:Configuration=Clean MonoGame.Framework.Linux.sln" />
<exec program="xbuild" commandline="/t:Build /p:Configuration=Release MonoGame.Framework.Linux.sln" />
</if>
</target>
@@ -68,11 +51,13 @@
</target>
<target name="buildandroid" description="Build Android">
- <if test="${file::exists('C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.CSharp.targets')}">
- <if test="${os == 'Win32NT'}">
- <exec program="msbuild " commandline="MonoGame.Framework.Android.sln /t:Build /p:Configuration=Release" />
+ <if test="${file::exists('C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.CSharp.targets')}">
+ <if test="${os == 'Win32NT'}">
+ <exec program="msbuild " commandline="MonoGame.Framework.Android.sln /t:Clean /p:Configuration=Release" />
+ <exec program="msbuild " commandline="MonoGame.Framework.Android.sln /t:Build /p:Configuration=Release" />
</if>
<if test="${os == 'Unix'}">
+ <exec program="xbuild" commandline="/t:Clean /p:Configuration=Release MonoGame.Framework.Android.sln" />
<exec program="xbuild" commandline="/t:Build /p:Configuration=Release MonoGame.Framework.Android.sln" />
</if>
</if>
@@ -80,6 +65,7 @@
<target name="buildwindows8" description="Build Windows 8">
<if test="${os == 'Win32NT'}">
+ <exec program="msbuild " commandline="MonoGame.Framework.Windows8.sln /t:Clean /p:Configuration=Release" />
<exec program="msbuild " commandline="MonoGame.Framework.Windows8.sln /t:Build /p:Configuration=Release" />
</if>
</target>
@@ -88,20 +74,26 @@
<if test="${file::exists('c:\Program Files (x86)\MSBuild\Microsoft\WindowsPhone\v8.0\Microsoft.Cpp.WindowsPhone.8.0.targets')}">
<if test="${os == 'Win32NT'}">
+ <exec program="msbuild " commandline='MonoGame.Framework.WindowsPhone.sln /t:Clean /p:Configuration=Release /p:Platform="ARM"' />
<exec program="msbuild " commandline='MonoGame.Framework.WindowsPhone.sln /t:Build /p:Configuration=Release /p:Platform="ARM"' />
- <exec program="msbuild " commandline='MonoGame.Framework.WindowsPhone.sln /t:Build /p:Configuration=Release /p:Platform="x86"' />
+ <exec program="msbuild " commandline='MonoGame.Framework.WindowsPhone.sln /t:Clean /p:Configuration=Release /p:Platform="x86"' />
+ <exec program="msbuild " commandline='MonoGame.Framework.WindowsPhone.sln /t:Build /p:Configuration=Release /p:Platform="x86"' />
</if>
</if>
</target>
<target name="buildtools" description="Build Tools">
<if test="${os == 'Win32NT'}">
- <exec program="msbuild " commandline="Tools\2MGFX\2MGFX.sln /t:Build /p:Configuration=Release" />
+ <exec program="msbuild " commandline="Tools\2MGFX\2MGFX.sln /t:Clean /p:Configuration=Release" />
+ <exec program="msbuild " commandline="Tools\2MGFX\2MGFX.sln /t:Build /p:Configuration=Release" />
+ <exec program="msbuild " commandline="Tools\MGCB\MGCB.sln /t:Clean /p:Configuration=Release" />
+ <exec program="msbuild " commandline="Tools\MGCB\MGCB.sln /t:Build /p:Configuration=Release" />
</if>
</target>
<target name="buildcontentprocessor" description="Build Content Processor">
<if test="${os == 'Win32NT'}">
+ <exec program="msbuild " commandline="MonoGame.ContentPipeline\ContentProcessors\MonoGameContentProcessors.sln /t:Clean /p:Configuration=Release" />
<exec program="msbuild " commandline="MonoGame.ContentPipeline\ContentProcessors\MonoGameContentProcessors.sln /t:Build /p:Configuration=Release" />
</if>
</target>
Please sign in to comment.
Something went wrong with that request. Please try again.