mirror of
https://github.com/4sval/FModel.git
synced 2026-03-21 17:24:26 -05:00
Fixes for texture refactor
This commit is contained in:
parent
6dce30b33f
commit
84f5d4d605
|
|
@ -1 +1 @@
|
|||
Subproject commit a5aa9a7551440ce4cd9a0147dbf8757701cae23c
|
||||
Subproject commit 5b38fc685da2f574262d54639f687945660cdf00
|
||||
|
|
@ -759,7 +759,7 @@ public class CUE4ParseViewModel : ViewModel
|
|||
|
||||
break;
|
||||
}
|
||||
case "bin" when fileName.Contains("AssetRegistry"):
|
||||
case "bin" when fileName.Contains("AssetRegistry", StringComparison.OrdinalIgnoreCase):
|
||||
{
|
||||
if (Provider.TryCreateReader(fullPath, out var archive))
|
||||
{
|
||||
|
|
@ -892,7 +892,7 @@ public class CUE4ParseViewModel : ViewModel
|
|||
TabControl.SelectedTab.SetDocumentText(verseDigest.ReadableCode, false, false);
|
||||
return true;
|
||||
}
|
||||
case UTexture2D { IsVirtual: false } texture when isNone || saveTextures:
|
||||
case UTexture { IsVirtual: false } texture when isNone || saveTextures:
|
||||
{
|
||||
TabControl.SelectedTab.AddImage(texture, saveTextures, updateUi);
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -228,8 +228,8 @@ public class TabItem : ViewModel
|
|||
});
|
||||
}
|
||||
|
||||
public void AddImage(UTexture2D texture, bool save, bool updateUi)
|
||||
=> AddImage(texture.Name, texture.bRenderNearestNeighbor, texture.Decode(UserSettings.Default.OverridedPlatform), save, updateUi);
|
||||
public void AddImage(UTexture texture, bool save, bool updateUi)
|
||||
=> AddImage(texture.Name, texture.RenderNearestNeighbor, texture.Decode(UserSettings.Default.OverridedPlatform), save, updateUi);
|
||||
|
||||
public void AddImage(string name, bool rnn, SKBitmap[] img, bool save, bool updateUi)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -440,10 +440,10 @@ public class Model : IDisposable
|
|||
|
||||
public void Dispose()
|
||||
{
|
||||
_ebo.Dispose();
|
||||
_vbo.Dispose();
|
||||
_matrixVbo.Dispose();
|
||||
_vao.Dispose();
|
||||
_ebo?.Dispose();
|
||||
_vbo?.Dispose();
|
||||
_matrixVbo?.Dispose();
|
||||
_vao?.Dispose();
|
||||
Skeleton?.Dispose();
|
||||
for (int socket = 0; socket < Sockets.Count; socket++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ public class Options
|
|||
var guid = o.LightingGuid;
|
||||
if (!Textures.TryGetValue(guid, out texture) && o.GetMipByMaxSize(UserSettings.Default.PreviewMaxTextureSize) is { } mip)
|
||||
{
|
||||
TextureDecoder.DecodeTexture(mip, o.Format, o.isNormalMap, _platform, out var data, out _);
|
||||
TextureDecoder.DecodeTexture(mip, o.Format, o.IsNormalMap, _platform, out var data, out _);
|
||||
|
||||
texture = new Texture(data, mip.SizeX, mip.SizeY, o);
|
||||
if (fix) TextureHelper.FixChannels(_game, texture);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user