daily update on 20240226 by nitload youmu
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using StgSharp.Math;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
@@ -9,7 +10,6 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Graphics
|
||||
{
|
||||
|
||||
public unsafe class Texture
|
||||
{
|
||||
internal static bool[] unitActivated = new bool[16];
|
||||
@@ -43,10 +43,7 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
Image.ImageInfo info = default;
|
||||
InternalIO.InternalLoadImage(name, &info, loader);
|
||||
Console.WriteLine(info);
|
||||
sourceList[index] = new Image(info);
|
||||
InternalIO.InternalUnloadImage(&info);
|
||||
Console.WriteLine(sourceList[index]);
|
||||
if (sourceList[index].info.pixelPtr != IntPtr.Zero)
|
||||
{
|
||||
uint channel;
|
||||
@@ -67,7 +64,8 @@ namespace StgSharp.Graphics
|
||||
GL.TextureImage2d<byte>(
|
||||
GLconst.TEXTURE_2D, 0, channel,
|
||||
(uint)sourceList[index].Width, (uint)sourceList[index].Height,
|
||||
channel, GLconst.UNSIGNED_BYTE, sourceList[index].pixelArray
|
||||
channel, GLconst.UNSIGNED_BYTE,
|
||||
sourceList[index].pixelArrayHandle
|
||||
);
|
||||
}
|
||||
else
|
||||
@@ -81,7 +79,7 @@ namespace StgSharp.Graphics
|
||||
GL = gl;
|
||||
}
|
||||
|
||||
#region texture set
|
||||
#region texture setting
|
||||
|
||||
public void Set2dFilterProperty(
|
||||
Filter onMinify, Filter onMagnify)
|
||||
@@ -97,7 +95,7 @@ namespace StgSharp.Graphics
|
||||
GL.TextureParameter(GLconst.TEXTURE_2D, GLconst.TEXTURE_WRAP_T, (int)onVertical);
|
||||
}
|
||||
|
||||
#endregion texture set
|
||||
#endregion texture setting
|
||||
}
|
||||
|
||||
public enum Filter
|
||||
@@ -137,4 +135,4 @@ namespace StgSharp.Graphics
|
||||
ClampToEdge = GLconst.CLAMP_TO_EDGE,
|
||||
ClampToBorder = GLconst.CLAMP_TO_BORDER,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user