- added new sample "SimpleNoContent" to test some things on Windows 8 without ContentPipeline

- tweaked the build-script for better support on Windows 8
- fixed bug #1016 (with a workaround. new issue will follow)
- fixed some render system issues on Windows 8
This commit is contained in:
Glatzemann 2012-10-01 11:39:30 +00:00 committed by Konstantin Koch
parent 488545cef3
commit 188bda28a5
17 changed files with 517 additions and 27 deletions

View File

@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2010
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework", "ANX.Framework\ANX.Framework.csproj", "{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework.TestCenter", "ANX.Framework.TestCenter\ANX.Framework.TestCenter.csproj", "{7344BBEB-A1C7-43A8-B68E-D42B81973DA9}"
@ -197,6 +197,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.InputDevices.Windows.Mo
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OnlineStatusGenerator", "Tools\OnlineStatusGenerator\OnlineStatusGenerator.csproj", "{6119ADEE-7047-4E29-BEC2-00F8D6D0EA01}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleNoContent", "Samples\SimpleNoContent\SimpleNoContent.csproj", "{AA3DF4D7-F072-47B5-B88C-20140B5F704A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -996,6 +998,20 @@ Global
{6119ADEE-7047-4E29-BEC2-00F8D6D0EA01}.Release|x64.ActiveCfg = Release|x86
{6119ADEE-7047-4E29-BEC2-00F8D6D0EA01}.Release|x86.ActiveCfg = Release|x86
{6119ADEE-7047-4E29-BEC2-00F8D6D0EA01}.Release|x86.Build.0 = Release|x86
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Debug|ARM.ActiveCfg = Debug|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Debug|x64.ActiveCfg = Debug|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Debug|x86.ActiveCfg = Debug|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|Any CPU.Build.0 = Release|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|ARM.ActiveCfg = Release|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|x64.ActiveCfg = Release|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -1035,6 +1051,7 @@ Global
{4A048A8C-C31D-4FC8-AAF3-C387B9E0309B} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{9259CC4E-AE6B-403C-8FAB-2408448C3935} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{D810F12D-6CE9-4755-AC6A-5DFEC7D1C782} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{AA3DF4D7-F072-47B5-B88C-20140B5F704A} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{DB88DDEB-7281-405D-8FCA-5681B6B2BD7A} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64}
{49066074-3B7B-4A55-B122-6BD33AB73558} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64}
{60D08399-244F-46A3-91F1-4CFD26D961A3} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64}

View File

@ -448,7 +448,9 @@
<Compile Include="NonXNA\RenderSystem\INativeConstantBuffer.cs" />
<Compile Include="NonXNA\RenderSystem\IOcclusionQuery.cs" />
<Compile Include="NonXNA\RenderSystem\VertexTypeHelper.cs" />
<Compile Include="NonXNA\SoundSystem\IDynamicSoundEffectInstance.cs" />
<Compile Include="NonXNA\SoundSystem\IMicrophone.cs" />
<Compile Include="NonXNA\SoundSystem\ISong.cs" />
<Compile Include="NonXNA\ThreadHelper.cs" />
<Compile Include="NonXNA\Windows8\AssetsHelper.cs" />
<Compile Include="NonXNA\Windows8\IServiceProvider.cs" />

View File

