Modified code to compile on Linux
This commit is contained in:
@@ -156,7 +156,7 @@ namespace Subsurface
|
||||
public int GetWaveIndex(Vector2 position)
|
||||
{
|
||||
int index = (int)(position.X - rect.X) / WaveWidth;
|
||||
index = MathHelper.Clamp(index, 0, waveY.Length-1);
|
||||
index = (int)MathHelper.Clamp(index, 0, waveY.Length-1);
|
||||
return index;
|
||||
}
|
||||
|
||||
|
||||
@@ -245,7 +245,10 @@ namespace Subsurface.Lights
|
||||
* Matrix.CreateOrthographic(Game1.GraphicsWidth, Game1.GraphicsHeight, -1, 1) * 0.5f;
|
||||
shadowEffect.CurrentTechnique.Passes[0].Apply();
|
||||
|
||||
graphicsDevice.DrawUserPrimitives<VertexPositionTexture>(PrimitiveType.TriangleList, penumbraVertices, 0, 2, VertexPositionTexture.VertexDeclaration);
|
||||
#if WINDOWS
|
||||
graphicsDevice.DrawUserPrimitives<VertexPositionTexture>(PrimitiveType.TriangleList, penumbraVertices, 0, 2, VertexPositionTexture.VertexDeclaration);
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,12 @@ namespace Subsurface
|
||||
{
|
||||
pass.Apply();
|
||||
|
||||
graphicsDevice.DrawUserPrimitives(PrimitiveType.TriangleList, verts, 0, verts.Length / 3, WaterVertex.VertexDeclaration);
|
||||
#if WINDOWS
|
||||
graphicsDevice.DrawUserPrimitives(PrimitiveType.TriangleList, verts, 0, verts.Length / 3, WaterVertex.VertexDeclaration);
|
||||
#endif
|
||||
#if LINUX
|
||||
//graphicsDevice.DrawUserPrimitives(PrimitiveType.TriangleList, verts, 0, verts.Length / 3, WaterVertex.VertexDeclaration, );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,7 +135,9 @@ namespace Subsurface
|
||||
{
|
||||
pass.Apply();
|
||||
|
||||
graphicsDevice.DrawUserPrimitives(PrimitiveType.TriangleList, vertices, 0, vertices.Length / 3, WaterVertex.VertexDeclaration);
|
||||
#if WINDOWS
|
||||
graphicsDevice.DrawUserPrimitives(PrimitiveType.TriangleList, vertices, 0, vertices.Length / 3, WaterVertex.VertexDeclaration);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user