daily update on 20240111 by nitload youmu

This commit is contained in:
Nitload
2024-01-11 09:17:26 +08:00
parent 2767c91293
commit 8148c10acd
97 changed files with 298 additions and 86475 deletions
+10 -19
View File
@@ -12,21 +12,16 @@ using System.Threading.Tasks;
namespace StgSharp.Graphics
{
using glMetaData = (
int i0, int i1, int i2, int i3,
double d0, double d1, double d2, double d3,
IntPtr p0, IntPtr p1, IntPtr p2, IntPtr p3
);
internal unsafe partial class GLonUpdate : IglFunc
{
internal GLcontext* api;
private ConcurrentQueue<Action> glActionQueue;
internal GLonUpdateInternal glUpdateInternal;
private ConcurrentQueue<IntPtr> glActionQueue;
private ConcurrentQueue<Vec4d> glParamQueue;
private FrameTimeoutException refreshSignal = new();
private DynamicArrayList<glMetaData> threadBuffer = new DynamicArrayList<glMetaData>(16, default);
ConcurrentQueue<Action<int>> GLactionQueue
internal ConcurrentQueue<IntPtr> GLactionQueue
{
get
{
@@ -37,19 +32,15 @@ namespace StgSharp.Graphics
internal GLonUpdate(GLcontext* context)
{
api = context;
glActionQueue = new ConcurrentQueue<Action>();
glActionQueue.Enqueue(() => { });
glUpdateInternal = new GLonUpdateInternal();
glParamQueue = glUpdateInternal.paramQueue;
glActionQueue = new ConcurrentQueue<IntPtr>();
}
void IglFunc.ActiveTexture(uint type)
{
glActionQueue.Enqueue(
() =>
{
api->glActiveTexture(type);
}
);
glParamQueue.Enqueue(new Vec4d(type));
glActionQueue.Enqueue(glUpdateInternal.ActiveTexturePtr);
}