@ -69,7 +69,7 @@ namespace ANX.Framework.Graphics
{
foreach (EffectParameter parameter in parameters)
{
if (string.Equals(parameter.Semantic, semantic, StringComparison.InvariantCultureIgnoreCase))
if (string.Equals(parameter.Semantic.ToLowerInvariant(), semantic.ToLowerInvariant()))
{
return parameter;
}

View File

@ -186,22 +186,24 @@ namespace ANX.RenderSystem.Windows.DX11
//ga.SupportedDisplayModes = ;
ga.VendorId = adapter.Description.VendorId;
using (Output adapterOutput = adapter.GetOutput(0))
{
foreach (ModeDescription modeDescription in adapterOutput.GetDisplayModeList(Format.R8G8B8A8_UNorm, DisplayModeEnumerationFlags.Interlaced))
{
DisplayMode displayMode = new DisplayMode()
{
Format = DxFormatConverter.Translate(modeDescription.Format),
Width = modeDescription.Width,
Height = modeDescription.Height,
AspectRatio = (float)modeDescription.Width / (float)modeDescription.Height,
TitleSafeArea = new Rectangle(0, 0, modeDescription.Width, modeDescription.Height), //TODO: calculate this for real
};
foreach (Output adapterOutput in adapter.Outputs)
{
foreach (ModeDescription modeDescription in adapterOutput.GetDisplayModeList(Format.R8G8B8A8_UNorm, DisplayModeEnumerationFlags.Interlaced))
{
DisplayMode displayMode = new DisplayMode()
{
Format = DxFormatConverter.Translate(modeDescription.Format),
Width = modeDescription.Width,
Height = modeDescription.Height,
AspectRatio = (float)modeDescription.Width / (float)modeDescription.Height,
TitleSafeArea = new Rectangle(0, 0, modeDescription.Width, modeDescription.Height), //TODO: calculate this for real
};
displayModeCollection[displayMode.Format] = new DisplayMode[] { displayMode };
}
}
displayModeCollection[displayMode.Format] = new DisplayMode[] { displayMode };
}
break; //TODO: for the moment only adapter output 0 is interesting...
}
ga.SupportedDisplayModes = displayModeCollection;

View File

@ -30,7 +30,7 @@ namespace ANX.RenderSystem.Windows.Metro
{
get
{
return nativeParameter.Semantic;
throw new NotSupportedException();
}
}
#endregion

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>

View File

@ -0,0 +1,60 @@
#region Using Statements
using System;
using System.Collections.Generic;
using System.Linq;
using ANX.Framework;
using ANX.Framework.Graphics;
using ANX.Framework.Input;
#endregion // Using Statements
// This file is part of the ANX.Framework created by the
// "ANX.Framework developer group" and released under the Ms-PL license.
// For details see: http://anxframework.codeplex.com/license
namespace SimpleModernUI
{
public class Game1 : ANX.Framework.Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
public Game1()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "SampleContent";
}
protected override void Initialize()
{
base.Initialize();
}
protected override void LoadContent()
{
spriteBatch = new SpriteBatch(GraphicsDevice);
}
protected override void UnloadContent()
{
}
protected override void Update(GameTime gameTime)
{
// Allows the game to exit
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
{
this.Exit();
}
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
base.Draw(gameTime);
}
}
}

View File

