XNAEXT: added a ConstantBuffer class and interfaces to the RenderSystem. Everything compiles fine but the RenderSystem does not create unmanaged buffers because it needs to be implemented.

This commit is contained in:
Glatzemann 2012-08-29 10:48:21 +00:00
parent 286ffe38c1
commit de0232177e
33 changed files with 359 additions and 40 deletions

View File

@ -211,6 +211,7 @@
<Compile Include="GameWindow.cs" />
<Compile Include="GraphicsDeviceInformation.cs" />
<Compile Include="Graphics\BasicEffect.cs" />
<Compile Include="Graphics\ConstantBuffer.cs" />
<Compile Include="Graphics\DeviceLostException.cs" />
<Compile Include="Graphics\DisplayMode.cs" />
<Compile Include="Graphics\DisplayModeCollection.cs" />
@ -437,6 +438,7 @@
<Compile Include="NonXNA\PlatformSystem\INativeContentManager.cs" />
<Compile Include="NonXNA\PlatformSystem\INativeMediaLibrary.cs" />
<Compile Include="NonXNA\Reflection\AssemblyLoader.cs" />
<Compile Include="NonXNA\RenderSystem\INativeConstantBuffer.cs" />
<Compile Include="NonXNA\SoundSystem\IMicrophone.cs" />
<Compile Include="NonXNA\Windows8\AssetsHelper.cs" />
<Compile Include="NonXNA\Windows8\IServiceProvider.cs" />

View File

@ -214,6 +214,7 @@
<Compile Include="GameWindow.cs" />
<Compile Include="GraphicsDeviceInformation.cs" />
<Compile Include="Graphics\BasicEffect.cs" />
<Compile Include="Graphics\ConstantBuffer.cs" />
<Compile Include="Graphics\DeviceLostException.cs" />
<Compile Include="Graphics\DisplayMode.cs" />
<Compile Include="Graphics\DisplayModeCollection.cs" />
@ -417,6 +418,7 @@
<Compile Include="NonXNA\AddInType.cs" />
<Compile Include="NonXNA\Development\TestStateAttribute.cs" />
<Compile Include="NonXNA\Development\PercentageCompleteAttribute.cs" />
<Compile Include="NonXNA\EffectSourceLanguage.cs" />
<Compile Include="NonXNA\InputDeviceFactory.cs" />
<Compile Include="NonXNA\InputSystem\IGamePadCreator.cs" />
<Compile Include="NonXNA\InputSystem\IKeyboard.cs" />
@ -439,6 +441,7 @@
<Compile Include="NonXNA\PlatformSystem\INativeContentManager.cs" />
<Compile Include="NonXNA\PlatformSystem\INativeMediaLibrary.cs" />
<Compile Include="NonXNA\Reflection\AssemblyLoader.cs" />
<Compile Include="NonXNA\RenderSystem\INativeConstantBuffer.cs" />
<Compile Include="NonXNA\SoundSystem\IMicrophone.cs" />
<Compile Include="NonXNA\Windows8\AssetsHelper.cs" />
<Compile Include="NonXNA\Windows8\IServiceProvider.cs" />

View File

