daily update on 20240427 by nitload youmu

This commit is contained in:
YoumuLiu
2024-04-27 05:09:38 +08:00
parent dd6e8247bf
commit f83a130074
52 changed files with 1470 additions and 271 deletions
@@ -39,10 +39,14 @@ using System.Text;
namespace StgSharp.Graphics
{
public partial class Form
public partial class glRenderStream
{
protected glRenderStream(RenderStreamConstructArgs args) : base(args)
{
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
protected Shader CreateShader(ShaderType type, int count)
protected sealed override Shader CreateShaderSegment(ShaderType type, int count)
{
return new Shader( GL.CreateShaderSet(count, type), type);
}
@@ -51,7 +55,7 @@ namespace StgSharp.Graphics
/// </summary>
/// <returns>New instance of <see cref="Shader"/> instance. </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
protected ShaderProgram CreateShaderProgram()
protected sealed override ShaderProgram CreateShaderProgram()
{
return new ShaderProgram(this);
}
@@ -126,9 +130,9 @@ namespace StgSharp.Graphics
/// <summary>
/// Init a program with no shader attached.
/// </summary>
internal unsafe ShaderProgram(Form binding)
internal unsafe ShaderProgram(glRenderStream binding)
{
this.binding = binding.graphicContextID;
this.binding = binding.ContextHandle;
handle = GL.CreateProgram();
}