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