@ -0,0 +1,139 @@
#region Using Statements
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ANX.Framework.NonXNA.Development;
using ANX.Framework.NonXNA;
using ANX.Framework.NonXNA.RenderSystem;
#endregion
// 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 ANX.Framework.Graphics
{
#if XNAEXT
[PercentageComplete(10)]
[TestState(TestStateAttribute.TestState.Untested)]
public class ConstantBuffer : GraphicsResource, IGraphicsResource
{
#region Private
private BufferUsage bufferUsage;
private INativeConstantBuffer nativeConstantBuffer;
#endregion
#region Public
internal INativeConstantBuffer NativeConstantBuffer
{
get
{
if (this.nativeConstantBuffer == null)
{
CreateNativeBuffer();
}
return this.nativeConstantBuffer;
}
}
public BufferUsage BufferUsage
{
get
{
return this.bufferUsage;
}
}
#endregion
#region Constructor
public ConstantBuffer(GraphicsDevice graphicsDevice, BufferUsage usage)
: base(graphicsDevice)
{
this.bufferUsage = usage;
base.GraphicsDevice.ResourceCreated += GraphicsDevice_ResourceCreated;
base.GraphicsDevice.ResourceDestroyed += GraphicsDevice_ResourceDestroyed;
CreateNativeBuffer();
}
~ConstantBuffer()
{
Dispose();
base.GraphicsDevice.ResourceCreated -= GraphicsDevice_ResourceCreated;
base.GraphicsDevice.ResourceDestroyed -= GraphicsDevice_ResourceDestroyed;
}
#endregion
#region GraphicsDevice_ResourceDestroyed
private void GraphicsDevice_ResourceDestroyed(object sender, ResourceDestroyedEventArgs e)
{
if (nativeConstantBuffer != null)
{
nativeConstantBuffer.Dispose();
nativeConstantBuffer = null;
}
}
#endregion
#region GraphicsDevice_ResourceCreated
private void GraphicsDevice_ResourceCreated(object sender, ResourceCreatedEventArgs e)
{
if (nativeConstantBuffer != null)
{
nativeConstantBuffer.Dispose();
nativeConstantBuffer = null;
}
CreateNativeBuffer();
}
#endregion
#region CreateNativeBuffer
private void CreateNativeBuffer()
{
this.nativeConstantBuffer = AddInSystemFactory.Instance.GetDefaultCreator<IRenderSystemCreator>().CreateConstantBuffer(GraphicsDevice, this, bufferUsage);
}
#endregion
#region GetData
public void GetData<T>(T data) where T : struct
{
NativeConstantBuffer.GetData(data);
}
public void GetData<T>(T[] data, int startIndex, int elementCount)
where T : struct
{
NativeConstantBuffer.GetData(data, startIndex, elementCount);
}
#endregion
#region SetData
public void SetData<T>(T data) where T : struct
{
NativeConstantBuffer.SetData(GraphicsDevice, data);
}
#endregion
#region Dispose
public override void Dispose()
{
if (nativeConstantBuffer != null)
{
nativeConstantBuffer.Dispose();
nativeConstantBuffer = null;
}
}
#endregion
}
#endif
}

View File