@ -0,0 +1,16 @@
using System;
namespace SimpleModernUI
{
static class Program
{
[STAThread]
static void Main()
{
using (Game1 game = new Game1())
{
game.Run();
}
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die mit einer Assembly verknüpft sind.
[assembly: AssemblyTitle("SimpleModernUI")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SimpleModernUI")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
[assembly: ComVisible(false)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("5d17abc0-034a-4b0b-93c4-d658517347c5")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
// Hauptversion
// Nebenversion
// Buildnummer
// Revision
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.17929
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SimpleNoContent.Properties {
using System;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SimpleNoContent.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.17929
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SimpleNoContent.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{AA3DF4D7-F072-47B5-B88C-20140B5F704A}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SimpleNoContent</RootNamespace>
<AssemblyName>SimpleNoContent</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Game1.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\ANX.Framework\ANX.Framework.csproj">
<Project>{6899f0c9-70b9-4eb0-9dd3-e598d4be3e35}</Project>
<Name>ANX.Framework</Name>
</ProjectReference>
<ProjectReference Include="..\..\InputSystems\ANX.InputDevices.Windows.XInput\ANX.InputDevices.Windows.XInput.csproj">
<Project>{60d08399-244f-46a3-91f1-4cfd26d961a3}</Project>
<Name>ANX.InputDevices.Windows.XInput</Name>
</ProjectReference>
<ProjectReference Include="..\..\InputSystems\ANX.InputSystem.Standard\ANX.InputSystem.Standard.csproj">
<Project>{49066074-3b7b-4a55-b122-6bd33ab73558}</Project>
<Name>ANX.InputSystem.Standard</Name>
</ProjectReference>
<ProjectReference Include="..\..\PlatformSystems\ANX.PlatformSystem.Windows\ANX.PlatformSystem.Windows.csproj">
<Project>{068eb2e9-963c-4e1b-8831-e25011f11ffe}</Project>
<Name>ANX.PlatformSystem.Windows</Name>
</ProjectReference>
<ProjectReference Include="..\..\RenderSystems\ANX.RenderSystem.Windows.DX11\ANX.RenderSystem.Windows.DX11.csproj">
<Project>{b30de9c2-0926-46b6-8351-9af276c472d5}</Project>
<Name>ANX.RenderSystem.Windows.DX11</Name>
</ProjectReference>
<ProjectReference Include="..\..\SoundSystems\ANX.SoundSystem.Windows.XAudio\ANX.SoundSystem.Windows.XAudio.csproj">
<Project>{6a582788-c4d2-410c-96cd-177f75712d65}</Project>
<Name>ANX.SoundSystem.Windows.XAudio</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.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -59,8 +59,22 @@ namespace ANX.SoundSystem.Windows.XAudio
public float MasterVolume
{
get { return MasteringVoice.Volume; }
set { MasteringVoice.SetVolume(value, 0); }
get
{
if (MasteringVoice != null)
{
return MasteringVoice.Volume;
}
return 0.0f;
}
set
{
if (MasteringVoice != null)
{
MasteringVoice.SetVolume(value, 0);
}
}
}
public float SpeedOfSound
@ -80,8 +94,20 @@ namespace ANX.SoundSystem.Windows.XAudio
distanceScale = 1f;
dopplerScale = 1f;
speedOfSound = 343.5f;
device = new XAudio2();
MasteringVoice = new MasteringVoice(device, XAudio2.DefaultChannels, XAudio2.DefaultSampleRate);
try
{
device = new XAudio2();
}
catch (Exception ex)
{
device = null;
//TODO: error handling
System.Diagnostics.Debugger.Break();
}
if (device != null)
{
MasteringVoice = new MasteringVoice(device, XAudio2.DefaultChannels, XAudio2.DefaultSampleRate);
}
}
~Creator()

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.3.0")]
[assembly: AssemblyFileVersion("0.0.3.0")]
[assembly: AssemblyVersion("0.0.4.*")]
[assembly: AssemblyFileVersion("0.0.4.0")]

View File

@ -76,7 +76,8 @@
<property name="project.anx.metro" value="true" />
<property name="project.anx.platform" value="Windows 8 / Metro" />
<property name="build.platform" value="x86" />
<property name="build.dir" value="${build.dir}/ModernUI" />
<property name="project.anx.directives" value="${project.anx.directives} WINDOWSMETRO" />
<call target="generate_project_files" />
@ -470,7 +471,10 @@
<if test="${project.anx.metro}">
<fileset id="sample_files" basedir="../Samples/">
<!--
<include name="**/*_WindowsMetro.csproj" />
-->
<exclude name="*" />
</fileset>
</if>
@ -555,6 +559,7 @@
<exclude name="**/*ANXStatusComparer*.csproj" if="${project.anx.metro}" />
<exclude name="**/*StockShaderCodeGenerator*.csproj" if="${project.anx.metro}" />
<exclude name="**/*XNBInspector*.csproj" if="${project.anx.metro}" />
<exclude name="**/*OnlineStatusGenerator*.csproj" if="${project.anx.metro}" />
</items>
</in>
<do>
@ -657,11 +662,11 @@
<include name="InputSystems/**/*.csproj" />
<include name="PlatformSystems/**/*.csproj" />
<include name="SoundSystems/**/*.csproj" />
<include name="Samples/**/*.csproj" />
<include name="Samples/**/*.csproj" unless="${project.anx.metro}"/>
<exclude name="**/*_Linux.csproj" />
<exclude name="**/*_PSVita.csproj" />
<exclude name="**/*_WindowsMetro.csproj" />
<!--
<exclude name="Samples/**/*.csproj" if="${project.anx.metro}" />
-->