daily update on 20250122 by nitload youmu, architect rearrange

This commit is contained in:
Nitload
2025-01-22 11:34:49 +08:00
parent 6cfaa42ff3
commit 190d67a034
192 changed files with 25177 additions and 3156 deletions
@@ -29,7 +29,7 @@
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
using StgSharp;
using StgSharp.Data;
using StgSharp.Internal;
using System;
using System.Collections.Generic;
@@ -86,8 +86,8 @@ namespace StgSharp.Graphics.OpenGL
/// <summary>
/// Attach one shader code to a shader program.
/// </summary>
/// <param name="target"> Shader program to attach </param>
/// <param name="index"> Index of shader code in current shader code set. </param>
/// <param _name="target"> Shader program to attach </param>
/// <param _name="index"> Index of shader code in current shader code set. </param>
[MethodImpl( MethodImplOptions.AggressiveInlining )]
public void AttachTo( int index, ShaderProgram target )
{
@@ -160,7 +160,7 @@ namespace StgSharp.Graphics.OpenGL
public enum ShaderStatus : int
{
CompileStatus = GLconst.COMPILE_STATUS,
CompileStatus = glConst.COMPILE_STATUS,
}
@@ -182,7 +182,7 @@ namespace StgSharp.Graphics.OpenGL
/// <summary>
/// Get a uniform form current shader, the value type of the uniform should be provided.
/// </summary>
/// <param name="name"> ContextName of the Uniform in shader code </param>
/// <param _name="name"> ContextName of the Uniform in shader code </param>
/// <returns></returns>
[MethodImpl( MethodImplOptions.AggressiveInlining )]
public unsafe Uniform<T> GetUniform<T>( string name ) where T: struct
@@ -193,7 +193,7 @@ namespace StgSharp.Graphics.OpenGL
/// <summary>
/// Get a uniform form current shader, the value type of the uniform should be provided.
/// </summary>
/// <param name="name"> ContextName of the Uniform in shader code </param>
/// <param _name="name"> ContextName of the Uniform in shader code </param>
/// <returns></returns>
public unsafe Uniform<T, U> GetUniform<T, U>( string name )
where T: struct
@@ -206,7 +206,7 @@ namespace StgSharp.Graphics.OpenGL
/// <summary>
/// Get a uniform form current shader, the value type of the uniform should be provided.
/// </summary>
/// <param name="name"> ContextName of the Uniform in shader code </param>
/// <param _name="name"> ContextName of the Uniform in shader code </param>
/// <returns></returns>
public unsafe Uniform<T, U, V> GetUniform<T, U, V>( string name )
where T: struct
@@ -220,7 +220,7 @@ namespace StgSharp.Graphics.OpenGL
/// <summary>
/// Get a uniform form current shader, the value type of the uniform should be provided.
/// </summary>
/// <param name="name"> ContextName of the Uniform in shader code </param>
/// <param _name="name"> ContextName of the Uniform in shader code </param>
/// <returns></returns>
public unsafe Uniform<T, U, V, W> GetUniform<T, U, V, W>( string name )
where T: struct
@@ -33,6 +33,7 @@ using StgSharp.Math;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -129,7 +130,7 @@ namespace StgSharp.Graphics.OpenGL
{
[MethodImpl( MethodImplOptions.AggressiveInlining )]
public void SetUniformValue( Uniform<Matrix44> uniform, Matrix44 mat )
public void SetUniformValue( [NotNull] Uniform<Matrix44> uniform, Matrix44 mat )
{
Matrix44 temp = mat;
Context.glUniformMatrix4fv(
@@ -138,35 +139,35 @@ namespace StgSharp.Graphics.OpenGL
[MethodImpl( MethodImplOptions.AggressiveInlining )]
public void SetUniformValue(
Uniform<float, float, float, float> uniform,
[NotNull]Uniform<float, float, float, float> uniform,
Vec4 vec )
{
Vec4 temp = vec;
Context.glUniform1fv( uniform.id.SignedValue, 4, &temp );
Context.glUniform1fv( uniform.id.SignedValue, 4, &temp.reg );
}
[MethodImpl( MethodImplOptions.AggressiveInlining )]
public void SetUniformValue( Uniform<Vec4> uniform, Vec4 vec )
public void SetUniformValue( [NotNull]Uniform<Vec4> uniform, Vec4 vec )
{
Vec4 temp = vec;
Context.glUniform1fv( uniform.id.SignedValue, 4, &temp );
Context.glUniform1fv( uniform.id.SignedValue, 4, &temp.reg );
}
[MethodImpl( MethodImplOptions.AggressiveInlining )]
public void SetUniformValue( Uniform<float> uniform, float v0 )
public void SetUniformValue( [NotNull]Uniform<float> uniform, float v0 )
{
Context.glUniform1f( uniform.id.SignedValue, v0 );
}
[MethodImpl( MethodImplOptions.AggressiveInlining )]
public void SetUniformValue( Uniform<int> uniform, int i0 )
public void SetUniformValue( [NotNull]Uniform<int> uniform, int i0 )
{
Context.glUniform1i( uniform.id.SignedValue, i0 );
}
[MethodImpl( MethodImplOptions.AggressiveInlining )]
public void SetUniformValue(
Uniform<float, float> uniform,
[NotNull] Uniform<float, float> uniform,
float v0,
float v1 )
{
@@ -175,7 +176,7 @@ namespace StgSharp.Graphics.OpenGL
[MethodImpl( MethodImplOptions.AggressiveInlining )]
public void SetUniformValue(
Uniform<float, float, float> uniform,
[NotNull] Uniform<float, float, float> uniform,
float v0,
float v1,
float v2 )
@@ -185,7 +186,7 @@ namespace StgSharp.Graphics.OpenGL
[MethodImpl( MethodImplOptions.AggressiveInlining )]
public void SetUniformValue(
Uniform<float, float, float, float> uniform,
[NotNull] Uniform<float, float, float, float> uniform,
float v0,
float v1,
float v2,