daily update on 20241002 by nitload youmu, intrinsic function rebuild, syntax style arrange
This commit is contained in:
@@ -52,93 +52,73 @@ namespace StgSharp.Graphics.OpenGL
|
||||
|
||||
}
|
||||
|
||||
public sealed class Uniform<T> : Uniform
|
||||
where T : struct
|
||||
public sealed class Uniform<T> : Uniform where T: struct
|
||||
{
|
||||
|
||||
internal Uniform()
|
||||
{
|
||||
internal Uniform() { }
|
||||
|
||||
}
|
||||
|
||||
internal unsafe Uniform(GlHandle id)
|
||||
internal unsafe Uniform( GlHandle id )
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
internal static Uniform<T> FromHandle(GlHandle handle)
|
||||
internal static Uniform<T> FromHandle( GlHandle handle )
|
||||
{
|
||||
return new Uniform<T> { id = handle };
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public sealed class Uniform<T, U> : Uniform
|
||||
where T : struct
|
||||
where U : struct
|
||||
public sealed class Uniform<T, U> : Uniform where T: struct where U: struct
|
||||
{
|
||||
|
||||
internal Uniform() { }
|
||||
|
||||
|
||||
internal Uniform()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
internal unsafe Uniform(GlHandle id)
|
||||
internal unsafe Uniform( GlHandle id )
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
internal static Uniform<T, U> FromHandle(GlHandle handle)
|
||||
internal static Uniform<T, U> FromHandle( GlHandle handle )
|
||||
{
|
||||
return new Uniform<T, U> { id = handle };
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public sealed class Uniform<T, U, V> : Uniform
|
||||
where T : struct
|
||||
where U : struct
|
||||
where V : struct
|
||||
public sealed class Uniform<T, U, V> : Uniform where T: struct
|
||||
where U: struct
|
||||
where V: struct
|
||||
{
|
||||
|
||||
internal Uniform()
|
||||
{
|
||||
internal Uniform() { }
|
||||
|
||||
}
|
||||
|
||||
internal unsafe Uniform(GlHandle id)
|
||||
internal unsafe Uniform( GlHandle id )
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
internal static Uniform<T, U, V> FromHandle(GlHandle handle)
|
||||
internal static Uniform<T, U, V> FromHandle( GlHandle handle )
|
||||
{
|
||||
return new Uniform<T, U, V> { id = handle };
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public sealed class Uniform<T, U, V, W> : Uniform
|
||||
where T : struct
|
||||
where U : struct
|
||||
where V : struct
|
||||
where W : struct
|
||||
public sealed class Uniform<T, U, V, W> : Uniform where T: struct
|
||||
where U: struct
|
||||
where V: struct
|
||||
where W: struct
|
||||
{
|
||||
|
||||
internal Uniform()
|
||||
{
|
||||
internal Uniform() { }
|
||||
|
||||
}
|
||||
|
||||
|
||||
internal unsafe Uniform(GlHandle id)
|
||||
internal unsafe Uniform( GlHandle id )
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
internal static Uniform<T, U, V, W> FromHandle(GlHandle handle)
|
||||
internal static Uniform<T, U, V, W> FromHandle( GlHandle handle )
|
||||
{
|
||||
return new Uniform<T, U, V, W> { id = handle };
|
||||
}
|
||||
@@ -148,59 +128,71 @@ namespace StgSharp.Graphics.OpenGL
|
||||
public unsafe partial class OpenGLFunction
|
||||
{
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SetUniformValue
|
||||
(Uniform<Matrix44> uniform, Matrix44 mat)
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void SetUniformValue( Uniform<Matrix44> uniform, Matrix44 mat )
|
||||
{
|
||||
Matrix44 temp = mat;
|
||||
Context.glUniformMatrix4fv(uniform.id.SignedValue, 1, false, (float*)&temp);
|
||||
Context.glUniformMatrix4fv(
|
||||
uniform.id.SignedValue, 1, false, ( float* )&temp );
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SetUniformValue(Uniform<float, float, float, float> uniform, vec4d vec)
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void SetUniformValue(
|
||||
Uniform<float, float, float, float> uniform,
|
||||
Vec4 vec )
|
||||
{
|
||||
vec4d temp = vec;
|
||||
Context.glUniform1fv(uniform.id.SignedValue, 4, &temp);
|
||||
Vec4 temp = vec;
|
||||
Context.glUniform1fv( uniform.id.SignedValue, 4, &temp );
|
||||
}
|
||||
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SetUniformValue(Uniform<vec4d> uniform, vec4d vec)
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void SetUniformValue( Uniform<Vec4> uniform, Vec4 vec )
|
||||
{
|
||||
vec4d temp = vec;
|
||||
Context.glUniform1fv(uniform.id.SignedValue, 4, &temp);
|
||||
Vec4 temp = vec;
|
||||
Context.glUniform1fv( uniform.id.SignedValue, 4, &temp );
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SetUniformValue(Uniform<float> uniform, float v0)
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void SetUniformValue( Uniform<float> uniform, float v0 )
|
||||
{
|
||||
Context.glUniform1f(uniform.id.SignedValue, v0);
|
||||
Context.glUniform1f( uniform.id.SignedValue, v0 );
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SetUniformValue(Uniform<int> uniform, int i0)
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void SetUniformValue( Uniform<int> uniform, int i0 )
|
||||
{
|
||||
Context.glUniform1i(uniform.id.SignedValue, i0);
|
||||
Context.glUniform1i( uniform.id.SignedValue, i0 );
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SetUniformValue(Uniform<float, float> uniform, float v0, float v1)
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void SetUniformValue(
|
||||
Uniform<float, float> uniform,
|
||||
float v0,
|
||||
float v1 )
|
||||
{
|
||||
Context.glUniform2f(uniform.id.SignedValue, v0, v1);
|
||||
Context.glUniform2f( uniform.id.SignedValue, v0, v1 );
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SetUniformValue(Uniform<float, float, float> uniform, float v0, float v1, float v2)
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void SetUniformValue(
|
||||
Uniform<float, float, float> uniform,
|
||||
float v0,
|
||||
float v1,
|
||||
float v2 )
|
||||
{
|
||||
Context.glUniform3f(uniform.id.SignedValue, v0, v1, v2);
|
||||
Context.glUniform3f( uniform.id.SignedValue, v0, v1, v2 );
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SetUniformValue(Uniform<float, float, float, float> uniform, float v0, float v1, float v2, float v3)
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void SetUniformValue(
|
||||
Uniform<float, float, float, float> uniform,
|
||||
float v0,
|
||||
float v1,
|
||||
float v2,
|
||||
float v3 )
|
||||
{
|
||||
Context.glUniform4f(uniform.id.SignedValue, v0, v1, v2, v3);
|
||||
Context.glUniform4f( uniform.id.SignedValue, v0, v1, v2, v3 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user