daily update on 20240213 by nitload youmu. 逐步弃用GLFW,正在使用wgl重写glfw底层,相关实现转移到C#实现,SSC彻底变成线性代数计算器。

This commit is contained in:
Nitload
2024-02-13 23:42:22 +08:00
parent 8391569482
commit a2241a5a58
307 changed files with 16701 additions and 10296 deletions
+18 -2
View File
@@ -30,13 +30,29 @@ namespace StgSharp.Graphics
internal Image(ImageInfo information)
{
info = information;
int length = info.width * info.height * info.channel;
pixelArray = new byte[length];
Marshal.Copy(
source: info.pixelPtr,
destination: pixelArray,
startIndex: 0,
length: info.width * info.height * info.channel
length: length
);
Marshal.FreeHGlobal(info.pixelPtr);
}
internal byte[] PixelArray
{
get
{
if (pixelArray == null)
{
pixelArray = new byte[info.width * info.height * info.channel];
Marshal.Copy(source: info.pixelPtr, destination: pixelArray,
startIndex: 0, length: info.width * info.height * info.channel);
Marshal.FreeHGlobal(info.pixelPtr);
}
return pixelArray;
}
}
public unsafe Image()