Texture.cs - Add virtual function 'SetTexture'

This commit is contained in:
miku-666
2024-05-01 19:24:45 +02:00
parent 3e6db64cca
commit 02eec26996
3 changed files with 8 additions and 2 deletions

View File

@@ -17,7 +17,7 @@ namespace PckStudio.Rendering.Texture
Slot = slot;
}
public void SetTexture(Image image)
public override void SetTexture(Image image)
{
Bind();

View File

@@ -1,5 +1,6 @@
using System;
using System.Diagnostics;
using System.Drawing;
using OpenTK;
using OpenTK.Graphics.OpenGL;
@@ -87,6 +88,11 @@ namespace PckStudio.Rendering.Texture
Target = target;
}
public virtual void SetTexture(Image image)
{
throw new NotImplementedException();
}
public void Bind()
{
GL.ActiveTexture(TextureUnit.Texture0 + Slot);

View File

@@ -21,7 +21,7 @@ namespace PckStudio.Rendering.Texture
Unbind();
}
public void SetTexture(Image image)
public override void SetTexture(Image image)
{
Bind();
var bitmap = new Bitmap(image);