Upgraded to MonoGame v0.3.4: rebuilt shaders, removed the old content project, added a default config file

This commit is contained in:
Regalis
2016-02-29 22:06:48 +02:00
parent 1a5b274a01
commit 35c36d283a
59 changed files with 129 additions and 680 deletions

View File

@@ -2,6 +2,7 @@
using System.IO;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
namespace Barotrauma
{
@@ -25,20 +26,20 @@ namespace Barotrauma
get { return waterTexture; }
}
public WaterRenderer(GraphicsDevice graphicsDevice)
public WaterRenderer(GraphicsDevice graphicsDevice, ContentManager content)
{
#if WINDOWS
byte[] bytecode = File.ReadAllBytes("Content/watershader.mgfx");
waterEffect = content.Load<Effect>("watershader");
#endif
#if LINUX
byte[] bytecode = File.ReadAllBytes("Content/watershader_opengl.mgfx");
#endif
waterEffect = new Effect(graphicsDevice, bytecode);
waterEffect = content.Load<Effect>("watershader_opengl");
#endif
waterTexture = TextureLoader.FromFile("Content/waterbump.png");
waterEffect.Parameters["xWaveWidth"].SetValue(0.05f);
waterEffect.Parameters["xWaveHeight"].SetValue(0.05f);
#if WINDOWS
//waterEffect.Parameters["xTexture"].SetValue(waterTexture);
#endif