1
0
mirror of synced 2024-11-28 01:10:51 +01:00

Some fixes for renderable textures

This commit is contained in:
KillzXGaming 2019-06-27 20:58:54 -04:00
parent c52556e8e1
commit 1b72ac47f1
6 changed files with 8 additions and 6 deletions

Binary file not shown.

View File

@ -227,7 +227,7 @@ namespace FirstPlugin
bars = new BarsLib.BARS(stream);
if (bars.AmtaList.Count > 0)
Nodes.Add("AMTA");
Nodes.Add("Meta Data");
if (bars.audioList.Count > 0)
Nodes.Add("Audio");

View File

@ -147,7 +147,7 @@ namespace Switch_Toolbox.Library.Rendering
//While shaders could prevent this, converting is easier and works fine across all editors
if (Runtime.UseDirectXTexDecoder)
{
ImageData.Add(STGenericTexture.DecodeBlock(ImageData[0],
ImageData[0] = (STGenericTexture.DecodeBlock(ImageData[0],
GenericTexture.Width,
GenericTexture.Height,
GenericTexture.Format,
@ -164,7 +164,7 @@ namespace Switch_Toolbox.Library.Rendering
case TEX_FORMAT.BC5_SNORM:
pixelInternalFormat = PixelInternalFormat.CompressedRgRgtc2;
ImageData.Add(DDSCompressor.DecompressBC5(ImageData[0],
ImageData[0] = (DDSCompressor.DecompressBC5(ImageData[0],
(int)GenericTexture.Width, (int)GenericTexture.Height, true, true));
pixelInternalFormat = PixelInternalFormat.Rgba;
pixelFormat = OpenTK.Graphics.OpenGL.PixelFormat.Rgba;
@ -195,11 +195,11 @@ namespace Switch_Toolbox.Library.Rendering
default:
if (Runtime.UseDirectXTexDecoder)
{
ImageData.Add(STGenericTexture.DecodeBlock(ImageData[0],
ImageData[0] = STGenericTexture.DecodeBlock(ImageData[0],
GenericTexture.Width,
GenericTexture.Height,
GenericTexture.Format,
GenericTexture.PlatformSwizzle));
GenericTexture.PlatformSwizzle);
pixelInternalFormat = PixelInternalFormat.Rgba;
pixelFormat = OpenTK.Graphics.OpenGL.PixelFormat.Rgba;

View File

@ -183,9 +183,11 @@ namespace Switch_Toolbox.Library
{
CheckBuffers();
if (!Runtime.OpenTKInitialized || !Runtime.renderBones)
if (!Runtime.OpenTKInitialized || !Runtime.renderBones || !Visible)
return;
Console.WriteLine($"SKEL Visible " + Visible);
SF.Shader shader = OpenTKSharedResources.shaders["BONE"];
shader.UseProgram();