daily update on 20240320 by nitload youmu
This commit is contained in:
@@ -128,6 +128,7 @@ namespace StgSharp.Graphics
|
||||
|
||||
#endregion texture setting
|
||||
|
||||
|
||||
}
|
||||
|
||||
public enum Filter
|
||||
|
||||
@@ -149,7 +149,6 @@ namespace StgSharp.Graphics
|
||||
|
||||
}
|
||||
|
||||
//TODO 发现一个大问题,paramQueue大多数时候取出的是数组,不是数组句柄,也就是说其内存将被长期固定且不能回收,这是内存泄漏
|
||||
public unsafe class glArrayHandle
|
||||
{
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ namespace StgSharp.Graphics
|
||||
|
||||
default:
|
||||
InternalIO.InternalWriteLog(
|
||||
$"{($"Parameter error in parameter {nameof(type)} method DrawElements. ")}{($"Only {typeof(uint).Name},{typeof(ushort).Name},{typeof(byte).Name} types are suporrted.")}",
|
||||
$"{$"Parameter error in parameter {nameof(type)} method DrawElements. "}{$"Only {typeof(uint).Name},{typeof(ushort).Name},{typeof(byte).Name} types are suporrted."}",
|
||||
LogType.Error);
|
||||
return;
|
||||
}
|
||||
@@ -333,9 +333,6 @@ namespace StgSharp.Graphics
|
||||
api->glEnableVertexAttribArray(index);
|
||||
}
|
||||
|
||||
void IglFunc.SwitchContext()
|
||||
{
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
void IglFunc.TextureImage2d<T>(int target, int level, uint internalformat, uint width, uint height, uint format, uint type, glHandle pixels)
|
||||
|
||||
@@ -48,14 +48,9 @@ namespace StgSharp.Graphics
|
||||
|
||||
private GLcontext* api;
|
||||
private FrameOperationBuffer frameOpBuffer;
|
||||
private glSHandle unupdatedFrame = glSHandle.Alloc(0);
|
||||
|
||||
internal GLonUpdate(GLcontext* context)
|
||||
{
|
||||
if (frameOpBuffer == null)
|
||||
{
|
||||
frameOpBuffer = new FrameOperationBuffer();
|
||||
}
|
||||
api = context;
|
||||
}
|
||||
|
||||
@@ -263,7 +258,7 @@ namespace StgSharp.Graphics
|
||||
|
||||
default:
|
||||
InternalIO.InternalWriteLog(
|
||||
$"{($"Parameter error in parameter {type} method DrawElements. ")}{($"Only {TypeCode.Byte}, {TypeCode.UInt16}, {TypeCode.UInt32} types are suporrted.")}",
|
||||
$"{$"Parameter error in parameter {type} method DrawElements. "}{$"Only {TypeCode.Byte}, {TypeCode.UInt16}, {TypeCode.UInt32} types are suporrted."}",
|
||||
LogType.Error);
|
||||
return;
|
||||
}
|
||||
@@ -369,9 +364,6 @@ namespace StgSharp.Graphics
|
||||
frameOpBuffer.MethodEnqueue(SetVertexArrayPtr);
|
||||
}
|
||||
|
||||
void IglFunc.SwitchContext()
|
||||
{
|
||||
}
|
||||
|
||||
unsafe void IglFunc.TextureImage2d<T>(int target, int level, uint internalformat, uint width, uint height, uint format, uint type, glHandle pixels)
|
||||
{
|
||||
@@ -404,8 +396,7 @@ namespace StgSharp.Graphics
|
||||
frameOpBuffer.MethodEnqueue(ViewPortPtr);
|
||||
}
|
||||
|
||||
GLcontext* IglFunc.Context
|
||||
=> api;
|
||||
GLcontext* IglFunc.Context => api;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -997,7 +997,7 @@ namespace StgSharp.Graphics
|
||||
catch (Exception ex)
|
||||
{
|
||||
InternalIO.InternalWriteLog(
|
||||
$"{($"Failed to convert the api {typeof(T).Name}.\n")}{ex.Message}", LogType.Warning);
|
||||
$"{$"Failed to convert the api {typeof(T).Name}.\n"}{ex.Message}", LogType.Warning);
|
||||
return default;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user