daily update on 20240209 by nitload youmu
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user