daily update on 20250122 by nitload youmu, architect rearrange
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Graphics;
|
||||
using StgSharp.Graphics.OpenGL;
|
||||
using StgSharp.Internal.OpenGL;
|
||||
using StgSharp.Math;
|
||||
|
||||
using System;
|
||||
|
||||
@@ -47,9 +47,9 @@ namespace StgSharp.Graphics.OpenGL
|
||||
#pragma warning restore CA1008
|
||||
{
|
||||
|
||||
Read = GLconst.READ_FRAMEBUFFER,
|
||||
All = GLconst.FRAMEBUFFER,
|
||||
Draw = GLconst.DRAW_FRAMEBUFFER,
|
||||
Read = glConst.READ_FRAMEBUFFER,
|
||||
All = glConst.FRAMEBUFFER,
|
||||
Draw = glConst.DRAW_FRAMEBUFFER,
|
||||
|
||||
}
|
||||
|
||||
@@ -63,10 +63,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bind the frame buffer object with name frame buffer to the frame buffer target specified
|
||||
/// Bind the frame buffer object with _name frame buffer to the frame buffer target specified
|
||||
/// by target. <see langword="FrameBufferTarget.All" /> will be set as default target.
|
||||
/// </summary>
|
||||
/// <param name="index"> Index of object to be binded in handle set </param>
|
||||
/// <param _name="index"> Index of object to be binded in handle set </param>
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public override unsafe void Bind( int index )
|
||||
{
|
||||
@@ -74,11 +74,11 @@ namespace StgSharp.Graphics.OpenGL
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bind the frame buffer object with name frame buffer to the frame buffer target specified
|
||||
/// Bind the frame buffer object with _name frame buffer to the frame buffer target specified
|
||||
/// by target. Target of this frame buffer should be set manually.
|
||||
/// </summary>
|
||||
/// <param name="target"> The frame buffer target of the binding operation. </param>
|
||||
/// <param name="index"> Index of object to be binded in handle set </param>
|
||||
/// <param _name="target"> The frame buffer target of the binding operation. </param>
|
||||
/// <param _name="index"> Index of object to be binded in handle set </param>
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public unsafe void Bind( FrameBufferTarget target, int index )
|
||||
{
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Data.Intrinsic;
|
||||
using StgSharp.Internal.Intrinsic;
|
||||
using StgSharp.Internal.OpenGL;
|
||||
using StgSharp.Math;
|
||||
|
||||
using System;
|
||||
@@ -85,14 +86,14 @@ namespace StgSharp.Graphics.OpenGL
|
||||
public void Bind2D( int index )
|
||||
{
|
||||
currentEditingTextureIndex = index;
|
||||
_gl.BindTexture( GLconst.TEXTURE_2D, _textureHandle[ index ] );
|
||||
_gl.BindTexture( glConst.TEXTURE_2D, _textureHandle[ index ] );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load an <see cref="Image" /> to certain texture.
|
||||
/// </summary>
|
||||
/// <param name="index"> </param>
|
||||
/// <param name="i"> </param>
|
||||
/// <param _name="index"> </param>
|
||||
/// <param _name="i"> </param>
|
||||
public unsafe void LoadTexture( int index, Image i )
|
||||
{
|
||||
byte[] handle = i.PixelBuffer;
|
||||
@@ -117,10 +118,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
}
|
||||
#endif
|
||||
_gl.TextureParameter(
|
||||
GLconst.TEXTURE_2D, GLconst.TEXTURE_MIN_FILTER,
|
||||
glConst.TEXTURE_2D, glConst.TEXTURE_MIN_FILTER,
|
||||
( int )onMinify );
|
||||
_gl.TextureParameter(
|
||||
GLconst.TEXTURE_2D, GLconst.TEXTURE_MAG_FILTER,
|
||||
glConst.TEXTURE_2D, glConst.TEXTURE_MAG_FILTER,
|
||||
( int )onMagnify );
|
||||
}
|
||||
|
||||
@@ -137,10 +138,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
}
|
||||
#endif
|
||||
_gl.TextureParameter(
|
||||
GLconst.TEXTURE_2D, GLconst.TEXTURE_WRAP_S,
|
||||
glConst.TEXTURE_2D, glConst.TEXTURE_WRAP_S,
|
||||
( int )onHorizontial );
|
||||
_gl.TextureParameter(
|
||||
GLconst.TEXTURE_2D, GLconst.TEXTURE_WRAP_T, ( int )onVertical );
|
||||
glConst.TEXTURE_2D, glConst.TEXTURE_WRAP_T, ( int )onVertical );
|
||||
}
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
@@ -252,12 +253,12 @@ namespace StgSharp.Graphics.OpenGL
|
||||
#pragma warning restore CA1008
|
||||
{
|
||||
|
||||
Nearest = GLconst.NEAREST,
|
||||
Linear = GLconst.LINEAR,
|
||||
NearestLinearMipmap = GLconst.NEAREST_MIPMAP_LINEAR,
|
||||
LinearLinearMipmap = GLconst.LINEAR_MIPMAP_LINEAR,
|
||||
NearestNearestMipmap = GLconst.NEAREST_MIPMAP_NEAREST,
|
||||
LinearNearestMipmap = GLconst.LINEAR_MIPMAP_NEAREST,
|
||||
Nearest = glConst.NEAREST,
|
||||
Linear = glConst.LINEAR,
|
||||
NearestLinearMipmap = glConst.NEAREST_MIPMAP_LINEAR,
|
||||
LinearLinearMipmap = glConst.LINEAR_MIPMAP_LINEAR,
|
||||
NearestNearestMipmap = glConst.NEAREST_MIPMAP_NEAREST,
|
||||
LinearNearestMipmap = glConst.LINEAR_MIPMAP_NEAREST,
|
||||
|
||||
}
|
||||
|
||||
@@ -266,22 +267,22 @@ namespace StgSharp.Graphics.OpenGL
|
||||
#pragma warning restore CA1008
|
||||
{
|
||||
|
||||
Unit0 = GLconst.TEXTURE0,
|
||||
Unit1 = GLconst.TEXTURE1,
|
||||
Unit2 = GLconst.TEXTURE2,
|
||||
Unit3 = GLconst.TEXTURE3,
|
||||
Unit4 = GLconst.TEXTURE4,
|
||||
Unit5 = GLconst.TEXTURE5,
|
||||
Unit6 = GLconst.TEXTURE6,
|
||||
Unit7 = GLconst.TEXTURE7,
|
||||
Unit8 = GLconst.TEXTURE8,
|
||||
Unit9 = GLconst.TEXTURE9,
|
||||
Unit10 = GLconst.TEXTURE10,
|
||||
Unit11 = GLconst.TEXTURE11,
|
||||
Unit12 = GLconst.TEXTURE12,
|
||||
Unit13 = GLconst.TEXTURE13,
|
||||
Unit14 = GLconst.TEXTURE14,
|
||||
Unit15 = GLconst.TEXTURE15,
|
||||
Unit0 = glConst.TEXTURE0,
|
||||
Unit1 = glConst.TEXTURE1,
|
||||
Unit2 = glConst.TEXTURE2,
|
||||
Unit3 = glConst.TEXTURE3,
|
||||
Unit4 = glConst.TEXTURE4,
|
||||
Unit5 = glConst.TEXTURE5,
|
||||
Unit6 = glConst.TEXTURE6,
|
||||
Unit7 = glConst.TEXTURE7,
|
||||
Unit8 = glConst.TEXTURE8,
|
||||
Unit9 = glConst.TEXTURE9,
|
||||
Unit10 = glConst.TEXTURE10,
|
||||
Unit11 = glConst.TEXTURE11,
|
||||
Unit12 = glConst.TEXTURE12,
|
||||
Unit13 = glConst.TEXTURE13,
|
||||
Unit14 = glConst.TEXTURE14,
|
||||
Unit15 = glConst.TEXTURE15,
|
||||
|
||||
}
|
||||
|
||||
@@ -290,10 +291,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
#pragma warning restore CA1008
|
||||
{
|
||||
|
||||
Repeat = GLconst.REPEAT,
|
||||
MirroredRepeat = GLconst.MIRRORED_REPEAT,
|
||||
ClampToEdge = GLconst.CLAMP_TO_EDGE,
|
||||
ClampToBorder = GLconst.CLAMP_TO_BORDER,
|
||||
Repeat = glConst.REPEAT,
|
||||
MirroredRepeat = glConst.MIRRORED_REPEAT,
|
||||
ClampToEdge = glConst.CLAMP_TO_EDGE,
|
||||
ClampToBorder = glConst.CLAMP_TO_BORDER,
|
||||
|
||||
}
|
||||
}
|
||||
@@ -66,10 +66,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Set _data to current vertex buffer object
|
||||
/// </summary>
|
||||
/// <typeparam name="T"> Type of bufferData </typeparam>
|
||||
/// <param name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param name="bufferData"> Data to write in </param>
|
||||
/// <param name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
/// <typeparam _name="T"> Type of bufferData </typeparam>
|
||||
/// <param _name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param _name="bufferData"> Data to write in </param>
|
||||
/// <param _name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
public void WriteMatrixData<T>(
|
||||
int index,
|
||||
T bufferData,
|
||||
@@ -83,10 +83,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Set _data to current vertex buffer object
|
||||
/// </summary>
|
||||
/// <typeparam name="T"> Type of bufferData </typeparam>
|
||||
/// <param name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param name="bufferArray"> Data to write in </param>
|
||||
/// <param name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
/// <typeparam _name="T"> Type of bufferData </typeparam>
|
||||
/// <param _name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param _name="bufferArray"> Data to write in </param>
|
||||
/// <param _name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
public void WriteScalerData<T>(
|
||||
int index,
|
||||
T[] bufferArray,
|
||||
@@ -105,10 +105,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Set _data to current vertex buffer object
|
||||
/// </summary>
|
||||
/// <typeparam name="T"> Type of bufferData </typeparam>
|
||||
/// <param name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param name="scalerSpan"> A <see cref="Span{T}" /> of _data to write in </param>
|
||||
/// <param name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
/// <typeparam _name="T"> Type of bufferData </typeparam>
|
||||
/// <param _name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param _name="scalerSpan"> A <see cref="Span{T}" /> of _data to write in </param>
|
||||
/// <param _name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
public void WriteScalerData<T>(
|
||||
int index,
|
||||
ReadOnlySpan<T> scalerSpan,
|
||||
@@ -127,10 +127,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Set _data to current vertex buffer object
|
||||
/// </summary>
|
||||
/// <typeparam name="T"> Type of bufferData </typeparam>
|
||||
/// <param name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param name="vectorSpan"> A <see cref="Span{T}" /> of _data to write in </param>
|
||||
/// <param name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
/// <typeparam _name="T"> Type of bufferData </typeparam>
|
||||
/// <param _name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param _name="vectorSpan"> A <see cref="Span{T}" /> of _data to write in </param>
|
||||
/// <param _name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
public void WriteVectorData<T>(
|
||||
int index,
|
||||
ReadOnlySpan<T> vectorSpan,
|
||||
@@ -144,10 +144,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Set _data to current vertex buffer object
|
||||
/// </summary>
|
||||
/// <typeparam name="T"> Type of bufferData </typeparam>
|
||||
/// <param name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param name="vectorArray"> A array of _data to write in </param>
|
||||
/// <param name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
/// <typeparam _name="T"> Type of bufferData </typeparam>
|
||||
/// <param _name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param _name="vectorArray"> A array of _data to write in </param>
|
||||
/// <param _name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
public void WriteVectorData<T>(
|
||||
int index,
|
||||
T[] vectorArray,
|
||||
|
||||
Reference in New Issue
Block a user