@ -198,6 +198,34 @@ namespace ANX.Framework.Graphics
#endregion // DrawUserPrimitives<T>
#if XNAEXT
#region SetConstantBuffer
/// <summary>
/// Binds a ConstantBuffer to the current GraphicsDevice
/// </summary>
/// <param name="slot">The index of the constant buffer used in the shader</param>
/// <param name="constantBuffer">The managed constant buffer object to bind.</param>
public void SetConstantBuffer(int slot, ConstantBuffer constantBuffer)
{
this.nativeDevice.SetConstantBuffer(slot, constantBuffer);
}
/// <summary>
/// Binds ConstantBuffer objects to the current GraphicsDevice.
/// </summary>
/// <param name="constantBuffers">The array of managed constant buffer objects to bind.</param>
/// <remarks>The constant buffer objects are bound in the order found in the passed array.</remarks>
public void SetConstantBuffers(params ConstantBuffer[] constantBuffers)
{
for (int slot = 0; slot < constantBuffers.Length; slot++)
{
this.nativeDevice.SetConstantBuffer(slot, constantBuffers[slot]);
}
}
#endregion
#endif
#region SetVertexBuffer
public void SetVertexBuffer(VertexBuffer vertexBuffer)
{

View File

@ -0,0 +1,24 @@
#region Using Statements
using System;
using System.IO;
using ANX.Framework.Graphics;
#endregion
// 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 ANX.Framework.NonXNA.RenderSystem
{
#if XNAEXT
public interface INativeConstantBuffer : INativeBuffer
{
void GetData<T>(T data) where T : struct;
void SetData<T>(GraphicsDevice graphicsDevice, T data) where T : struct;
}
#endif
}

View File

@ -27,6 +27,10 @@ namespace ANX.Framework.NonXNA
void DrawPrimitives(PrimitiveType primitiveType, int vertexOffset, int primitiveCount);
#if XNAEXT
void SetConstantBuffer(int slot, ConstantBuffer constantBuffer);
#endif
void SetVertexBuffers(VertexBufferBinding[] vertexBuffers);
void SetIndexBuffer(IndexBuffer indexBuffer);

View File

@ -30,6 +30,10 @@ namespace ANX.Framework.NonXNA
VertexBuffer managedBuffer, VertexDeclaration vertexDeclaration,
int vertexCount, BufferUsage usage);
#if XNAEXT
INativeConstantBuffer CreateConstantBuffer(GraphicsDevice graphics, ConstantBuffer managedBuffer, BufferUsage usage);
#endif
INativeEffect CreateEffect(GraphicsDevice graphics, Effect managedEffect,
Stream byteCode);
INativeEffect CreateEffect(GraphicsDevice graphics, Effect managedEffect,

View File

@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>TRACE;DEBUG;XNAEXT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
@ -28,7 +28,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;XNAEXT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
@ -36,10 +36,11 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWin8|AnyCPU'">
<OutputPath>bin\DebugWin8\</OutputPath>
<DefineConstants>XNAEXT</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin8|AnyCPU'">
<OutputPath>bin\ReleaseWin8\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;XNAEXT</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>

View File

@ -20,7 +20,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;WINDOWSMETRO;</DefineConstants>
<DefineConstants>XNAEXT;DEBUG;TRACE;WINDOWSMETRO;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
@ -30,7 +30,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\bin\Release\</OutputPath>
<DefineConstants>TRACE;WINDOWSMETRO;</DefineConstants>
<DefineConstants>XNAEXT;TRACE;WINDOWSMETRO;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
@ -38,10 +38,11 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWin8|AnyCPU'">
<OutputPath>bin\DebugWin8\</OutputPath>
<DefineConstants>XNAEXT;WINDOWSMETRO;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin8|AnyCPU'">
<OutputPath>bin\ReleaseWin8\</OutputPath>
<DefineConstants>TRACE;WINDOWSMETRO;</DefineConstants>
<DefineConstants>XNAEXT;TRACE;WINDOWSMETRO;</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>

View File

@ -55,10 +55,22 @@ namespace ANX.RenderSystem.Windows.DX10
VertexDeclaration vertexDeclaration, int vertexCount, BufferUsage usage)
{
PreventSystemChange();
return new VertexBuffer_DX10(graphics, vertexDeclaration, vertexCount, usage);
return new VertexBuffer_DX10(graphics, vertexDeclaration, vertexCount, usage);
}
public INativeEffect CreateEffect(GraphicsDevice graphics, Effect managedEffect, Stream vertexShaderByteCode,
#if XNAEXT
#region CreateConstantBuffer
public INativeConstantBuffer CreateConstantBuffer(GraphicsDevice graphics, ConstantBuffer managedBuffer, BufferUsage usage)
{
PreventSystemChange();
throw new NotImplementedException();
}
#endregion
#endif
public INativeEffect CreateEffect(GraphicsDevice graphics, Effect managedEffect, Stream vertexShaderByteCode,
Stream pixelShaderByteCode)
{
PreventSystemChange();

View File

@ -21,6 +21,7 @@ namespace ANX.RenderSystem.Windows.DX10
{
public class Effect_DX10 : INativeEffect
{
#region Private Members
private ShaderBytecode pixelShaderByteCode;
private ShaderBytecode vertexShaderByteCode;
private VertexShader vertexShader;
@ -29,6 +30,8 @@ namespace ANX.RenderSystem.Windows.DX10
private ShaderBytecode effectByteCode;
private SharpDX.Direct3D10.Effect nativeEffect;
#endregion
public Effect_DX10(GraphicsDevice device, ANX.Framework.Graphics.Effect managedEffect, Stream vertexShaderByteCode, Stream pixelShaderByteCode)
{
if (this.managedEffect == null)

View File

@ -455,6 +455,18 @@ namespace ANX.RenderSystem.Windows.DX10
}
}
#if XNAEXT
public void SetConstantBuffer(int slot, ANX.Framework.Graphics.ConstantBuffer constantBuffer)
{
if (constantBuffer == null)
{
throw new ArgumentNullException("constantBuffer");
}
throw new NotImplementedException();
}
#endif
public void SetVertexBuffers(VertexBufferBinding[] vertexBuffers)
{
if (vertexBuffers == null)

View File

@ -32,7 +32,7 @@ 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.7.15.0")]
[assembly: AssemblyFileVersion("0.7.15.0")]
[assembly: AssemblyVersion("0.7.16.0")]
[assembly: AssemblyFileVersion("0.7.16.0")]
[assembly: InternalsVisibleTo("ANX.Framework.ContentPipeline")]

View File

@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>TRACE;DEBUG;XNAEXT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
@ -29,7 +29,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;XNAEXT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>

View File

@ -20,7 +20,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;WINDOWSMETRO;</DefineConstants>
<DefineConstants>XNAEXT;DEBUG;TRACE;WINDOWSMETRO;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
@ -31,7 +31,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\Release\</OutputPath>
<DefineConstants>TRACE;WINDOWSMETRO;</DefineConstants>
<DefineConstants>XNAEXT;TRACE;WINDOWSMETRO;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>

View File

@ -142,6 +142,18 @@ namespace ANX.RenderSystem.Windows.GL3
}
#endregion
#if XNAEXT
#region CreateConstantBuffer
public INativeConstantBuffer CreateConstantBuffer(GraphicsDevice graphics, ConstantBuffer managedBuffer, BufferUsage usage)
{
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
throw new NotImplementedException();
}
#endregion
#endif
#region CreateBlendState
/// <summary>
/// Create a new native blend state.

View File

@ -371,6 +371,18 @@ namespace ANX.RenderSystem.Windows.GL3
}
#endregion
#if XNAEXT
public void SetConstantBuffer(int slot, ANX.Framework.Graphics.ConstantBuffer constantBuffer)
{
if (constantBuffer == null)
{
throw new ArgumentNullException("constantBuffer");
}
throw new NotImplementedException();
}
#endif
#region SetVertexBuffers
public void SetVertexBuffers(VertexBufferBinding[] vertexBuffers)
{

View File

@ -32,7 +32,7 @@ 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.5.10.0")]
[assembly: AssemblyFileVersion("0.5.10.0")]
[assembly: AssemblyVersion("0.5.11.0")]
[assembly: AssemblyFileVersion("0.5.11.0")]
[assembly: InternalsVisibleTo("ANX.Framework.ContentPipeline")]

View File

@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>TRACE;DEBUG;XNAEXT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@ -26,7 +26,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;XNAEXT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>

View File

@ -20,7 +20,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;WINDOWSMETRO;</DefineConstants>
<DefineConstants>XNAEXT;DEBUG;TRACE;WINDOWSMETRO;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@ -28,7 +28,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;WINDOWSMETRO;</DefineConstants>
<DefineConstants>XNAEXT;TRACE;WINDOWSMETRO;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>

View File

@ -66,8 +66,17 @@ namespace ANX.RenderSystem.PsVita
}
#endregion
#region CreateTexture
public INativeTexture2D CreateTexture(GraphicsDevice graphics,
#if XNAEXT
#region CreateConstantBuffer
public INativeConstantBuffer CreateConstantBuffer(GraphicsDevice graphics, ConstantBuffer managedBuffer, BufferUsage usage)
{
throw new NotImplementedException();
}
#endregion
#endif
#region CreateTexture
public INativeTexture2D CreateTexture(GraphicsDevice graphics,
SurfaceFormat surfaceFormat, int width, int height, int mipCount)
{
return new PsVitaTexture2D(surfaceFormat, width, height, mipCount);

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("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("0.1.1.0")]
[assembly: AssemblyFileVersion("0.1.1.0")]

View File

@ -138,6 +138,13 @@ namespace ANX.RenderSystem.PsVita
throw new NotImplementedException();
}
#if XNAEXT
public void SetConstantBuffer(int slot, ConstantBuffer constantBuffer)
{
throw new NotImplementedException();
}
#endif
public void SetVertexBuffers(VertexBufferBinding[] vertexBuffers)
{
throw new NotImplementedException();

View File

@ -20,7 +20,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>TRACE;DEBUG;XNAEXT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@ -30,7 +30,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;XNAEXT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@ -40,10 +40,11 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWin8|x86'">
<OutputPath>bin\x86\DebugWin8\</OutputPath>
<DefineConstants>XNAEXT</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin8|x86'">
<OutputPath>bin\x86\ReleaseWin8\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;XNAEXT</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>

View File

@ -21,7 +21,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;WINDOWSMETRO;</DefineConstants>
<DefineConstants>XNAEXT;DEBUG;TRACE;WINDOWSMETRO;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@ -31,7 +31,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\bin\Release\</OutputPath>
<DefineConstants>TRACE;WINDOWSMETRO;</DefineConstants>
<DefineConstants>XNAEXT;TRACE;WINDOWSMETRO;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@ -41,10 +41,11 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWin8|x86'">
<OutputPath>bin\x86\DebugWin8\</OutputPath>
<DefineConstants>XNAEXT;WINDOWSMETRO;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin8|x86'">
<OutputPath>bin\x86\ReleaseWin8\</OutputPath>
<DefineConstants>TRACE;WINDOWSMETRO;</DefineConstants>
<DefineConstants>XNAEXT;TRACE;WINDOWSMETRO;</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>

View File

@ -62,6 +62,17 @@ namespace ANX.RenderSystem.Windows.DX11
return new VertexBuffer_DX11(graphics, vertexDeclaration, vertexCount, usage);
}
#if XNAEXT
#region CreateConstantBuffer
public INativeConstantBuffer CreateConstantBuffer(GraphicsDevice graphics, ConstantBuffer managedBuffer, BufferUsage usage)
{
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);
throw new NotImplementedException();
}
#endregion
#endif
public INativeEffect CreateEffect(GraphicsDevice graphics, ANX.Framework.Graphics.Effect managedEffect, Stream vertexShaderByteCode, Stream pixelShaderByteCode)
{
AddInSystemFactory.Instance.PreventSystemChange(AddInType.RenderSystem);

View File

@ -457,6 +457,18 @@ namespace ANX.RenderSystem.Windows.DX11
}
}
#if XNAEXT
public void SetConstantBuffer(int slot, ANX.Framework.Graphics.ConstantBuffer constantBuffer)
{
if (constantBuffer == null)
{
throw new ArgumentNullException("constantBuffer");
}
throw new NotImplementedException();
}
#endif
public void SetVertexBuffers(ANX.Framework.Graphics.VertexBufferBinding[] vertexBuffers)
{
if (vertexBuffers == null)

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Buildnummer
// Revision
//
[assembly: AssemblyVersion("0.7.7.0")]
[assembly: AssemblyFileVersion("0.7.7.0")]
[assembly: AssemblyVersion("0.7.8.0")]
[assembly: AssemblyFileVersion("0.7.8.0")]

View File

@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DefineConstants>TRACE;DEBUG;XNAEXT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@ -27,7 +27,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;XNAEXT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

View File

@ -20,7 +20,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;WINDOWSMETRO;</DefineConstants>
<DefineConstants>XNAEXT;DEBUG;TRACE;WINDOWSMETRO;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@ -29,7 +29,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\bin\Release\</OutputPath>
<DefineConstants>TRACE;WINDOWSMETRO;</DefineConstants>
<DefineConstants>XNAEXT;TRACE;WINDOWSMETRO;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

View File

@ -65,8 +65,17 @@ namespace ANX.RenderSystem.Windows.Metro
}
#endregion
#region CreateEffect
public INativeEffect CreateEffect(GraphicsDevice graphics,
#if XNAEXT
#region CreateConstantBuffer
public INativeConstantBuffer CreateConstantBuffer(GraphicsDevice graphics, ConstantBuffer managedBuffer, BufferUsage usage)
{
throw new NotImplementedException();
}
#endregion
#endif
#region CreateEffect
public INativeEffect CreateEffect(GraphicsDevice graphics,
Effect managedEffect, Stream vertexShaderByteCode, Stream pixelShaderByteCode)
{
return new Effect_Metro(graphics, managedEffect,

View File

@ -254,6 +254,18 @@ namespace ANX.RenderSystem.Windows.Metro
}
#endregion
#if XNAEXT
public void SetConstantBuffer(int slot, ANX.Framework.Graphics.ConstantBuffer constantBuffer)
{
if (constantBuffer == null)
{
throw new ArgumentNullException("constantBuffer");
}
throw new NotImplementedException();
}
#endif
#region SetVertexBuffers
public void SetVertexBuffers(VertexBufferBinding[] vertexBuffers)
{

View File

@ -24,5 +24,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.3.0")]
[assembly: AssemblyFileVersion("0.0.3.0")]
[assembly: AssemblyVersion("0.0.4.0")]
[assembly: AssemblyFileVersion("0.0.4.0")]