daily update on 20240326 by nitload youmu, removing old MT
This commit is contained in:
@@ -43,7 +43,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Graphics
|
||||
{
|
||||
internal unsafe partial class GLonUpdate : IglFunc
|
||||
internal sealed unsafe partial class GLonUpdate : IglFunc
|
||||
{
|
||||
|
||||
private GLcontext* api;
|
||||
@@ -122,7 +122,7 @@ namespace StgSharp.Graphics
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
void IglFunc.Clear(MaskBufferBit mask)
|
||||
{
|
||||
frameOpBuffer.ParamEnqueue((int)mask);
|
||||
frameOpBuffer.ParamEnqueue((uint)mask);
|
||||
frameOpBuffer.MethodEnqueue(ClearPtr);
|
||||
}
|
||||
|
||||
@@ -350,9 +350,14 @@ namespace StgSharp.Graphics
|
||||
|
||||
void IglFunc.SetBufferData<T>(BufferType bufferType, T[] bufferArray, BufferUsage usage)
|
||||
{
|
||||
T[] copy = new T[bufferArray.Length];
|
||||
lock (bufferArray)
|
||||
{
|
||||
bufferArray.CopyTo(copy, 0);
|
||||
}
|
||||
frameOpBuffer.ParamEnqueue((uint)bufferType, (uint)usage);
|
||||
frameOpBuffer.ParamEnqueue((IntPtr)(Marshal.SizeOf<T>() * bufferArray.Length));
|
||||
frameOpBuffer.ParamEnqueue<T>(bufferArray);
|
||||
frameOpBuffer.ParamEnqueue<T>(copy);
|
||||
frameOpBuffer.MethodEnqueue(BufferDataPtr);
|
||||
}
|
||||
|
||||
@@ -365,10 +370,10 @@ namespace StgSharp.Graphics
|
||||
}
|
||||
|
||||
|
||||
unsafe void IglFunc.TextureImage2d<T>(int target, int level, uint internalformat, uint width, uint height, uint format, uint type, glHandle pixels)
|
||||
unsafe void IglFunc.TextureImage2d<T>(int target, int level, uint internalFormat, uint width, uint height, uint format, uint type, glHandle pixels)
|
||||
{
|
||||
frameOpBuffer.ParamEnqueue(pixels);
|
||||
frameOpBuffer.ParamEnqueue((uint)level, internalformat, width, height);
|
||||
frameOpBuffer.ParamEnqueue((uint)level, internalFormat, width, height);
|
||||
frameOpBuffer.ParamEnqueue((uint)target, format, type);
|
||||
frameOpBuffer.MethodEnqueue(textureImage2dPtr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user