mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2026-08-15 02:57:49 +04:00
fpopov thanks
This commit is contained in:
@@ -13,6 +13,7 @@ public class TexmExplorerViewModel
|
||||
|
||||
public string? Path { get; set; }
|
||||
public List<OpenGlTexture> GlTextures { get; set; } = [];
|
||||
public List<byte[]> RgbaBytesByMipmap { get; set; } = [];
|
||||
|
||||
private bool _glTexturesDirty = false;
|
||||
public bool IsWhiteBgEnabled;
|
||||
@@ -48,11 +49,14 @@ public class TexmExplorerViewModel
|
||||
}
|
||||
|
||||
GlTextures.Clear();
|
||||
RgbaBytesByMipmap.Clear();
|
||||
|
||||
for (var i = 0; i < TexmFile!.Header.MipmapCount; i++)
|
||||
for (var i = 0; i < TexmFile.Header.MipmapCount; i++)
|
||||
{
|
||||
var bytes = TexmFile.GetRgba32BytesFromMipmap(i, out var width, out var height);
|
||||
|
||||
RgbaBytesByMipmap.Add(bytes);
|
||||
|
||||
var glTexture = new OpenGlTexture(
|
||||
gl,
|
||||
width,
|
||||
|
||||
Reference in New Issue
Block a user