daily update on 20240209 by nitload youmu

This commit is contained in:
Nitload
2024-02-09 23:31:33 +08:00
parent 6fe6b3b3cf
commit 8391569482
159 changed files with 948 additions and 2431 deletions
@@ -17,12 +17,11 @@ namespace StgSharp.Graphics
internal Image[] sourceList;
private IglFunc GL;
internal Texture(uint n, IglFunc gl)
internal Texture(int n, IglFunc gl)
{
_textureHandle = new glHandleSet((int)n);
sourceList = new Image[n];
GL = gl;
GL.GenTextures(n, _textureHandle);
_textureHandle = GL.GenTextures(n);
}
public void Activate(TextureUnit unit)
@@ -65,10 +64,10 @@ namespace StgSharp.Graphics
channel = 0;
break;
}
GL.TextureImage2d(
GL.TextureImage2d<byte>(
GLconst.TEXTURE_2D, 0, channel,
(uint)sourceList[index].Width, (uint)sourceList[index].Height,
channel, GLconst.UNSIGNED_BYTE, (byte*)sourceList[index].info.pixelPtr
channel, GLconst.UNSIGNED_BYTE, sourceList[index].pixelArray
);
}
else