diff --git a/StgSharp.Common/StgSharp.Common.csproj b/StgSharp.Common/StgSharp.Common.csproj index 3b5d5ea0..2689047c 100644 --- a/StgSharp.Common/StgSharp.Common.csproj +++ b/StgSharp.Common/StgSharp.Common.csproj @@ -96,6 +96,11 @@ LINUX + + + + + @@ -115,10 +120,6 @@ - - - - diff --git a/StgsSharp.Graphics/CPUanimation/IImageProvider.cs b/StgSharp.Graphics/CPUanimation/IImageProvider.cs similarity index 100% rename from StgsSharp.Graphics/CPUanimation/IImageProvider.cs rename to StgSharp.Graphics/CPUanimation/IImageProvider.cs diff --git a/StgsSharp.Graphics/CPUanimation/ImageHelper.cs b/StgSharp.Graphics/CPUanimation/ImageHelper.cs similarity index 100% rename from StgsSharp.Graphics/CPUanimation/ImageHelper.cs rename to StgSharp.Graphics/CPUanimation/ImageHelper.cs diff --git a/StgsSharp.Graphics/Camera.cs b/StgSharp.Graphics/Camera.cs similarity index 100% rename from StgsSharp.Graphics/Camera.cs rename to StgSharp.Graphics/Camera.cs diff --git a/StgsSharp.Graphics/Define/BufferObjectBase.cs b/StgSharp.Graphics/Define/BufferObjectBase.cs similarity index 100% rename from StgsSharp.Graphics/Define/BufferObjectBase.cs rename to StgSharp.Graphics/Define/BufferObjectBase.cs diff --git a/StgsSharp.Graphics/FrameworkConstant.cs b/StgSharp.Graphics/FrameworkConstant.cs similarity index 100% rename from StgsSharp.Graphics/FrameworkConstant.cs rename to StgSharp.Graphics/FrameworkConstant.cs diff --git a/StgsSharp.Graphics/Image.cs b/StgSharp.Graphics/Image.cs similarity index 67% rename from StgsSharp.Graphics/Image.cs rename to StgSharp.Graphics/Image.cs index 2e2bb1af..b8dad4b4 100644 --- a/StgsSharp.Graphics/Image.cs +++ b/StgSharp.Graphics/Image.cs @@ -1,207 +1,187 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="Image" -// Project: StgSharp -// AuthorGroup: Nitload -// Copyright (c) Nitload. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// ----------------------------------------------------------------------- -// ----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="Image.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- using StgSharp.Graphics.OpenGL; -using System; -using System.Runtime.CompilerServices; - -namespace StgSharp.Graphics -{ - public class Image : IImageProvider - { - - private byte[] _data; - private ImageInfo _rawInfo; - private int _pixelUpdateCount = 0; - - internal unsafe Image() - { - _rawInfo = new ImageInfo(); - } - - internal Image( - ImageInfo information - ) - { - _rawInfo = information; +using System; +using System.Runtime.CompilerServices; + +namespace StgSharp.Graphics +{ + public class Image : IImageProvider + { + + private byte[] _data; + private ImageInfo _rawInfo; + private int _pixelUpdateCount = 0; + + internal unsafe Image() + { + _rawInfo = new ImageInfo(); + } + + internal Image(ImageInfo information) + { + _rawInfo = information; _data = []; // int length = _rawInfo.width * _rawInfo.height * _rawInfo.channel; - } - - public (int width, int height) Size - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => (_rawInfo.Width, _rawInfo.Height); - } - - public byte[] PixelBuffer - { - get - { - if ((_data.Length == 0) || (_data == null)) - { - GetBytes(); - return _data!; - } - return _data; - } - } - + } + + public (int width, int height) Size + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => (_rawInfo.Width, _rawInfo.Height); + } + + public byte[] PixelBuffer + { + get + { + if ((_data.Length == 0) || (_data == null)) + { + GetBytes(); + return _data!; + } + return _data; + } + } + public ImageChannel Channel => _rawInfo.Channel; - /// - /// Hash code of time pixels updated last time. + /// + /// Hash code of time pixels updated last time. /// - public int PixelUpdateCount - { - get => _pixelUpdateCount; - internal set => _pixelUpdateCount = value; - } - - public int ChannelCount => _rawInfo.ChannelCount; - - public int Height - { - get => _rawInfo.Height; - internal set => _rawInfo.Height = value; - } - - public int Width - { - get => _rawInfo.Width; - internal set => _rawInfo.Width = value; - } - - public int PixelSize => ImageInfo.GetPixelSize(_rawInfo.pixelLayout, _rawInfo.Channel); - - public PixelChannelLayout PixelLayout - { - get => _rawInfo.pixelLayout; - private set => _rawInfo.pixelLayout = value; - } - - public SerializableTypeCode SSDTypeCode => SerializableTypeCode.PixelImage; - - internal ref byte[] Data => ref _data; - - public void FromBytes( - byte[] stream - ) { } - - public static unsafe Image FromFile( - string route, - ImageLoader loader - ) - { - Image ret = new Image(); - fixed (ImageInfo* iptr = &ret._rawInfo) { - GraphicFramework.InternalLoadImage(route, iptr, loader); - } - return ret; - } - - public static Image FromMemory( - (int width, int height) size, - ImageChannel channel, - byte[] stream - ) - { - ImageInfo _info = new ImageInfo - { - Height = size.height, - Width = size.width, - Channel = channel, - StreamPtr = IntPtr.Zero - }; - Image ret = new Image(_info); - ret.PixelLayout = PixelChannelLayout.Byte; - ret._data = stream; - return ret; - } - - public static Image FromMemory( - (int width, int height) size, - ImageChannel channel, - PixelChannelLayout layout, - byte[] stream - ) - { - ImageInfo _info = new ImageInfo - { - Height = size.height, - Width = size.width, - Channel = channel, - StreamPtr = IntPtr.Zero - }; - Image ret = new Image(_info); - ret.PixelLayout = layout; - ret._data = stream; - return ret; - } - - public unsafe byte[] GetBytes() - { - if (_data.Length == 0) - { - int size = Width * Height * ImageInfo.GetPixelSize(PixelLayout, Channel); - _data = new Span((byte*)_rawInfo.StreamPtr, size).ToArray(); - fixed (ImageInfo* pptr = &_rawInfo) { - GraphicFramework.InternalUnloadImage(pptr); - } - _rawInfo.StreamPtr = IntPtr.Zero; - } - return _data; - } - - public Image ProvideImage() - { - return this; - } - - internal static Image FromMemory( - ImageInfo info, - byte[] data, - int operationCount - ) - { - return new Image - { - _rawInfo = info, - _data = data, - _pixelUpdateCount = operationCount - }; - } - - byte[] ISSDSerializable.GetBytes() - { - throw new NotImplementedException(); - } - - } + public int PixelUpdateCount + { + get => _pixelUpdateCount; + internal set => _pixelUpdateCount = value; + } + + public int ChannelCount => _rawInfo.ChannelCount; + + public int Height + { + get => _rawInfo.Height; + internal set => _rawInfo.Height = value; + } + + public int Width + { + get => _rawInfo.Width; + internal set => _rawInfo.Width = value; + } + + public int PixelSize => ImageInfo.GetPixelSize(_rawInfo.pixelLayout, _rawInfo.Channel); + + public PixelChannelLayout PixelLayout + { + get => _rawInfo.pixelLayout; + private set => _rawInfo.pixelLayout = value; + } + + internal ref byte[] Data => ref _data; + + public void FromBytes(byte[] stream) { } + + public static unsafe Image FromFile(string route, ImageLoader loader) + { + Image ret = new Image(); + fixed (ImageInfo* iptr = &ret._rawInfo) { + GraphicFramework.InternalLoadImage(route, iptr, loader); + } + return ret; + } + + public static Image FromMemory((int width, int height) size, ImageChannel channel, byte[] stream) + { + ImageInfo _info = new ImageInfo + { + Height = size.height, + Width = size.width, + Channel = channel, + StreamPtr = IntPtr.Zero + }; + Image ret = new Image(_info); + ret.PixelLayout = PixelChannelLayout.Byte; + ret._data = stream; + return ret; + } + + public static Image FromMemory( + (int width, int height) size, + ImageChannel channel, + PixelChannelLayout layout, + byte[] stream) + { + ImageInfo _info = new ImageInfo + { + Height = size.height, + Width = size.width, + Channel = channel, + StreamPtr = IntPtr.Zero + }; + Image ret = new Image(_info); + ret.PixelLayout = layout; + ret._data = stream; + return ret; + } + + public unsafe byte[] GetBytes() + { + if (_data.Length == 0) + { + int size = Width * Height * ImageInfo.GetPixelSize(PixelLayout, Channel); + _data = new Span((byte*)_rawInfo.StreamPtr, size).ToArray(); + fixed (ImageInfo* pptr = &_rawInfo) { + GraphicFramework.InternalUnloadImage(pptr); + } + _rawInfo.StreamPtr = IntPtr.Zero; + } + return _data; + } + + public Image ProvideImage() + { + return this; + } + + internal static Image FromMemory(ImageInfo info, byte[] data, int operationCount) + { + return new Image + { + _rawInfo = info, + _data = data, + _pixelUpdateCount = operationCount + }; + } + + } } \ No newline at end of file diff --git a/StgsSharp.Graphics/ImageInfo.cs b/StgSharp.Graphics/ImageInfo.cs similarity index 100% rename from StgsSharp.Graphics/ImageInfo.cs rename to StgSharp.Graphics/ImageInfo.cs diff --git a/StgsSharp.Graphics/OpenGL/Buffer/AutoTexture.cs b/StgSharp.Graphics/OpenGL/Buffer/AutoTexture.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/Buffer/AutoTexture.cs rename to StgSharp.Graphics/OpenGL/Buffer/AutoTexture.cs diff --git a/StgsSharp.Graphics/OpenGL/Buffer/EBO.cs b/StgSharp.Graphics/OpenGL/Buffer/EBO.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/Buffer/EBO.cs rename to StgSharp.Graphics/OpenGL/Buffer/EBO.cs diff --git a/StgsSharp.Graphics/OpenGL/Buffer/FBO.cs b/StgSharp.Graphics/OpenGL/Buffer/FBO.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/Buffer/FBO.cs rename to StgSharp.Graphics/OpenGL/Buffer/FBO.cs diff --git a/StgsSharp.Graphics/OpenGL/Buffer/GLBufferObjectBase.cs b/StgSharp.Graphics/OpenGL/Buffer/GLBufferObjectBase.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/Buffer/GLBufferObjectBase.cs rename to StgSharp.Graphics/OpenGL/Buffer/GLBufferObjectBase.cs diff --git a/StgsSharp.Graphics/OpenGL/Buffer/RBO.cs b/StgSharp.Graphics/OpenGL/Buffer/RBO.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/Buffer/RBO.cs rename to StgSharp.Graphics/OpenGL/Buffer/RBO.cs diff --git a/StgsSharp.Graphics/OpenGL/Buffer/TextureGL.cs b/StgSharp.Graphics/OpenGL/Buffer/TextureGL.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/Buffer/TextureGL.cs rename to StgSharp.Graphics/OpenGL/Buffer/TextureGL.cs diff --git a/StgsSharp.Graphics/OpenGL/Buffer/VAO.cs b/StgSharp.Graphics/OpenGL/Buffer/VAO.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/Buffer/VAO.cs rename to StgSharp.Graphics/OpenGL/Buffer/VAO.cs diff --git a/StgsSharp.Graphics/OpenGL/Buffer/VBO.cs b/StgSharp.Graphics/OpenGL/Buffer/VBO.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/Buffer/VBO.cs rename to StgSharp.Graphics/OpenGL/Buffer/VBO.cs diff --git a/StgsSharp.Graphics/OpenGL/ShaderEdit/IglConvertable.cs b/StgSharp.Graphics/OpenGL/ShaderEdit/IglConvertable.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/ShaderEdit/IglConvertable.cs rename to StgSharp.Graphics/OpenGL/ShaderEdit/IglConvertable.cs diff --git a/StgsSharp.Graphics/OpenGL/ShaderEdit/Shader.cs b/StgSharp.Graphics/OpenGL/ShaderEdit/Shader.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/ShaderEdit/Shader.cs rename to StgSharp.Graphics/OpenGL/ShaderEdit/Shader.cs diff --git a/StgsSharp.Graphics/OpenGL/ShaderEdit/Uniform.cs b/StgSharp.Graphics/OpenGL/ShaderEdit/Uniform.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/ShaderEdit/Uniform.cs rename to StgSharp.Graphics/OpenGL/ShaderEdit/Uniform.cs diff --git a/StgsSharp.Graphics/OpenGL/glApiManager.Const.cs b/StgSharp.Graphics/OpenGL/glApiManager.Const.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glApiManager.Const.cs rename to StgSharp.Graphics/OpenGL/glApiManager.Const.cs diff --git a/StgsSharp.Graphics/OpenGL/glApiManager.Load.cs b/StgSharp.Graphics/OpenGL/glApiManager.Load.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glApiManager.Load.cs rename to StgSharp.Graphics/OpenGL/glApiManager.Load.cs diff --git a/StgsSharp.Graphics/OpenGL/glApiManager.cs b/StgSharp.Graphics/OpenGL/glApiManager.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glApiManager.cs rename to StgSharp.Graphics/OpenGL/glApiManager.cs diff --git a/StgsSharp.Graphics/OpenGL/glConst.cs b/StgSharp.Graphics/OpenGL/glConst.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glConst.cs rename to StgSharp.Graphics/OpenGL/glConst.cs diff --git a/StgsSharp.Graphics/OpenGL/glContext.cs b/StgSharp.Graphics/OpenGL/glContext.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glContext.cs rename to StgSharp.Graphics/OpenGL/glContext.cs diff --git a/StgsSharp.Graphics/OpenGL/glContextShadow.cs b/StgSharp.Graphics/OpenGL/glContextShadow.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glContextShadow.cs rename to StgSharp.Graphics/OpenGL/glContextShadow.cs diff --git a/StgsSharp.Graphics/OpenGL/glEnum.cs b/StgSharp.Graphics/OpenGL/glEnum.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glEnum.cs rename to StgSharp.Graphics/OpenGL/glEnum.cs diff --git a/StgsSharp.Graphics/OpenGL/glException.cs b/StgSharp.Graphics/OpenGL/glException.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glException.cs rename to StgSharp.Graphics/OpenGL/glException.cs diff --git a/StgsSharp.Graphics/OpenGL/glFunction.SourceManager.cs b/StgSharp.Graphics/OpenGL/glFunction.SourceManager.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glFunction.SourceManager.cs rename to StgSharp.Graphics/OpenGL/glFunction.SourceManager.cs diff --git a/StgsSharp.Graphics/OpenGL/glFunction.cs b/StgSharp.Graphics/OpenGL/glFunction.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glFunction.cs rename to StgSharp.Graphics/OpenGL/glFunction.cs diff --git a/StgsSharp.Graphics/OpenGL/glFunction.v3_3.cs b/StgSharp.Graphics/OpenGL/glFunction.v3_3.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glFunction.v3_3.cs rename to StgSharp.Graphics/OpenGL/glFunction.v3_3.cs diff --git a/StgsSharp.Graphics/OpenGL/glFunction.v4_0.cs b/StgSharp.Graphics/OpenGL/glFunction.v4_0.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glFunction.v4_0.cs rename to StgSharp.Graphics/OpenGL/glFunction.v4_0.cs diff --git a/StgsSharp.Graphics/OpenGL/glFunction.v4_1.cs b/StgSharp.Graphics/OpenGL/glFunction.v4_1.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glFunction.v4_1.cs rename to StgSharp.Graphics/OpenGL/glFunction.v4_1.cs diff --git a/StgsSharp.Graphics/OpenGL/glFunction.v4_2.cs b/StgSharp.Graphics/OpenGL/glFunction.v4_2.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glFunction.v4_2.cs rename to StgSharp.Graphics/OpenGL/glFunction.v4_2.cs diff --git a/StgsSharp.Graphics/OpenGL/glFunction.v4_3.cs b/StgSharp.Graphics/OpenGL/glFunction.v4_3.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glFunction.v4_3.cs rename to StgSharp.Graphics/OpenGL/glFunction.v4_3.cs diff --git a/StgsSharp.Graphics/OpenGL/glFunction.v4_4.cs b/StgSharp.Graphics/OpenGL/glFunction.v4_4.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glFunction.v4_4.cs rename to StgSharp.Graphics/OpenGL/glFunction.v4_4.cs diff --git a/StgsSharp.Graphics/OpenGL/glFunction.v4_5.cs b/StgSharp.Graphics/OpenGL/glFunction.v4_5.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glFunction.v4_5.cs rename to StgSharp.Graphics/OpenGL/glFunction.v4_5.cs diff --git a/StgsSharp.Graphics/OpenGL/glFunction.v4_6.cs b/StgSharp.Graphics/OpenGL/glFunction.v4_6.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glFunction.v4_6.cs rename to StgSharp.Graphics/OpenGL/glFunction.v4_6.cs diff --git a/StgsSharp.Graphics/OpenGL/glHandle.cs b/StgSharp.Graphics/OpenGL/glHandle.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glHandle.cs rename to StgSharp.Graphics/OpenGL/glHandle.cs diff --git a/StgsSharp.Graphics/OpenGL/glRenderObjectGenrator.cs b/StgSharp.Graphics/OpenGL/glRenderObjectGenrator.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glRenderObjectGenrator.cs rename to StgSharp.Graphics/OpenGL/glRenderObjectGenrator.cs diff --git a/StgsSharp.Graphics/OpenGL/glRenderStream.ThreadSecurity.cs b/StgSharp.Graphics/OpenGL/glRenderStream.ThreadSecurity.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glRenderStream.ThreadSecurity.cs rename to StgSharp.Graphics/OpenGL/glRenderStream.ThreadSecurity.cs diff --git a/StgsSharp.Graphics/OpenGL/glRenderStream.cs b/StgSharp.Graphics/OpenGL/glRenderStream.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glRenderStream.cs rename to StgSharp.Graphics/OpenGL/glRenderStream.cs diff --git a/StgsSharp.Graphics/OpenGL/glType.cs b/StgSharp.Graphics/OpenGL/glType.cs similarity index 100% rename from StgsSharp.Graphics/OpenGL/glType.cs rename to StgSharp.Graphics/OpenGL/glType.cs diff --git a/StgsSharp.Graphics/Pixels.cs b/StgSharp.Graphics/Pixels.cs similarity index 100% rename from StgsSharp.Graphics/Pixels.cs rename to StgSharp.Graphics/Pixels.cs diff --git a/StgsSharp.Graphics/PlainGeometryMesh.cs b/StgSharp.Graphics/PlainGeometryMesh.cs similarity index 100% rename from StgsSharp.Graphics/PlainGeometryMesh.cs rename to StgSharp.Graphics/PlainGeometryMesh.cs diff --git a/StgsSharp.Graphics/RenderStream.cs b/StgSharp.Graphics/RenderStream.cs similarity index 100% rename from StgsSharp.Graphics/RenderStream.cs rename to StgSharp.Graphics/RenderStream.cs diff --git a/StgsSharp.Graphics/ShaderEdit/ShaderGenerator.cs b/StgSharp.Graphics/ShaderEdit/ShaderGenerator.cs similarity index 100% rename from StgsSharp.Graphics/ShaderEdit/ShaderGenerator.cs rename to StgSharp.Graphics/ShaderEdit/ShaderGenerator.cs diff --git a/StgsSharp.Graphics/ShaderEdit/ShaderStruct.cs b/StgSharp.Graphics/ShaderEdit/ShaderStruct.cs similarity index 100% rename from StgsSharp.Graphics/ShaderEdit/ShaderStruct.cs rename to StgSharp.Graphics/ShaderEdit/ShaderStruct.cs diff --git a/StgsSharp.Graphics/StgsSharp.Graphics.csproj b/StgSharp.Graphics/StgSharp.Graphics.csproj similarity index 100% rename from StgsSharp.Graphics/StgsSharp.Graphics.csproj rename to StgSharp.Graphics/StgSharp.Graphics.csproj diff --git a/StgsSharp.Graphics/TexturePipeline.cs b/StgSharp.Graphics/TexturePipeline.cs similarity index 100% rename from StgsSharp.Graphics/TexturePipeline.cs rename to StgSharp.Graphics/TexturePipeline.cs diff --git a/StgsSharp.Graphics/TextureProvider.cs b/StgSharp.Graphics/TextureProvider.cs similarity index 100% rename from StgsSharp.Graphics/TextureProvider.cs rename to StgSharp.Graphics/TextureProvider.cs diff --git a/StgsSharp.Graphics/ViewPort.cs b/StgSharp.Graphics/ViewPort.cs similarity index 100% rename from StgsSharp.Graphics/ViewPort.cs rename to StgSharp.Graphics/ViewPort.cs diff --git a/StgsSharp.Graphics/Vulkan/vkEnum.cs b/StgSharp.Graphics/Vulkan/vkEnum.cs similarity index 100% rename from StgsSharp.Graphics/Vulkan/vkEnum.cs rename to StgSharp.Graphics/Vulkan/vkEnum.cs diff --git a/StgsSharp.Graphics/Vulkan/vkHandle.cs b/StgSharp.Graphics/Vulkan/vkHandle.cs similarity index 100% rename from StgsSharp.Graphics/Vulkan/vkHandle.cs rename to StgSharp.Graphics/Vulkan/vkHandle.cs diff --git a/StgsSharp.Graphics/framework.cs b/StgSharp.Graphics/framework.cs similarity index 100% rename from StgsSharp.Graphics/framework.cs rename to StgSharp.Graphics/framework.cs diff --git a/StgsSharp.Graphics/frameworkSyncContext.cs b/StgSharp.Graphics/frameworkSyncContext.cs similarity index 100% rename from StgsSharp.Graphics/frameworkSyncContext.cs rename to StgSharp.Graphics/frameworkSyncContext.cs diff --git a/StgSharp.Graphics/gl.cs b/StgSharp.Graphics/gl.cs new file mode 100644 index 00000000..d29a5d5e --- /dev/null +++ b/StgSharp.Graphics/gl.cs @@ -0,0 +1,96 @@ +//----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// file="gl.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +using StgSharp.Graphics; +using StgSharp.Graphics.OpenGL; +using StgSharp.Internal; +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace StgSharp.Graphics +{ + internal static partial class GraphicFramework + { + + internal static uint[] GLtype = new uint[16]; + + static GraphicFramework() + { + GLtype[(int)TypeCode.Single] = glConst.FLOAT; + GLtype[(int)TypeCode.Int32] = glConst.INT; + GLtype[(int)TypeCode.UInt32] = glConst.UNSIGNED_INT; + GLtype[(int)TypeCode.Int16] = glConst.SHORT; + GLtype[(int)TypeCode.UInt16] = glConst.UNSIGNED_SHORT; + GLtype[(int)TypeCode.SByte] = glConst.BYTE; + GLtype[(int)TypeCode.Byte] = glConst.UNSIGNED_BYTE; + } + + [LibraryImport(Native.LibName, EntryPoint = "glCheckShaderStat")] + [UnmanagedCallConv(CallConvs = [ typeof(CallConvCdecl) ])] + #pragma warning disable CA5392 + internal static partial int glCheckShaderStatus( + ref OpenglContext context, + uint shaderHandle, + int key, + ref IntPtr logPtr); + #pragma warning restore CA5392 + + + #region ssgc api define + + [LibraryImport(Native.LibName, EntryPoint = "initGL")] + [UnmanagedCallConv(CallConvs =[ typeof(CallConvCdecl) ])] + internal static partial void InternalInitGL(int majorVersion, int minorVersion); + + [LibraryImport(Native.LibName, EntryPoint = "loadGlfuncDefault", StringMarshalling = StringMarshalling.Utf8)] + [UnmanagedCallConv(CallConvs =[ typeof(CallConvCdecl) ])] + internal static partial IntPtr InternalLoadGlFuncDefault(string name); + + [LibraryImport(Native.LibName, EntryPoint = "linkShaderProgram")] + [UnmanagedCallConv(CallConvs =[ typeof(CallConvCdecl) ])] + internal static unsafe partial uint InternalLinkShaderProgram(OpenglContext* context, uint shaderProgram); + + [LibraryImport(Native.LibName, EntryPoint = "readLog")] + [UnmanagedCallConv(CallConvs =[ typeof(CallConvCdecl) ])] + internal static unsafe partial IntPtr InternalReadSSCLog(); + + [LibraryImport(Native.LibName, EntryPoint = "loadImageData", StringMarshalling = StringMarshalling.Utf8)] + [UnmanagedCallConv(CallConvs =[ typeof(CallConvCdecl) ])] + internal static unsafe partial void InternalLoadImage(string fileName, ImageInfo* output, ImageLoader loader); + + [LibraryImport(Native.LibName, EntryPoint = "unloadImageData")] + [UnmanagedCallConv(CallConvs =[ typeof(CallConvCdecl) ])] + internal static unsafe partial void InternalUnloadImage(ImageInfo* output); + + #endregion ssgc api define + } +} diff --git a/StgsSharp.Graphics/glfw.cs b/StgSharp.Graphics/glfw.cs similarity index 100% rename from StgsSharp.Graphics/glfw.cs rename to StgSharp.Graphics/glfw.cs diff --git a/StgsSharp.Graphics/glfw.dtruct.cs b/StgSharp.Graphics/glfw.dtruct.cs similarity index 100% rename from StgsSharp.Graphics/glfw.dtruct.cs rename to StgSharp.Graphics/glfw.dtruct.cs diff --git a/StgsSharp.Graphics/glfw.function.cs b/StgSharp.Graphics/glfw.function.cs similarity index 100% rename from StgsSharp.Graphics/glfw.function.cs rename to StgSharp.Graphics/glfw.function.cs diff --git a/StgSharp.Common/Geometries/Coordination/CoordinationBase.cs b/StgSharp.Mathematics/Geometries/Coordination/CoordinationBase.cs similarity index 100% rename from StgSharp.Common/Geometries/Coordination/CoordinationBase.cs rename to StgSharp.Mathematics/Geometries/Coordination/CoordinationBase.cs diff --git a/StgSharp.Common/Geometries/Coordination/PlainCoordinate.cs b/StgSharp.Mathematics/Geometries/Coordination/PlainCoordinate.cs similarity index 100% rename from StgSharp.Common/Geometries/Coordination/PlainCoordinate.cs rename to StgSharp.Mathematics/Geometries/Coordination/PlainCoordinate.cs diff --git a/StgSharp.Common/Geometries/Coordination/SpaceCoordinate.cs b/StgSharp.Mathematics/Geometries/Coordination/SpaceCoordinate.cs similarity index 100% rename from StgSharp.Common/Geometries/Coordination/SpaceCoordinate.cs rename to StgSharp.Mathematics/Geometries/Coordination/SpaceCoordinate.cs diff --git a/StgSharp.Common/Geometries/Coordination/StreamLocalCoordinate.cs b/StgSharp.Mathematics/Geometries/Coordination/StreamLocalCoordinate.cs similarity index 100% rename from StgSharp.Common/Geometries/Coordination/StreamLocalCoordinate.cs rename to StgSharp.Mathematics/Geometries/Coordination/StreamLocalCoordinate.cs diff --git a/StgSharp.Common/Geometries/GemoryException.cs b/StgSharp.Mathematics/Geometries/GemoryException.cs similarity index 100% rename from StgSharp.Common/Geometries/GemoryException.cs rename to StgSharp.Mathematics/Geometries/GemoryException.cs diff --git a/StgSharp.Common/Geometries/GeometryOperation/GeometryOperation.cs b/StgSharp.Mathematics/Geometries/GeometryOperation/GeometryOperation.cs similarity index 100% rename from StgSharp.Common/Geometries/GeometryOperation/GeometryOperation.cs rename to StgSharp.Mathematics/Geometries/GeometryOperation/GeometryOperation.cs diff --git a/StgSharp.Common/Geometries/GeometryScaler/Angle.cs b/StgSharp.Mathematics/Geometries/GeometryScaler/Angle.cs similarity index 100% rename from StgSharp.Common/Geometries/GeometryScaler/Angle.cs rename to StgSharp.Mathematics/Geometries/GeometryScaler/Angle.cs diff --git a/StgSharp.Common/Geometries/IGeometry.cs b/StgSharp.Mathematics/Geometries/IGeometry.cs similarity index 91% rename from StgSharp.Common/Geometries/IGeometry.cs rename to StgSharp.Mathematics/Geometries/IGeometry.cs index 8839fa78..9154f455 100644 --- a/StgSharp.Common/Geometries/IGeometry.cs +++ b/StgSharp.Mathematics/Geometries/IGeometry.cs @@ -2,8 +2,8 @@ // ----------------------------------------------------------------------- // file="IGeometry" // Project: StgSharp -// AuthorGroup: Nitload -// Copyright (c) Nitload. All rights reserved. +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -43,9 +43,8 @@ namespace StgSharp.Geometries public Point this[int index] { get; set; } #pragma warning disable CA1819 - public Vec4[] VertexStream + public Vec4[] VertexStream { get; } #pragma warning restore CA1819 - { get; } public CoordinationBase Coordination { get; } diff --git a/StgSharp.Common/Geometries/IGeomtryBuffer.cs b/StgSharp.Mathematics/Geometries/IGeomtryBuffer.cs similarity index 100% rename from StgSharp.Common/Geometries/IGeomtryBuffer.cs rename to StgSharp.Mathematics/Geometries/IGeomtryBuffer.cs diff --git a/StgSharp.Common/Geometries/IInstancing.cs b/StgSharp.Mathematics/Geometries/IInstancing.cs similarity index 100% rename from StgSharp.Common/Geometries/IInstancing.cs rename to StgSharp.Mathematics/Geometries/IInstancing.cs diff --git a/StgSharp.Common/Geometries/IInstancingBuffer.cs b/StgSharp.Mathematics/Geometries/IInstancingBuffer.cs similarity index 100% rename from StgSharp.Common/Geometries/IInstancingBuffer.cs rename to StgSharp.Mathematics/Geometries/IInstancingBuffer.cs diff --git a/StgSharp.Common/Geometries/PlainGeometry/Cordinate.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Cordinate.cs similarity index 100% rename from StgSharp.Common/Geometries/PlainGeometry/Cordinate.cs rename to StgSharp.Mathematics/Geometries/PlainGeometry/Cordinate.cs diff --git a/StgSharp.Common/Geometries/PlainGeometry/Define/GeometryOperation.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Define/GeometryOperation.cs similarity index 100% rename from StgSharp.Common/Geometries/PlainGeometry/Define/GeometryOperation.cs rename to StgSharp.Mathematics/Geometries/PlainGeometry/Define/GeometryOperation.cs diff --git a/StgSharp.Common/Geometries/PlainGeometry/Define/IPlainEntity.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Define/IPlainEntity.cs similarity index 100% rename from StgSharp.Common/Geometries/PlainGeometry/Define/IPlainEntity.cs rename to StgSharp.Mathematics/Geometries/PlainGeometry/Define/IPlainEntity.cs diff --git a/StgSharp.Common/Geometries/PlainGeometry/Define/ParticleOnPlain.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Define/ParticleOnPlain.cs similarity index 100% rename from StgSharp.Common/Geometries/PlainGeometry/Define/ParticleOnPlain.cs rename to StgSharp.Mathematics/Geometries/PlainGeometry/Define/ParticleOnPlain.cs diff --git a/StgSharp.Common/Geometries/PlainGeometry/Define/PlainGeometry.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Define/PlainGeometry.cs similarity index 100% rename from StgSharp.Common/Geometries/PlainGeometry/Define/PlainGeometry.cs rename to StgSharp.Mathematics/Geometries/PlainGeometry/Define/PlainGeometry.cs diff --git a/StgSharp.Common/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs similarity index 100% rename from StgSharp.Common/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs rename to StgSharp.Mathematics/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs diff --git a/StgSharp.Common/Geometries/PlainGeometry/Parallelogram.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Parallelogram.cs similarity index 100% rename from StgSharp.Common/Geometries/PlainGeometry/Parallelogram.cs rename to StgSharp.Mathematics/Geometries/PlainGeometry/Parallelogram.cs diff --git a/StgSharp.Common/Geometries/PlainGeometry/Plain.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Plain.cs similarity index 100% rename from StgSharp.Common/Geometries/PlainGeometry/Plain.cs rename to StgSharp.Mathematics/Geometries/PlainGeometry/Plain.cs diff --git a/StgSharp.Common/Geometries/PlainGeometry/Polygon4.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Polygon4.cs similarity index 100% rename from StgSharp.Common/Geometries/PlainGeometry/Polygon4.cs rename to StgSharp.Mathematics/Geometries/PlainGeometry/Polygon4.cs diff --git a/StgSharp.Common/Geometries/PlainGeometry/Polygon5.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Polygon5.cs similarity index 100% rename from StgSharp.Common/Geometries/PlainGeometry/Polygon5.cs rename to StgSharp.Mathematics/Geometries/PlainGeometry/Polygon5.cs diff --git a/StgSharp.Common/Geometries/PlainGeometry/Polygon6.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Polygon6.cs similarity index 100% rename from StgSharp.Common/Geometries/PlainGeometry/Polygon6.cs rename to StgSharp.Mathematics/Geometries/PlainGeometry/Polygon6.cs diff --git a/StgSharp.Common/Geometries/PlainGeometry/Rectangle.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Rectangle.cs similarity index 100% rename from StgSharp.Common/Geometries/PlainGeometry/Rectangle.cs rename to StgSharp.Mathematics/Geometries/PlainGeometry/Rectangle.cs diff --git a/StgSharp.Common/Geometries/PlainGeometry/Square.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Square.cs similarity index 100% rename from StgSharp.Common/Geometries/PlainGeometry/Square.cs rename to StgSharp.Mathematics/Geometries/PlainGeometry/Square.cs diff --git a/StgSharp.Common/Geometries/PlainGeometry/Triangle.cs b/StgSharp.Mathematics/Geometries/PlainGeometry/Triangle.cs similarity index 100% rename from StgSharp.Common/Geometries/PlainGeometry/Triangle.cs rename to StgSharp.Mathematics/Geometries/PlainGeometry/Triangle.cs diff --git a/StgSharp.Common/Geometries/Point.cs b/StgSharp.Mathematics/Geometries/Point.cs similarity index 100% rename from StgSharp.Common/Geometries/Point.cs rename to StgSharp.Mathematics/Geometries/Point.cs diff --git a/StgSharp.Common/Geometries/SpaceGeometry/Class1.cs b/StgSharp.Mathematics/Geometries/SpaceGeometry/Class1.cs similarity index 100% rename from StgSharp.Common/Geometries/SpaceGeometry/Class1.cs rename to StgSharp.Mathematics/Geometries/SpaceGeometry/Class1.cs diff --git a/StgSharp.Common/Geometries/SpaceGeometry/TriangulatedSurface.cs b/StgSharp.Mathematics/Geometries/SpaceGeometry/TriangulatedSurface.cs similarity index 100% rename from StgSharp.Common/Geometries/SpaceGeometry/TriangulatedSurface.cs rename to StgSharp.Mathematics/Geometries/SpaceGeometry/TriangulatedSurface.cs diff --git a/StgSharpDevelop.sln b/StgSharpDevelop.sln index 989ddf29..6a12b2f6 100644 --- a/StgSharpDevelop.sln +++ b/StgSharpDevelop.sln @@ -34,7 +34,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StgSharp.Mathematics", "Stg EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StgSharp.RegularAnalysis", "StgSharp.RegularAnalysis\StgSharp.RegularAnalysis.csproj", "{46339874-C6B8-4361-997E-2E30387E51F9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StgsSharp.Graphics", "StgsSharp.Graphics\StgsSharp.Graphics.csproj", "{80CD3DDE-0642-451D-82DF-0DE422FC6E34}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StgSharp.Graphics", "StgSharp.Graphics\StgSharp.Graphics.csproj", "{80CD3DDE-0642-451D-82DF-0DE422FC6E34}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/StgsSharp.Graphics/gl.cs b/StgsSharp.Graphics/gl.cs deleted file mode 100644 index 8ef3bfac..00000000 --- a/StgsSharp.Graphics/gl.cs +++ /dev/null @@ -1,114 +0,0 @@ -//----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -// file="gl" -// Project: StgSharp -// AuthorGroup: Nitload -// Copyright (c) Nitload. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// ----------------------------------------------------------------------- -// ----------------------------------------------------------------------- -using StgSharp.Graphics; -using StgSharp.Graphics.OpenGL; - -using System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace StgSharp.Internal -{ - internal static partial class GraphicFramework - { - - internal static uint[] GLtype = new uint[16]; - - static GraphicFramework() - { - GLtype[(int)TypeCode.Single] = glConst.FLOAT; - GLtype[(int)TypeCode.Int32] = glConst.INT; - GLtype[(int)TypeCode.UInt32] = glConst.UNSIGNED_INT; - GLtype[(int)TypeCode.Int16] = glConst.SHORT; - GLtype[(int)TypeCode.UInt16] = glConst.UNSIGNED_SHORT; - GLtype[(int)TypeCode.SByte] = glConst.BYTE; - GLtype[(int)TypeCode.Byte] = glConst.UNSIGNED_BYTE; - } - - [LibraryImport(Native.LibName, EntryPoint = "glCheckShaderStat")] - [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] - #pragma warning disable CA5392 - internal static partial int glCheckShaderStatus( - ref OpenglContext context, - uint shaderHandle, - int key, - ref IntPtr logPtr - ); - #pragma warning restore CA5392 - - - #region ssgc api define - - [LibraryImport(Native.LibName, EntryPoint = "initGL")] - [UnmanagedCallConv(CallConvs =[typeof(CallConvCdecl)])] - internal static partial void InternalInitGL( - int majorVersion, - int minorVersion - ); - - [LibraryImport( - Native.LibName, - EntryPoint = "loadGlfuncDefault", - StringMarshalling = StringMarshalling.Utf8)] - [UnmanagedCallConv(CallConvs =[typeof(CallConvCdecl)])] - internal static partial IntPtr InternalLoadGlFuncDefault( - string name - ); - - [LibraryImport(Native.LibName, EntryPoint = "linkShaderProgram")] - [UnmanagedCallConv(CallConvs =[typeof(CallConvCdecl)])] - internal static unsafe partial uint InternalLinkShaderProgram( - OpenglContext* context, - uint shaderProgram - ); - - [LibraryImport(Native.LibName, EntryPoint = "readLog")] - [UnmanagedCallConv(CallConvs =[typeof(CallConvCdecl)])] - internal static unsafe partial IntPtr InternalReadSSCLog(); - - [LibraryImport( - Native.LibName, - EntryPoint = "loadImageData", - StringMarshalling = StringMarshalling.Utf8)] - [UnmanagedCallConv(CallConvs =[typeof(CallConvCdecl)])] - internal static unsafe partial void InternalLoadImage( - string fileName, - ImageInfo* output, - ImageLoader loader - ); - - [LibraryImport(Native.LibName, EntryPoint = "unloadImageData")] - [UnmanagedCallConv(CallConvs =[typeof(CallConvCdecl)])] - internal static unsafe partial void InternalUnloadImage( - ImageInfo* output - ); - - #endregion ssgc api define - } -} diff --git a/tod.md b/tod.md new file mode 100644 index 00000000..4aee0d93 --- /dev/null +++ b/tod.md @@ -0,0 +1,5 @@ +1. native 核函数标识关键字宏和展开宏 +2. 核函数参数表重整 +3. C#侧核函数调度器重整适配 +4. 正则表达式源生成 +5. imgae及pixel存储优化 \ No newline at end of file