- fixed an issue in EffectReader when not reading ANX-Effects but XNA-like-Effects: 3 bytes at beginning were skipped

This commit is contained in:
Glatzemann 2012-08-25 08:55:22 +00:00
parent 93a848e883
commit a9399dd5ec
2 changed files with 2 additions and 1 deletions

View File

@ -42,6 +42,7 @@ namespace ANX.Framework.Content
// Otherwise fallback on the original effect loading code.
if (magicA != 'A' || magicN != 'N' || magicX != 'X')
{
input.BaseStream.Seek(-3, SeekOrigin.Current);
byte[] effectCode = input.ReadBytes(totalLength);
var memStream = new MemoryStream(effectCode);

View File

@ -65,7 +65,7 @@ namespace ANX.RenderSystem.Windows.DX10
effectByteCode.Seek(0, SeekOrigin.Begin);
}
this.effectByteCode = ShaderBytecode.FromStream(effectByteCode);
this.nativeEffect = new SharpDX.Direct3D10.Effect(((GraphicsDeviceWindowsDX10)device.NativeDevice).NativeDevice, this.effectByteCode);
this.nativeEffect = new SharpDX.Direct3D10.Effect(((GraphicsDeviceWindowsDX10)device.NativeDevice).NativeDevice, this.effectByteCode, EffectFlags.None);
}
public void Apply(GraphicsDevice graphicsDevice)