daily update on 20240407 by nitload youmu

This commit is contained in:
YoumuLiu
2024-04-07 15:08:52 +08:00
parent 127fcdbfd3
commit e1e416bb41
141 changed files with 2578 additions and 2576 deletions
@@ -40,7 +40,6 @@ namespace StgSharp.Graphics
{
public partial class Form
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
protected Shader CreateShader(ShaderType type, int count)
{
@@ -55,17 +54,16 @@ namespace StgSharp.Graphics
{
return new ShaderProgram(this);
}
}
public class Shader
{
private readonly IntPtr context;
internal readonly GLhandle handle;
internal readonly glHandleSet handle;
public readonly ShaderType type;
internal unsafe Shader(uint[] handle, ShaderType usage)
internal unsafe Shader(glHandleSet handle, ShaderType usage)
{
this.handle = handle;
context = (IntPtr)GL.api;
@@ -108,7 +106,7 @@ namespace StgSharp.Graphics
internal readonly glHandle handle;
/// <summary>
/// Inti a shader with no program attached.
/// Init a program with no shader attached.
/// </summary>
internal unsafe ShaderProgram(Form binding)
{
@@ -201,5 +199,10 @@ namespace StgSharp.Graphics
GL.UseProgram(handle);
}
~ShaderProgram()
{
//handle.Dispose();
}
}
}