(3dc4135ce) v0.9.5.1
This commit is contained in:
@@ -57,13 +57,13 @@ namespace Barotrauma
|
||||
});
|
||||
}
|
||||
|
||||
public static Texture2D FromFile(string path, bool preMultiplyAlpha = true)
|
||||
public static Texture2D FromFile(string path, bool preMultiplyAlpha = true, bool mipmap=false)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (Stream fileStream = File.OpenRead(path))
|
||||
{
|
||||
return FromStream(fileStream, preMultiplyAlpha, path);
|
||||
return FromStream(fileStream, preMultiplyAlpha, path, mipmap);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -74,7 +74,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public static Texture2D FromStream(Stream fileStream, bool preMultiplyAlpha = true, string path=null)
|
||||
public static Texture2D FromStream(Stream fileStream, bool preMultiplyAlpha = true, string path=null, bool mipmap=false)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -88,7 +88,7 @@ namespace Barotrauma
|
||||
Texture2D tex = null;
|
||||
CrossThread.RequestExecutionOnMainThread(() =>
|
||||
{
|
||||
tex = new Texture2D(_graphicsDevice, width, height);
|
||||
tex = new Texture2D(_graphicsDevice, width, height, mipmap, SurfaceFormat.Color);
|
||||
tex.SetData(textureData);
|
||||
});
|
||||
return tex;
|
||||
|
||||
Reference in New Issue
Block a user