daily update on 20240325 by nitload youmu

This commit is contained in:
YoumuLiu
2024-03-25 09:26:53 +08:00
parent 9a10ec201c
commit 02be081eee
142 changed files with 11277 additions and 572 deletions
@@ -42,7 +42,7 @@ namespace StgSharp.Graphics
public class Uniform<T> where T : struct
{
private IglFunc GL;
private Form binding;
internal glSHandle id;
internal unsafe Uniform(glSHandle id)
@@ -51,10 +51,10 @@ namespace StgSharp.Graphics
}
internal unsafe Uniform(
ShaderProgram program, string name, IglFunc gl)
ShaderProgram program, string name, Form binding)
{
GL = gl;
id = GL.GetUniformLocation(program.handle, name);
this.binding = binding;
id = binding.GL.GetUniformLocation(program.handle, name);
}
}
@@ -64,7 +64,7 @@ namespace StgSharp.Graphics
where U : struct
{
private IglFunc GL;
private Form binding;
internal glSHandle id;
internal unsafe Uniform(glSHandle id)
@@ -73,10 +73,10 @@ namespace StgSharp.Graphics
}
internal unsafe Uniform(
ShaderProgram program, string name, IglFunc gl)
ShaderProgram program, string name, Form binding)
{
GL = gl;
id = GL.GetUniformLocation(program.handle, name);
this.binding = binding;
id = binding.GL.GetUniformLocation(program.handle, name);
}
}
@@ -87,7 +87,7 @@ namespace StgSharp.Graphics
where V : struct
{
private IglFunc GL;
private Form binding;
internal glSHandle id;
internal unsafe Uniform(glSHandle id)
@@ -95,10 +95,10 @@ namespace StgSharp.Graphics
this.id = id;
}
public unsafe Uniform(ShaderProgram program, string name, IglFunc gl)
public unsafe Uniform(ShaderProgram program, string name, Form binding)
{
GL = gl;
id = GL.GetUniformLocation(program.handle, name);
this.binding = binding;
id = binding.GL.GetUniformLocation(program.handle, name);
}
}
@@ -110,7 +110,7 @@ namespace StgSharp.Graphics
where W : struct
{
private IglFunc GL;
private Form binding;
internal glSHandle id;
internal unsafe Uniform(glSHandle id)
@@ -118,10 +118,10 @@ namespace StgSharp.Graphics
this.id = id;
}
internal unsafe Uniform(ShaderProgram program, string name, IglFunc gl)
internal unsafe Uniform(ShaderProgram program, string name, Form binding)
{
GL = gl;
id = GL.GetUniformLocation(program.handle, name);
this.binding = binding;
id = binding.GL.GetUniformLocation(program.handle, name);
}
}
@@ -281,8 +281,8 @@ namespace StgSharp.Graphics
unsafe void IglFunc.SetValue(Uniform<Vec4d> uniform, Vec4d vec)
{
Vec4d m = vec;
frameOpBuffer.ParamEnqueue((IntPtr)uniform.id.valuePtr, (IntPtr)(&m));
frameOpBuffer.ParamEnqueue((IntPtr)uniform.id.valuePtr);
frameOpBuffer.ParamEnqueue(vec);
frameOpBuffer.MethodEnqueue(UniformVal1fvPtr);
}