Daily update on 20250618-051714 by Nitload Youmu. Additional Message : Brief support to collection operation in EXPRESS. A collection type added in core lib and compilestack.
Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="glFunction.cs"
|
||||
// Project: StgSharp
|
||||
// Project: StepVisualizer
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
@@ -128,10 +128,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// Bind a frame Buffer to a frame Buffer target Same function as <see
|
||||
/// href="https://docs._gl/gl3/glBindFramebuffer"> glBindFramebuffer </see>.
|
||||
/// </summary>
|
||||
/// <param _name="target">
|
||||
/// <param _label="target">
|
||||
/// The frame Buffer target of the binding operation.
|
||||
/// </param>
|
||||
/// <param _name="handle">
|
||||
/// <param _label="handle">
|
||||
/// The handle of the frame Buffer object to bind.
|
||||
/// </param>
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
@@ -283,7 +283,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// only deifference is that this mehtod can only delete one renderbuffer at the same
|
||||
/// time.
|
||||
/// </summary>
|
||||
/// <param _name="bufferHandle">
|
||||
/// <param _label="bufferHandle">
|
||||
/// Handle to Buffer to delete.
|
||||
/// </param>
|
||||
public unsafe void DeleteRenderBuffer( GlHandle bufferHandle )
|
||||
@@ -303,6 +303,23 @@ namespace StgSharp.Graphics.OpenGL
|
||||
}
|
||||
}
|
||||
|
||||
public void DepthMaskAccess( bool isWrite )
|
||||
{
|
||||
Context.glDepthMask( isWrite );
|
||||
}
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void Disable( glOperation operation )
|
||||
{
|
||||
Context.glDisable( ( uint )operation );
|
||||
}
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public unsafe void DrawArrays( GeometryType mode, int first, uint count )
|
||||
{
|
||||
Context.glDrawArrays( ( uint )mode, first, count );
|
||||
}
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public unsafe void DrawElements( GeometryType mode, uint count, TypeCode type, IntPtr ptr )
|
||||
{
|
||||
@@ -340,7 +357,6 @@ namespace StgSharp.Graphics.OpenGL
|
||||
case TypeCode.Byte:
|
||||
a = glConst.UNSIGNED_BYTE;
|
||||
break;
|
||||
|
||||
default:
|
||||
InternalIO.InternalWriteLog(
|
||||
$"{$"Parameter error in parameter {nameof(type)} method DrawElements. "}{$"Only {typeof(uint).Name},{typeof(ushort).Name},{typeof(byte).Name} types are supported."}",
|
||||
@@ -525,6 +541,18 @@ namespace StgSharp.Graphics.OpenGL
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void PolygonMode( FaceMode mode )
|
||||
{
|
||||
Context.glPolygonMode( glConst.FRONT_AND_BACK, ( uint )mode );
|
||||
}
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void PolygonOffset( float factor, float unit )
|
||||
{
|
||||
Context.glPolygonOffset( factor, unit );
|
||||
}
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void ReadPixels(
|
||||
(int X, int Y) beginPosition,
|
||||
@@ -595,16 +623,16 @@ namespace StgSharp.Graphics.OpenGL
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public unsafe void SetBufferData<T>(
|
||||
BufferType bufferType,
|
||||
ReadOnlySpan<T> bufferArray,
|
||||
ReadOnlySpan<T> bufferSpan,
|
||||
BufferUsage usage )
|
||||
where T: struct,INumber<T>
|
||||
{
|
||||
int size = bufferArray.Length * Marshal.SizeOf( typeof( T ) );
|
||||
if( bufferArray == null ) {
|
||||
int size = bufferSpan.Length * Marshal.SizeOf( typeof( T ) );
|
||||
if( bufferSpan == null ) {
|
||||
return;
|
||||
}
|
||||
#pragma warning disable CS8500
|
||||
fixed( void* bufferPtr = bufferArray )
|
||||
fixed( void* bufferPtr = bufferSpan )
|
||||
#pragma warning restore CS8500
|
||||
{
|
||||
Context.glBufferData(
|
||||
@@ -625,7 +653,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
}
|
||||
|
||||
#pragma warning disable CS8500
|
||||
fixed( void* bufferPtr = &bufferArray.GetPinnableReference() )
|
||||
fixed( void* bufferPtr = bufferArray )
|
||||
#pragma warning restore CS8500
|
||||
{
|
||||
Context.glBufferData(
|
||||
@@ -636,16 +664,13 @@ namespace StgSharp.Graphics.OpenGL
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public unsafe void SetBufferVectorData<T>(
|
||||
BufferType bufferType,
|
||||
ReadOnlySpan<T> bufferArray,
|
||||
ReadOnlySpan<T> bufferSpan,
|
||||
BufferUsage usage )
|
||||
where T: struct, IVector<T>
|
||||
{
|
||||
int size = bufferArray.Length * Marshal.SizeOf( typeof( T ) );
|
||||
if( bufferArray == null ) {
|
||||
return;
|
||||
}
|
||||
int size = bufferSpan.Length * Marshal.SizeOf( typeof( T ) );
|
||||
#pragma warning disable CS8500
|
||||
fixed( void* bufferPtr = &bufferArray.GetPinnableReference() )
|
||||
fixed( void* bufferPtr = bufferSpan )
|
||||
#pragma warning restore CS8500
|
||||
{
|
||||
Context.glBufferData(
|
||||
@@ -783,6 +808,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
Context.glViewport( x, y, width, height );
|
||||
}
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void WaitAccomplishment()
|
||||
{
|
||||
Context.glFinish();
|
||||
|
||||
Reference in New Issue
Block a user