mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-07-05 15:07:22 +00:00
Texture2D - Fix broken api
This commit is contained in:
@@ -599,7 +599,7 @@ namespace PckStudio.Rendering
|
||||
|
||||
if (e.Cancel)
|
||||
return;
|
||||
skinTexture.LoadImageData(e.NewTexture);
|
||||
skinTexture.SetTexture(e.NewTexture);
|
||||
GLErrorCheck();
|
||||
|
||||
}
|
||||
|
||||
@@ -9,20 +9,9 @@ namespace PckStudio.Rendering.Texture
|
||||
{
|
||||
internal class Texture2D : Texture
|
||||
{
|
||||
public Texture2D(string filepath, int slot)
|
||||
: this(Image.FromFile(filepath), slot)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public OpenTK.Graphics.OpenGL.PixelFormat PixelFormat { get; set; }
|
||||
public PixelInternalFormat InternalPixelFormat { get; set; }
|
||||
|
||||
public Texture2D(Image image, int slot) : this(slot)
|
||||
{
|
||||
LoadImageData(image);
|
||||
}
|
||||
|
||||
public Texture2D(int slot) : this()
|
||||
{
|
||||
Slot = slot;
|
||||
@@ -39,7 +28,7 @@ namespace PckStudio.Rendering.Texture
|
||||
Unbind();
|
||||
}
|
||||
|
||||
public void LoadImageData(Image image)
|
||||
public void SetTexture(Image image)
|
||||
{
|
||||
Bind();
|
||||
var bitmap = new Bitmap(image);
|
||||
|
||||
Reference in New Issue
Block a user