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