- 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:
parent
93a848e883
commit
a9399dd5ec
@ -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);
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user