daily update on 20240506 by nitload youmu
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("BenchMark")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0cd01ed9ddc7e151899218121d69a29650b39b34")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+66efce19fcb461782c49255dc5500144f8c267e6")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("BenchMark")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("BenchMark")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("BenchMark")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e1e416bb41a7e16ddec5e7c16d64c72d6aa380e1")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+66efce19fcb461782c49255dc5500144f8c267e6")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("BenchMark")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("BenchMark")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("OEM")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0cd01ed9ddc7e151899218121d69a29650b39b34")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+66efce19fcb461782c49255dc5500144f8c267e6")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("OEM")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("OEM")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
|
||||
@@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("OEM")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+66efce19fcb461782c49255dc5500144f8c267e6")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("OEM")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("OEM")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// 由 MSBuild WriteCodeFragment 类生成。
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// <auto-generated/>
|
||||
global using global::System;
|
||||
global using global::System.Collections.Generic;
|
||||
global using global::System.IO;
|
||||
global using global::System.Linq;
|
||||
global using global::System.Net.Http;
|
||||
global using global::System.Threading;
|
||||
global using global::System.Threading.Tasks;
|
||||
@@ -1,10 +1,10 @@
|
||||
#version 330 core
|
||||
|
||||
in vec4 TexColor;
|
||||
in vec2 TexCoord;
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
uniform vec4 color;
|
||||
uniform sampler2D ourTexture;
|
||||
uniform sampler2D ourTexture2;
|
||||
|
||||
@@ -12,6 +12,6 @@ void main()
|
||||
{
|
||||
vec4 tex1 = texture(ourTexture, TexCoord);
|
||||
vec4 tex2 = texture(ourTexture2,TexCoord);
|
||||
FragColor = mix(tex1 * vec4( TexColor.xyz, 1.0), tex2, 0.2) /* *vec4( TexColor,1.0) /**/;
|
||||
FragColor = mix(tex1 * vec4( color.xyz, 1.0), tex2, 0.2) /* *vec4( TexColor,1.0) /**/;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,23 +4,13 @@ layout(location = 0) in vec3 aPos;
|
||||
layout(location = 1) in vec3 aColor;
|
||||
layout(location = 2) in vec2 aTextCoord;
|
||||
|
||||
out vec4 TexColor;
|
||||
out vec2 TexCoord;
|
||||
|
||||
uniform vec4 color;
|
||||
uniform mat4x4 camera;
|
||||
|
||||
void main()
|
||||
{
|
||||
float as = sin( color.w );
|
||||
float ac = cos( color.w );
|
||||
mat4x4 rotation = mat4x4(
|
||||
ac,-as,0,0,
|
||||
as,ac,0,0,
|
||||
0,0,1,0,
|
||||
0,0,0,1
|
||||
);
|
||||
TexColor = color;
|
||||
|
||||
TexCoord = aTextCoord;
|
||||
vec4 temp = vec4(aPos.xyz,1.0);
|
||||
gl_Position = /**/ camera * /**/ temp;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#version 330 core
|
||||
|
||||
in vec3 TexColor;
|
||||
in vec4 TexColor;
|
||||
in vec2 TexCoord;
|
||||
|
||||
out vec4 FragColor;
|
||||
@@ -12,6 +12,6 @@ void main()
|
||||
{
|
||||
vec4 tex1 = texture(ourTexture, TexCoord);
|
||||
vec4 tex2 = texture(ourTexture2,TexCoord);
|
||||
FragColor = mix(tex1 * vec4( TexColor,1.0),tex2,0.2) /* *vec4( TexColor,1.0) /**/;
|
||||
FragColor = mix(tex1 * vec4( TexColor.xyz, 1.0), tex2, 0.2) /* *vec4( TexColor,1.0) /**/;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,17 +4,29 @@ layout(location = 0) in vec3 aPos;
|
||||
layout(location = 1) in vec3 aColor;
|
||||
layout(location = 2) in vec2 aTextCoord;
|
||||
|
||||
out vec3 TexColor;
|
||||
out vec4 TexColor;
|
||||
out vec2 TexCoord;
|
||||
|
||||
uniform vec3 color;
|
||||
uniform vec4 color;
|
||||
uniform mat4x4 camera;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(aPos.xyz,1.0) + vec4(color.xy-vec2(0.5,0.5),0.0,0.0);
|
||||
float as = sin( color.w );
|
||||
float ac = cos( color.w );
|
||||
mat4x4 rotation = mat4x4(
|
||||
ac,-as,0,0,
|
||||
as,ac,0,0,
|
||||
0,0,1,0,
|
||||
0,0,0,1
|
||||
);
|
||||
TexColor = color;
|
||||
TexCoord = aTextCoord;
|
||||
vec4 temp = vec4(aPos.xyz,1.0);
|
||||
gl_Position = /**/ camera * /**/ temp;
|
||||
}
|
||||
|
||||
//struct
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -42,27 +42,27 @@ namespace StgSharp
|
||||
{
|
||||
#region ssgc api define
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "initGL",
|
||||
[DllImport(SSC_libName, EntryPoint = "initGL",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void InternalInitGL(int majorVersion, int minorVersion);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "loadGlfuncDefault",
|
||||
[DllImport(SSC_libName, EntryPoint = "loadGlfuncDefault",
|
||||
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
internal static extern IntPtr InternalLoadGlfuncDefault(string name);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "linkShaderProgram",
|
||||
[DllImport(SSC_libName, EntryPoint = "linkShaderProgram",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe uint InternalLinkShaderProgram(GLcontext* context, uint shaderProgram);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "readLog",
|
||||
[DllImport(SSC_libName, EntryPoint = "readLog",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe IntPtr InternalReadSSCLog();
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "loadImageData",
|
||||
[DllImport(SSC_libName, EntryPoint = "loadImageData",
|
||||
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
internal static extern unsafe void InternalLoadImage(string fileName, ImageInfo* output, ImageLoader loader);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "unloadImageData",
|
||||
[DllImport(SSC_libName, EntryPoint = "unloadImageData",
|
||||
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
internal static extern unsafe void InternalUnloadImage(ImageInfo* output);
|
||||
|
||||
|
||||
@@ -56,11 +56,11 @@ namespace StgSharp
|
||||
internal static unsafe partial class InternalIO
|
||||
{
|
||||
|
||||
internal const string SS_errorlog =
|
||||
internal const string SS_errorLog =
|
||||
"SS_errorlog.log";
|
||||
|
||||
internal const string SSC_libname =
|
||||
"StgSharpC";
|
||||
internal const string SSC_libName =
|
||||
"StgSharpC";
|
||||
|
||||
internal static Dictionary<TypeCode, uint> GLtype =
|
||||
new Dictionary<TypeCode, uint>();
|
||||
@@ -85,13 +85,13 @@ namespace StgSharp
|
||||
|
||||
internal static void InternalAppendLog(string log)
|
||||
{
|
||||
if (!File.Exists(SS_errorlog))
|
||||
if (!File.Exists(SS_errorLog))
|
||||
{
|
||||
FileStream stream = File.Create(SS_errorlog);
|
||||
FileStream stream = File.Create(SS_errorLog);
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
using (StreamWriter logStream = File.AppendText(SS_errorlog))
|
||||
using (StreamWriter logStream = File.AppendText(SS_errorLog))
|
||||
{
|
||||
logStream.WriteLine(log);
|
||||
}
|
||||
@@ -119,13 +119,13 @@ namespace StgSharp
|
||||
internal static void InternalWriteLog(string logLine, LogType logType)
|
||||
{
|
||||
logSyncSemaphore.Wait();
|
||||
if (!File.Exists(SS_errorlog))
|
||||
if (!File.Exists(SS_errorLog))
|
||||
{
|
||||
FileStream stream = File.Create(SS_errorlog);
|
||||
FileStream stream = File.Create(SS_errorLog);
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
using (StreamWriter logStream = File.AppendText(SS_errorlog))
|
||||
using (StreamWriter logStream = File.AppendText(SS_errorLog))
|
||||
{
|
||||
logStream.WriteLine($"{logType}\t{DateTime.Now.ToString("o")}");
|
||||
logStream.WriteLine(logLine);
|
||||
@@ -136,13 +136,13 @@ namespace StgSharp
|
||||
internal static void InternalWriteLog(string beforeTime, string logLine, LogType logType)
|
||||
{
|
||||
logSyncSemaphore.Wait();
|
||||
if (!File.Exists(InternalIO.SS_errorlog))
|
||||
if (!File.Exists(InternalIO.SS_errorLog))
|
||||
{
|
||||
FileStream stream = File.Create(InternalIO.SS_errorlog);
|
||||
FileStream stream = File.Create(InternalIO.SS_errorLog);
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
using (StreamWriter logStream = File.AppendText(SS_errorlog))
|
||||
using (StreamWriter logStream = File.AppendText(SS_errorLog))
|
||||
{
|
||||
logStream.WriteLine(beforeTime);
|
||||
logStream.WriteLine($"{logType}\t@\t{DateTime.Now.ToString("o")}");
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using StgSharp.Data.FileIO;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -10,7 +12,7 @@ namespace StgSharp.Data
|
||||
{
|
||||
private byte _id;
|
||||
private List<SSD> discList;
|
||||
|
||||
private List<SSDrawHead> files;
|
||||
|
||||
public Area()
|
||||
{
|
||||
|
||||
@@ -55,6 +55,7 @@ namespace StgSharp.Data
|
||||
[FieldOffset(14)] public byte selfDefine_2;
|
||||
[FieldOffset(15)] public byte selfDefine_3;
|
||||
|
||||
|
||||
public int Size
|
||||
{
|
||||
get => ((int)size) + 1;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using StgSharp.Math;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
@@ -59,7 +61,7 @@ namespace StgSharp.Data
|
||||
}
|
||||
for (int i = begin; i < 255; i++)
|
||||
{
|
||||
Data[i] = 0; //TODO: 使用STGSHARP内部随机数工具处理它
|
||||
Data[i] = Scaler.Random<byte>(); //TODO: 使用STGSHARP内部随机数工具处理它
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,17 +52,17 @@ namespace StgSharp.Data.FileIO
|
||||
public const int SegmentCapacity = 16 * 16;
|
||||
|
||||
private Area home;
|
||||
|
||||
private SSDrawHead _head;
|
||||
private string _name;
|
||||
private SSDSegment currentSegment;
|
||||
private int previousHash;
|
||||
private List<SSDSegment> segments;
|
||||
|
||||
private SSDrawHead _head;
|
||||
private SSDSegment currentSegment;
|
||||
private string _name;
|
||||
|
||||
internal SSDraw()
|
||||
{
|
||||
segments = new List<SSDSegment>();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public SSDraw(string name)
|
||||
@@ -73,14 +73,11 @@ namespace StgSharp.Data.FileIO
|
||||
|
||||
public int ID
|
||||
{
|
||||
get { return _head._head.globalID; }
|
||||
set { _head._head.globalID = value; }
|
||||
get => _head._head.globalID;
|
||||
set => _head._head.globalID = value;
|
||||
}
|
||||
|
||||
internal SSDrawHead Head
|
||||
{
|
||||
get{return _head; }
|
||||
}
|
||||
internal SSDrawHead Head => _head;
|
||||
|
||||
//TODO 分析头,加载文件头,进一步加载全部的数据块
|
||||
|
||||
@@ -96,7 +93,7 @@ namespace StgSharp.Data.FileIO
|
||||
return null;
|
||||
}
|
||||
SSDraw ret = new SSDraw();
|
||||
foreach (var item in head)
|
||||
foreach ((int, int) item in head)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -105,8 +102,8 @@ namespace StgSharp.Data.FileIO
|
||||
|
||||
public void CreateRawFile(string outputFolder, bool rewrite)
|
||||
{
|
||||
string route =
|
||||
$"{((outputFolder == string.Empty) ? " " : ($"{outputFolder}\\"))}{$"{_name}.{FileType}"}";
|
||||
string route = (outputFolder == string.Empty) ? ($"{_name}.{FileType}") :
|
||||
($"{outputFolder} \\ {_name}.{FileType}");
|
||||
if (File.Exists(route) && !rewrite)
|
||||
{
|
||||
throw new Exception("This SSDRAW has already existed.");
|
||||
@@ -114,9 +111,7 @@ namespace StgSharp.Data.FileIO
|
||||
using (File.Create(route)) { }
|
||||
using (File.Open(route, FileMode.Truncate)) { }
|
||||
FileStream f = File.Open(route, FileMode.Open);
|
||||
int size = 0;
|
||||
f.Write(_head.GetBytes(out size), 0, size);
|
||||
foreach (var _head in segments)
|
||||
foreach (SSDSegment _head in segments)
|
||||
{
|
||||
f.Write(_head.GetBytes(), 0, 18 * 16);
|
||||
}
|
||||
@@ -133,7 +128,7 @@ namespace StgSharp.Data.FileIO
|
||||
}
|
||||
FileStream stream = File.Open(route, FileMode.Open);
|
||||
return new SSDraw(string.Empty);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void WriteRaw(byte[] dataStream)
|
||||
@@ -172,15 +167,12 @@ namespace StgSharp.Data.FileIO
|
||||
}
|
||||
|
||||
|
||||
public unsafe class SSDrawHead : IEnumerable<int>
|
||||
public unsafe class SSDrawHead : IEnumerable<(int, int)>
|
||||
{
|
||||
|
||||
private List<int> freeSegments;
|
||||
private SSDSegment segmentRange;
|
||||
private string name;
|
||||
|
||||
private List<(int, int)> segmentRange;
|
||||
internal SSDSegmentHead _head;
|
||||
|
||||
internal SSDrawHead(string name)
|
||||
{
|
||||
int hash;
|
||||
@@ -192,14 +184,16 @@ namespace StgSharp.Data.FileIO
|
||||
hash = BitConverter.ToInt32(bytes, 0);
|
||||
}
|
||||
_head.previousHash = hash;
|
||||
segmentRange = new List<(int, int)>();
|
||||
freeSegments = new List<int>();
|
||||
}
|
||||
|
||||
public SSDrawHead()
|
||||
{
|
||||
segmentRange = new List<(int, int)>();
|
||||
freeSegments = new List<int>();
|
||||
}
|
||||
|
||||
public (int begin, int end) this[byte index]
|
||||
{
|
||||
get => segmentRange.ReadData<(int, int)>(index);
|
||||
set => segmentRange.WriteData<(int, int)>(index, value);
|
||||
}
|
||||
|
||||
public byte DiscIndex
|
||||
@@ -214,85 +208,49 @@ namespace StgSharp.Data.FileIO
|
||||
internal set => _head.selfDefine_1 = value;
|
||||
}
|
||||
|
||||
public void AddSingleSegment(int id)
|
||||
internal ref SSDSegmentHead _head
|
||||
{
|
||||
freeSegments.Add(id);
|
||||
get => ref segmentRange.Head;
|
||||
}
|
||||
|
||||
public unsafe byte[] GetBytes(out int size)
|
||||
internal byte pairCount
|
||||
{
|
||||
byte[] namecode = Encoding.UTF8.GetBytes(name);
|
||||
size = 16 + 4 +
|
||||
(segmentRange.Count * 8) +
|
||||
(freeSegments.Count * 4) +
|
||||
namecode.Length;
|
||||
byte[] ret = new byte[size];
|
||||
fixed (byte* bptr = ret)
|
||||
get => (byte)(_head.size / 8);
|
||||
set
|
||||
{
|
||||
*(SSDSegmentHead*)bptr = _head;
|
||||
*(bptr + 16) = (byte)segmentRange.Count;
|
||||
*(bptr + 17) = (byte)namecode.Length;
|
||||
*(bptr + 18) = (byte)freeSegments.Count;
|
||||
int t = 20;
|
||||
for (int i = 0; i < segmentRange.Count; i++, t += 8)
|
||||
if (value > 32)
|
||||
{
|
||||
*(int*)(bptr + t) = segmentRange[i].Item1;
|
||||
*(int*)(bptr + t + 4) = segmentRange[i].Item2;
|
||||
}
|
||||
for (int i = 0; i < freeSegments.Count; i++, t += 4)
|
||||
{
|
||||
*(int*)(bptr + t) = freeSegments[i];
|
||||
}
|
||||
for (int i = 0; i < namecode.Length; i++, t++)
|
||||
{
|
||||
*(bptr + t) = namecode[i];
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
_head.size = (byte)(value * 8);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public void WriteRange(int begin, int end)
|
||||
|
||||
public unsafe byte[] GetBytes()
|
||||
{
|
||||
segmentRange.Add((begin, end));
|
||||
return segmentRange.GetBytes();
|
||||
}
|
||||
|
||||
internal void MarkSegment(int id)
|
||||
{
|
||||
freeSegments.Add(id);
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
foreach (var tuple in segmentRange)
|
||||
for (int i = 0; i < pairCount; i++)
|
||||
{
|
||||
for (int i = tuple.Item1; i <= tuple.Item2; i++)
|
||||
{
|
||||
yield return i;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in freeSegments)
|
||||
{
|
||||
yield return item;
|
||||
yield return segmentRange.ReadData<(int, int)>(i);
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator<int> IEnumerable<int>.GetEnumerator()
|
||||
IEnumerator<(int, int)> IEnumerable<(int, int)>.GetEnumerator()
|
||||
{
|
||||
foreach (var tuple in segmentRange)
|
||||
for (int i = 0; i < pairCount; i++)
|
||||
{
|
||||
for (int i = tuple.Item1; i <= tuple.Item2; i++)
|
||||
{
|
||||
yield return i;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in freeSegments)
|
||||
{
|
||||
yield return item;
|
||||
yield return segmentRange.ReadData<(int, int)>(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
public class UniformEmptyReferenceException : Exception
|
||||
{
|
||||
public UniformEmptyReferenceException(string program, string name):
|
||||
base($"Location -1 returned when trying to find uniform {name} in shader program {program}")
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -83,6 +83,10 @@ namespace StgSharp
|
||||
mainTimeProvider = new StgSharpTime();
|
||||
MainTimeProvider.StartProvidingTime();
|
||||
InternalIO.glfwInit();
|
||||
InternalIO.InternalAppendLog("\n\n\n");
|
||||
InternalIO.InternalWriteLog(
|
||||
$"Program {Assembly.GetEntryAssembly()!.FullName} Started.",
|
||||
LogType.Info);
|
||||
}
|
||||
|
||||
public static void Mark(bool needConsole)
|
||||
|
||||
@@ -77,8 +77,8 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
Interlocked.Exchange(ref _frameSpeed, _frameCount);
|
||||
Interlocked.Exchange(ref _frameCount, 0);
|
||||
//Console.Clear();
|
||||
//Console.WriteLine(_frameSpeed);
|
||||
Console.Clear();
|
||||
Console.WriteLine(_frameSpeed);
|
||||
};
|
||||
frameTimeProvider = new TimeSpanProvider(
|
||||
1000L * 1000L / 60, TimeSpanProvider.DefaultProvider
|
||||
|
||||
@@ -330,7 +330,7 @@ namespace StgSharp.Graphics
|
||||
|
||||
~glHandleSet()
|
||||
{
|
||||
//unsafe, 不确定这个句柄组的单一索引是不是完全卸载
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -281,13 +281,26 @@ namespace StgSharp.Graphics
|
||||
return h;
|
||||
}
|
||||
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static unsafe glSHandle GetUniformLocation(glHandle program, string name)
|
||||
{
|
||||
byte[] code = Encoding.UTF8.GetBytes(name);
|
||||
fixed (byte* ptr = code)
|
||||
{
|
||||
return glSHandle.Alloc(Context.glGetUniformLocation(program.Value, ptr));
|
||||
int ret = Context.glGetUniformLocation(program.Value, ptr);
|
||||
#if DEBUG
|
||||
if (ret == (int)(GLconst.INVALID_OPERATION) ||
|
||||
ret == (int)(GLconst.INVALID_VALUE))
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
if (ret == -1 )
|
||||
{
|
||||
throw new UniformEmptyReferenceException(nameof(program), name);
|
||||
}
|
||||
#endif
|
||||
return glSHandle.Alloc(ret);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,9 +41,6 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
public partial class glRenderStream
|
||||
{
|
||||
protected glRenderStream(RenderStreamConstructArgs args) : base(args)
|
||||
{
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
protected sealed override Shader CreateShaderSegment(ShaderType type, int count)
|
||||
|
||||
@@ -203,7 +203,7 @@ namespace StgSharp.Graphics
|
||||
public unsafe static void SetValue(Uniform<Matrix44> uniform, Matrix44 mat)
|
||||
{
|
||||
Matrix44 temp = mat;
|
||||
Context.glUniformMatrix4fv(uniform.id.Value, 1, false, (float*)&mat);
|
||||
Context.glUniformMatrix4fv(uniform.id.Value, 1, false, (float*)&temp);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -13,6 +13,9 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
public abstract partial class glRenderStream: RenderStream
|
||||
{
|
||||
protected glRenderStream(RenderStreamConstructArgs args) : base(args)
|
||||
{
|
||||
}
|
||||
|
||||
public static T AsMainStreamOf<T>(Form f, (int x, int y, int z) unitCubeSize) where T : glRenderStream
|
||||
{
|
||||
@@ -77,7 +80,7 @@ namespace StgSharp.Graphics
|
||||
if (GL.CurrentContextHandle != ContextHandle)
|
||||
{
|
||||
GL.CurrentContextHandle = ContextHandle;
|
||||
Console.WriteLine($"context set as {(ulong)GL.CurrentContextHandle}");
|
||||
//Console.WriteLine($"context set as {(ulong)GL.CurrentContextHandle}");
|
||||
InternalIO.glfwMakeContextCurrent(CanvasHandle);
|
||||
}
|
||||
}
|
||||
|
||||
+116
-116
@@ -47,237 +47,237 @@ namespace StgSharp
|
||||
{
|
||||
#region api call
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwInit")] internal static extern unsafe int glfwInit();
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwInit")] internal static extern unsafe int glfwInit();
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwTerminate")] internal static extern unsafe void glfwTerminate();
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwTerminate")] internal static extern unsafe void glfwTerminate();
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwInitHint")] internal static extern unsafe void glfwInitHint(int hint, int value);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwInitHint")] internal static extern unsafe void glfwInitHint(int hint, int value);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetVersion")] internal static extern unsafe void glfwGetVersion(int* major, int* minor, int* rev);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetVersion")] internal static extern unsafe void glfwGetVersion(int* major, int* minor, int* rev);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetVersionString")] internal static extern unsafe byte* glfwGetVersionString();
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetVersionString")] internal static extern unsafe byte* glfwGetVersionString();
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetError")] internal static extern unsafe int glfwGetError(byte** description);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetError")] internal static extern unsafe int glfwGetError(byte** description);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetErrorCallback")] internal static extern unsafe GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetErrorCallback")] internal static extern unsafe GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetMonitors")] internal static extern unsafe IntPtr* glfwGetMonitors(int* count);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetMonitors")] internal static extern unsafe IntPtr* glfwGetMonitors(int* count);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetPrimaryMonitor")] internal static extern unsafe IntPtr glfwGetPrimaryMonitor();
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetPrimaryMonitor")] internal static extern unsafe IntPtr glfwGetPrimaryMonitor();
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetMonitorPos")] internal static extern unsafe void glfwGetMonitorPos(IntPtr monitor, int* xpos, int* ypos);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetMonitorPos")] internal static extern unsafe void glfwGetMonitorPos(IntPtr monitor, int* xpos, int* ypos);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetMonitorWorkarea")] internal static extern unsafe void glfwGetMonitorWorkarea(IntPtr monitor, int* xpos, int* ypos, int* width, int* height);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetMonitorWorkarea")] internal static extern unsafe void glfwGetMonitorWorkarea(IntPtr monitor, int* xpos, int* ypos, int* width, int* height);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetMonitorPhysicalSize")] internal static extern unsafe void glfwGetMonitorPhysicalSize(IntPtr monitor, int* widthMM, int* heightMM);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetMonitorPhysicalSize")] internal static extern unsafe void glfwGetMonitorPhysicalSize(IntPtr monitor, int* widthMM, int* heightMM);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetMonitorContentScale")] internal static extern unsafe void glfwGetMonitorContentScale(IntPtr monitor, float* xscale, float* yscale);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetMonitorContentScale")] internal static extern unsafe void glfwGetMonitorContentScale(IntPtr monitor, float* xscale, float* yscale);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetMonitorName")] internal static extern unsafe byte* glfwGetMonitorName(IntPtr monitor);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetMonitorName")] internal static extern unsafe byte* glfwGetMonitorName(IntPtr monitor);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetMonitorUserPointer")] internal static extern unsafe void glfwSetMonitorUserPointer(IntPtr monitor, void* pointer);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetMonitorUserPointer")] internal static extern unsafe void glfwSetMonitorUserPointer(IntPtr monitor, void* pointer);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetMonitorUserPointer")] internal static extern unsafe void* glfwGetMonitorUserPointer(IntPtr monitor);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetMonitorUserPointer")] internal static extern unsafe void* glfwGetMonitorUserPointer(IntPtr monitor);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetMonitorCallback")] internal static extern unsafe GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetMonitorCallback")] internal static extern unsafe GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetVideoModes")] internal static extern unsafe glfwVideomode* glfwGetVideoModes(IntPtr monitor, int* count);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetVideoModes")] internal static extern unsafe glfwVideomode* glfwGetVideoModes(IntPtr monitor, int* count);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetVideoMode")] internal static extern unsafe glfwVideomode* glfwGetVideoMode(IntPtr monitor);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetVideoMode")] internal static extern unsafe glfwVideomode* glfwGetVideoMode(IntPtr monitor);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetGamma")] internal static extern unsafe void glfwSetGamma(IntPtr monitor, float gamma);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetGamma")] internal static extern unsafe void glfwSetGamma(IntPtr monitor, float gamma);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetGammaRamp")] internal static extern unsafe glfwGammaramp* glfwGetGammaRamp(IntPtr monitor);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetGammaRamp")] internal static extern unsafe glfwGammaramp* glfwGetGammaRamp(IntPtr monitor);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetGammaRamp")] internal static extern unsafe void glfwSetGammaRamp(IntPtr monitor, glfwGammaramp* ramp);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetGammaRamp")] internal static extern unsafe void glfwSetGammaRamp(IntPtr monitor, glfwGammaramp* ramp);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwDefaultWindowHints")] internal static extern unsafe void glfwDefaultWindowHints();
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwDefaultWindowHints")] internal static extern unsafe void glfwDefaultWindowHints();
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwWindowHint")] internal static extern unsafe void glfwWindowHint(int hint, int value);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwWindowHint")] internal static extern unsafe void glfwWindowHint(int hint, int value);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwWindowHintString")] internal static extern unsafe void glfwWindowHintString(int hint, byte* value);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwWindowHintString")] internal static extern unsafe void glfwWindowHintString(int hint, byte* value);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwCreateWindow")] internal static extern unsafe IntPtr glfwCreateWindow(int width, int height, byte[] title, IntPtr monitor, IntPtr share);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwCreateWindow")] internal static extern unsafe IntPtr glfwCreateWindow(int width, int height, byte[] title, IntPtr monitor, IntPtr share);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwDestroyWindow")] internal static extern unsafe void glfwDestroyWindow(IntPtr window);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwDestroyWindow")] internal static extern unsafe void glfwDestroyWindow(IntPtr window);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwWindowShouldClose")] internal static extern unsafe int glfwWindowShouldClose(IntPtr window);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwWindowShouldClose")] internal static extern unsafe int glfwWindowShouldClose(IntPtr window);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowShouldClose")] internal static extern unsafe void glfwSetWindowShouldClose(IntPtr window, int value);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowShouldClose")] internal static extern unsafe void glfwSetWindowShouldClose(IntPtr window, int value);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowTitle")] internal static extern unsafe void glfwSetWindowTitle(IntPtr window, byte* title);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowTitle")] internal static extern unsafe void glfwSetWindowTitle(IntPtr window, byte* title);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowIcon")] internal static extern unsafe void glfwSetWindowIcon(IntPtr window, int count, GLFWimage* images);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowIcon")] internal static extern unsafe void glfwSetWindowIcon(IntPtr window, int count, GLFWimage* images);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetWindowPos")] internal static extern unsafe void glfwGetWindowPos(IntPtr window, int* xpos, int* ypos);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetWindowPos")] internal static extern unsafe void glfwGetWindowPos(IntPtr window, int* xpos, int* ypos);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowPos")] internal static extern unsafe void glfwSetWindowPos(IntPtr window, int xpos, int ypos);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowPos")] internal static extern unsafe void glfwSetWindowPos(IntPtr window, int xpos, int ypos);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetWindowSize")] internal static extern unsafe void glfwGetWindowSize(IntPtr window, int* width, int* height);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetWindowSize")] internal static extern unsafe void glfwGetWindowSize(IntPtr window, int* width, int* height);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowSizeLimits")] internal static extern unsafe void glfwSetWindowSizeLimits(IntPtr window, int minwidth, int minheight, int maxwidth, int maxheight);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowSizeLimits")] internal static extern unsafe void glfwSetWindowSizeLimits(IntPtr window, int minwidth, int minheight, int maxwidth, int maxheight);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowAspectRatio")] internal static extern unsafe void glfwSetWindowAspectRatio(IntPtr window, int numer, int denom);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowAspectRatio")] internal static extern unsafe void glfwSetWindowAspectRatio(IntPtr window, int numer, int denom);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowSize")] internal static extern unsafe void glfwSetWindowSize(IntPtr window, int width, int height);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowSize")] internal static extern unsafe void glfwSetWindowSize(IntPtr window, int width, int height);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetFramebufferSize")] internal static extern unsafe void glfwGetFramebufferSize(IntPtr window, int* width, int* height);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetFramebufferSize")] internal static extern unsafe void glfwGetFramebufferSize(IntPtr window, int* width, int* height);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetWindowFrameSize")] internal static extern unsafe void glfwGetWindowFrameSize(IntPtr window, int* left, int* top, int* right, int* bottom);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetWindowFrameSize")] internal static extern unsafe void glfwGetWindowFrameSize(IntPtr window, int* left, int* top, int* right, int* bottom);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetWindowContentScale")] internal static extern unsafe void glfwGetWindowContentScale(IntPtr window, float* xscale, float* yscale);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetWindowContentScale")] internal static extern unsafe void glfwGetWindowContentScale(IntPtr window, float* xscale, float* yscale);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetWindowOpacity")] internal static extern unsafe float glfwGetWindowOpacity(IntPtr window);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetWindowOpacity")] internal static extern unsafe float glfwGetWindowOpacity(IntPtr window);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowOpacity")] internal static extern unsafe void glfwSetWindowOpacity(IntPtr window, float opacity);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowOpacity")] internal static extern unsafe void glfwSetWindowOpacity(IntPtr window, float opacity);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwIconifyWindow")] internal static extern unsafe void glfwIconifyWindow(IntPtr window);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwIconifyWindow")] internal static extern unsafe void glfwIconifyWindow(IntPtr window);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwRestoreWindow")] internal static extern unsafe void glfwRestoreWindow(IntPtr window);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwRestoreWindow")] internal static extern unsafe void glfwRestoreWindow(IntPtr window);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwMaximizeWindow")] internal static extern unsafe void glfwMaximizeWindow(IntPtr window);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwMaximizeWindow")] internal static extern unsafe void glfwMaximizeWindow(IntPtr window);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwShowWindow")] internal static extern unsafe void glfwShowWindow(IntPtr window);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwShowWindow")] internal static extern unsafe void glfwShowWindow(IntPtr window);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwHideWindow")] internal static extern unsafe void glfwHideWindow(IntPtr window);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwHideWindow")] internal static extern unsafe void glfwHideWindow(IntPtr window);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwFocusWindow")] internal static extern unsafe void glfwFocusWindow(IntPtr window);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwFocusWindow")] internal static extern unsafe void glfwFocusWindow(IntPtr window);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwRequestWindowAttention")] internal static extern unsafe void glfwRequestWindowAttention(IntPtr window);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwRequestWindowAttention")] internal static extern unsafe void glfwRequestWindowAttention(IntPtr window);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetWindowMonitor")] internal static extern unsafe IntPtr glfwGetWindowMonitor(IntPtr window);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetWindowMonitor")] internal static extern unsafe IntPtr glfwGetWindowMonitor(IntPtr window);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowMonitor")] internal static extern unsafe void glfwSetWindowMonitor(IntPtr window, IntPtr monitor, int xpos, int ypos, int width, int height, int refreshRate);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowMonitor")] internal static extern unsafe void glfwSetWindowMonitor(IntPtr window, IntPtr monitor, int xpos, int ypos, int width, int height, int refreshRate);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetWindowAttrib")] internal static extern unsafe int glfwGetWindowAttrib(IntPtr window, int attrib);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetWindowAttrib")] internal static extern unsafe int glfwGetWindowAttrib(IntPtr window, int attrib);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowAttrib")] internal static extern unsafe void glfwSetWindowAttrib(IntPtr window, int attrib, int value);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowAttrib")] internal static extern unsafe void glfwSetWindowAttrib(IntPtr window, int attrib, int value);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowUserPointer")] internal static extern unsafe void glfwSetWindowUserPointer(IntPtr window, void* pointer);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowUserPointer")] internal static extern unsafe void glfwSetWindowUserPointer(IntPtr window, void* pointer);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetWindowUserPointer")] internal static extern unsafe void* glfwGetWindowUserPointer(IntPtr window);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetWindowUserPointer")] internal static extern unsafe void* glfwGetWindowUserPointer(IntPtr window);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowPosCallback")] internal static extern unsafe GLFWwindowposfun glfwSetWindowPosCallback(IntPtr window, GLFWwindowposfun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowPosCallback")] internal static extern unsafe GLFWwindowposfun glfwSetWindowPosCallback(IntPtr window, GLFWwindowposfun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowSizeCallback")] internal static extern unsafe GLFWwindowsizefun glfwSetWindowSizeCallback(IntPtr window, GLFWwindowsizefun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowSizeCallback")] internal static extern unsafe GLFWwindowsizefun glfwSetWindowSizeCallback(IntPtr window, GLFWwindowsizefun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowCloseCallback")] internal static extern unsafe GLFWwindowclosefun glfwSetWindowCloseCallback(IntPtr window, GLFWwindowclosefun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowCloseCallback")] internal static extern unsafe GLFWwindowclosefun glfwSetWindowCloseCallback(IntPtr window, GLFWwindowclosefun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowRefreshCallback")] internal static extern unsafe GLFWwindowrefreshfun glfwSetWindowRefreshCallback(IntPtr window, GLFWwindowrefreshfun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowRefreshCallback")] internal static extern unsafe GLFWwindowrefreshfun glfwSetWindowRefreshCallback(IntPtr window, GLFWwindowrefreshfun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowFocusCallback")] internal static extern unsafe GLFWwindowfocusfun glfwSetWindowFocusCallback(IntPtr window, GLFWwindowfocusfun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowFocusCallback")] internal static extern unsafe GLFWwindowfocusfun glfwSetWindowFocusCallback(IntPtr window, GLFWwindowfocusfun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowIconifyCallback")] internal static extern unsafe GLFWwindowiconifyfun glfwSetWindowIconifyCallback(IntPtr window, GLFWwindowiconifyfun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowIconifyCallback")] internal static extern unsafe GLFWwindowiconifyfun glfwSetWindowIconifyCallback(IntPtr window, GLFWwindowiconifyfun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowMaximizeCallback")] internal static extern unsafe GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(IntPtr window, GLFWwindowmaximizefun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowMaximizeCallback")] internal static extern unsafe GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(IntPtr window, GLFWwindowmaximizefun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetFramebufferSizeCallback")] internal static extern unsafe FramebuffersizeHandler glfwSetFramebufferSizeCallback(IntPtr window, IntPtr callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetFramebufferSizeCallback")] internal static extern unsafe FramebuffersizeHandler glfwSetFramebufferSizeCallback(IntPtr window, IntPtr callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetWindowContentScaleCallback")] internal static extern unsafe GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(IntPtr window, GLFWwindowcontentscalefun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetWindowContentScaleCallback")] internal static extern unsafe GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(IntPtr window, GLFWwindowcontentscalefun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwPollEvents")] internal static extern unsafe void glfwPollEvents();
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwPollEvents")] internal static extern unsafe void glfwPollEvents();
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwWaitEvents")] internal static extern unsafe void glfwWaitEvents();
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwWaitEvents")] internal static extern unsafe void glfwWaitEvents();
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwWaitEventsTimeout")] internal static extern unsafe void glfwWaitEventsTimeout(double timeout);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwWaitEventsTimeout")] internal static extern unsafe void glfwWaitEventsTimeout(double timeout);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwPostEmptyEvent")] internal static extern unsafe void glfwPostEmptyEvent();
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwPostEmptyEvent")] internal static extern unsafe void glfwPostEmptyEvent();
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetInputMode")] internal static extern unsafe int glfwGetInputMode(IntPtr window, int mode);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetInputMode")] internal static extern unsafe int glfwGetInputMode(IntPtr window, int mode);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetInputMode")] internal static extern unsafe void glfwSetInputMode(IntPtr window, int mode, int value);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetInputMode")] internal static extern unsafe void glfwSetInputMode(IntPtr window, int mode, int value);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwRawMouseMotionSupported")] internal static extern unsafe int glfwRawMouseMotionSupported();
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwRawMouseMotionSupported")] internal static extern unsafe int glfwRawMouseMotionSupported();
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetKeyName")] internal static extern unsafe byte* glfwGetKeyName(int key, int scancode);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetKeyName")] internal static extern unsafe byte* glfwGetKeyName(int key, int scancode);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetKeyScancode")] internal static extern unsafe int glfwGetKeyScancode(int key);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetKeyScancode")] internal static extern unsafe int glfwGetKeyScancode(int key);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetKey")] internal static extern unsafe KeyStatus glfwGetKey(IntPtr window, int key);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetKey")] internal static extern unsafe KeyStatus glfwGetKey(IntPtr window, int key);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetMouseButton")] internal static extern unsafe int glfwGetMouseButton(IntPtr window, int button);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetMouseButton")] internal static extern unsafe int glfwGetMouseButton(IntPtr window, int button);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetCursorPos")] internal static extern unsafe void glfwGetCursorPos(IntPtr window, double* xpos, double* ypos);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetCursorPos")] internal static extern unsafe void glfwGetCursorPos(IntPtr window, double* xpos, double* ypos);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetCursorPos")] internal static extern unsafe void glfwSetCursorPos(IntPtr window, double xpos, double ypos);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetCursorPos")] internal static extern unsafe void glfwSetCursorPos(IntPtr window, double xpos, double ypos);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwCreateCursor")] internal static extern unsafe GLFWcursor* glfwCreateCursor(GLFWimage* image, int xhot, int yhot);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwCreateCursor")] internal static extern unsafe GLFWcursor* glfwCreateCursor(GLFWimage* image, int xhot, int yhot);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwCreateStandardCursor")] internal static extern unsafe GLFWcursor* glfwCreateStandardCursor(int shape);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwCreateStandardCursor")] internal static extern unsafe GLFWcursor* glfwCreateStandardCursor(int shape);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwDestroyCursor")] internal static extern unsafe void glfwDestroyCursor(GLFWcursor* cursor);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwDestroyCursor")] internal static extern unsafe void glfwDestroyCursor(GLFWcursor* cursor);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetCursor")] internal static extern unsafe void glfwSetCursor(IntPtr window, GLFWcursor* cursor);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetCursor")] internal static extern unsafe void glfwSetCursor(IntPtr window, GLFWcursor* cursor);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetKeyCallback")] internal static extern unsafe GLFWkeyfun glfwSetKeyCallback(IntPtr window, GLFWkeyfun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetKeyCallback")] internal static extern unsafe GLFWkeyfun glfwSetKeyCallback(IntPtr window, GLFWkeyfun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetCharCallback")] internal static extern unsafe GLFWcharfun glfwSetCharCallback(IntPtr window, GLFWcharfun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetCharCallback")] internal static extern unsafe GLFWcharfun glfwSetCharCallback(IntPtr window, GLFWcharfun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetCharModsCallback")] internal static extern unsafe GLFWcharmodsfun glfwSetCharModsCallback(IntPtr window, GLFWcharmodsfun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetCharModsCallback")] internal static extern unsafe GLFWcharmodsfun glfwSetCharModsCallback(IntPtr window, GLFWcharmodsfun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetMouseButtonCallback")] internal static extern unsafe GLFWmousebuttonfun glfwSetMouseButtonCallback(IntPtr window, GLFWmousebuttonfun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetMouseButtonCallback")] internal static extern unsafe GLFWmousebuttonfun glfwSetMouseButtonCallback(IntPtr window, GLFWmousebuttonfun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetCursorPosCallback")] internal static extern unsafe GLFWcursorposfun glfwSetCursorPosCallback(IntPtr window, GLFWcursorposfun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetCursorPosCallback")] internal static extern unsafe GLFWcursorposfun glfwSetCursorPosCallback(IntPtr window, GLFWcursorposfun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetCursorEnterCallback")] internal static extern unsafe GLFWcursorenterfun glfwSetCursorEnterCallback(IntPtr window, GLFWcursorenterfun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetCursorEnterCallback")] internal static extern unsafe GLFWcursorenterfun glfwSetCursorEnterCallback(IntPtr window, GLFWcursorenterfun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetScrollCallback")] internal static extern unsafe GLFWscrollfun glfwSetScrollCallback(IntPtr window, GLFWscrollfun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetScrollCallback")] internal static extern unsafe GLFWscrollfun glfwSetScrollCallback(IntPtr window, GLFWscrollfun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetDropCallback")] internal static extern unsafe GLFWdropfun glfwSetDropCallback(IntPtr window, GLFWdropfun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetDropCallback")] internal static extern unsafe GLFWdropfun glfwSetDropCallback(IntPtr window, GLFWdropfun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwJoystickPresent")] internal static extern unsafe int glfwJoystickPresent(int jid);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwJoystickPresent")] internal static extern unsafe int glfwJoystickPresent(int jid);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetJoystickAxes")] internal static extern unsafe float* glfwGetJoystickAxes(int jid, int* count);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetJoystickAxes")] internal static extern unsafe float* glfwGetJoystickAxes(int jid, int* count);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetJoystickButtons")] internal static extern unsafe byte* glfwGetJoystickButtons(int jid, int* count);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetJoystickButtons")] internal static extern unsafe byte* glfwGetJoystickButtons(int jid, int* count);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetJoystickHats")] internal static extern unsafe byte* glfwGetJoystickHats(int jid, int* count);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetJoystickHats")] internal static extern unsafe byte* glfwGetJoystickHats(int jid, int* count);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetJoystickName")] internal static extern unsafe byte* glfwGetJoystickName(int jid);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetJoystickName")] internal static extern unsafe byte* glfwGetJoystickName(int jid);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetJoystickGUID")] internal static extern unsafe byte* glfwGetJoystickGUID(int jid);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetJoystickGUID")] internal static extern unsafe byte* glfwGetJoystickGUID(int jid);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetJoystickUserPointer")] internal static extern unsafe void glfwSetJoystickUserPointer(int jid, void* pointer);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetJoystickUserPointer")] internal static extern unsafe void glfwSetJoystickUserPointer(int jid, void* pointer);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetJoystickUserPointer")] internal static extern unsafe void* glfwGetJoystickUserPointer(int jid);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetJoystickUserPointer")] internal static extern unsafe void* glfwGetJoystickUserPointer(int jid);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwJoystickIsGamepad")] internal static extern unsafe int glfwJoystickIsGamepad(int jid);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwJoystickIsGamepad")] internal static extern unsafe int glfwJoystickIsGamepad(int jid);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetJoystickCallback")] internal static extern unsafe GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun callback);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetJoystickCallback")] internal static extern unsafe GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun callback);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwUpdateGamepadMappings")] internal static extern unsafe int glfwUpdateGamepadMappings(byte* str);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwUpdateGamepadMappings")] internal static extern unsafe int glfwUpdateGamepadMappings(byte* str);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetGamepadName")] internal static extern unsafe byte* glfwGetGamepadName(int jid);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetGamepadName")] internal static extern unsafe byte* glfwGetGamepadName(int jid);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetGamepadState")] internal static extern unsafe int glfwGetGamepadState(int jid, GLFWgamepadstate* state);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetGamepadState")] internal static extern unsafe int glfwGetGamepadState(int jid, GLFWgamepadstate* state);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetClipboardString")] internal static extern unsafe void glfwSetClipboardString(IntPtr window, byte* str);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetClipboardString")] internal static extern unsafe void glfwSetClipboardString(IntPtr window, byte* str);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetClipboardString")] internal static extern unsafe byte* glfwGetClipboardString(IntPtr window);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetClipboardString")] internal static extern unsafe byte* glfwGetClipboardString(IntPtr window);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetTime")] internal static extern unsafe double glfwGetTime();
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetTime")] internal static extern unsafe double glfwGetTime();
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSetTime")] internal static extern unsafe void glfwSetTime(double time);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSetTime")] internal static extern unsafe void glfwSetTime(double time);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetTimerValue")] internal static extern unsafe ulong* glfwGetTimerValue();
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetTimerValue")] internal static extern unsafe ulong* glfwGetTimerValue();
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetTimerFrequency")] internal static extern unsafe ulong* glfwGetTimerFrequency();
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetTimerFrequency")] internal static extern unsafe ulong* glfwGetTimerFrequency();
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwMakeContextCurrent")] internal static extern unsafe void glfwMakeContextCurrent(IntPtr window);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwMakeContextCurrent")] internal static extern unsafe void glfwMakeContextCurrent(IntPtr window);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetCurrentContext")] internal static extern unsafe IntPtr glfwGetCurrentContext();
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetCurrentContext")] internal static extern unsafe IntPtr glfwGetCurrentContext();
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSwapBuffers")] internal static extern unsafe void glfwSwapBuffers(IntPtr window);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSwapBuffers")] internal static extern unsafe void glfwSwapBuffers(IntPtr window);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwSwapInterval")] internal static extern unsafe void glfwSwapInterval(int interval);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwSwapInterval")] internal static extern unsafe void glfwSwapInterval(int interval);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwExtensionSupported")] internal static extern unsafe int glfwExtensionSupported(byte* extension);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwExtensionSupported")] internal static extern unsafe int glfwExtensionSupported(byte* extension);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetProcAddress", CharSet = CharSet.Ansi)] internal static extern unsafe IntPtr glfwGetProcAddress(string procname);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetProcAddress", CharSet = CharSet.Ansi)] internal static extern unsafe IntPtr glfwGetProcAddress(string procname);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwVulkanSupported")] internal static extern unsafe int glfwVulkanSupported();
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwVulkanSupported")] internal static extern unsafe int glfwVulkanSupported();
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "glfwGetRequiredInstanceExtensions")] internal static extern unsafe byte** glfwGetRequiredInstanceExtensions(uint* count);
|
||||
[DllImport(SSC_libName, EntryPoint = "glfwGetRequiredInstanceExtensions")] internal static extern unsafe byte** glfwGetRequiredInstanceExtensions(uint* count);
|
||||
|
||||
//[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetInstanceProcAddress")] internal extern unsafe static GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, byte* procname);
|
||||
//[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetPhysicalDevicePresentationSupport")] internal extern unsafe static int glfwGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint* queuefamily);
|
||||
|
||||
@@ -81,6 +81,12 @@ namespace StgSharp.Logic
|
||||
|
||||
public void Init(int threadCount)
|
||||
{
|
||||
if (threadCount > nodeList.Count)
|
||||
{
|
||||
InternalIO.InternalWriteLog(
|
||||
"Thread setting error: amount of threads of this blueprint is larger than amount of nodes.", LogType.Warning);
|
||||
threadCount = nodeList.Count;
|
||||
}
|
||||
if (threadCount!=0)
|
||||
{
|
||||
foreach (var item in allNode)
|
||||
@@ -105,12 +111,6 @@ namespace StgSharp.Logic
|
||||
}
|
||||
}
|
||||
nodeList.Sort();
|
||||
if (threadCount > nodeList.Count)
|
||||
{
|
||||
InternalIO.InternalWriteLog(
|
||||
"Thread setting error: amount of threads of this blueprint is larger than amount of nodes.", LogType.Warning);
|
||||
threadCount = nodeList.Count;
|
||||
}
|
||||
}
|
||||
|
||||
public void PrepareTasks(int count)
|
||||
|
||||
+206
-156
@@ -35,6 +35,7 @@ using StgSharp.Math;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
@@ -43,29 +44,43 @@ namespace StgSharp.Graphics
|
||||
public sealed class Camera : IglConvertable
|
||||
{
|
||||
|
||||
internal Uniform<Matrix44> convertedUniform;
|
||||
internal bool _isLookAtAvailable;
|
||||
internal Matrix44 cameraAtt;
|
||||
internal vec3d _target, up, cameraCoord;
|
||||
private bool _isLookAtAvailable;
|
||||
internal Matrix44 _lookAt;
|
||||
internal Matrix44 _projection;
|
||||
internal Matrix44 cameraAtt;
|
||||
internal Matrix44 rotation;
|
||||
internal Matrix44 rotationAtt;
|
||||
internal Radius _pitch;
|
||||
internal Radius _row;
|
||||
internal Radius _yaw;
|
||||
internal Uniform<Matrix44> convertedUniform;
|
||||
internal vec3d _target, up;
|
||||
|
||||
|
||||
public Camera()
|
||||
{
|
||||
cameraAtt = Matrix44.Unit;
|
||||
_target = Vec3d.Zero;
|
||||
up = Vec3d.Zero;
|
||||
cameraCoord = new vec3d(0,0,1);
|
||||
_isLookAtAvailable = false;
|
||||
_lookAt = Matrix44.Unit;
|
||||
rotationAtt = Matrix44.Unit;
|
||||
_projection = new Matrix44();
|
||||
}
|
||||
|
||||
public Camera(vec3d position, vec3d target, vec3d up) : this()
|
||||
{
|
||||
rotationAtt = Matrix44.Unit;
|
||||
cameraAtt = new Matrix44();
|
||||
SetViewDirection(position, target, up);
|
||||
_pitch = Radius.Zero;
|
||||
_row = Radius.Zero;
|
||||
_yaw = Radius.Zero;
|
||||
}
|
||||
|
||||
public Matrix44 Projection
|
||||
=> _projection;
|
||||
|
||||
public Matrix44 View
|
||||
{
|
||||
get
|
||||
@@ -75,159 +90,13 @@ namespace StgSharp.Graphics
|
||||
return _lookAt;
|
||||
}
|
||||
Matrix44 move = Matrix44.Unit;
|
||||
move.colum3.vec -= cameraCoord.vec;
|
||||
_lookAt = cameraAtt.Transpose * move;
|
||||
move.colum3.vec -= cameraAtt.colum3.vec;
|
||||
_lookAt = rotationAtt.Transpose * move;
|
||||
_isLookAtAvailable = true;
|
||||
return _lookAt;
|
||||
}
|
||||
}
|
||||
|
||||
public Matrix44 Projection
|
||||
=> _projection;
|
||||
|
||||
public void MoveNear(float distance)
|
||||
{
|
||||
cameraCoord.Z -= distance;
|
||||
}
|
||||
|
||||
public void MoveRight(float distance)
|
||||
{
|
||||
cameraCoord.X -= distance;
|
||||
}
|
||||
|
||||
public void MoveUp(float distance)
|
||||
{
|
||||
cameraCoord.Y -= distance;
|
||||
}
|
||||
|
||||
public void SetViewRange(Radius fovRadius, vec2d size, vec2d offset, (float front, float back) dephRange)
|
||||
{
|
||||
float
|
||||
distance = _target.GetLength(),
|
||||
near = distance - dephRange.front,
|
||||
far = distance + dephRange.back,
|
||||
offsetX = offset.X,
|
||||
offsetY = offset.Y,
|
||||
width = Scaler.Abs(GeometryScaler.Tan(fovRadius / 2) * near *2),
|
||||
height = width * size.Y / size.X;
|
||||
|
||||
_projection.colum0.X = 2 * near / width;
|
||||
_projection.colum1.Y = 2 * near / height;
|
||||
_projection.colum2.X = 2 * offsetX / width;
|
||||
_projection.colum2.Y = 2 * offsetY / height;
|
||||
_projection.colum2.Z = (far + near) / (near - far);
|
||||
_projection.colum2.W = -1;
|
||||
_projection.colum3.Z = 2 * near * far / (near - far);
|
||||
|
||||
}
|
||||
|
||||
public void Test(params vec4d[] vec)
|
||||
{
|
||||
Console.WriteLine(View);
|
||||
Console.WriteLine(Projection);
|
||||
Console.WriteLine(Projection * View);
|
||||
foreach (var item in vec)
|
||||
{
|
||||
Console.Write($"{Projection * View * item};");
|
||||
}
|
||||
}
|
||||
|
||||
public void Pitch(Radius r)
|
||||
{
|
||||
_isLookAtAvailable = false;
|
||||
Matrix32 partialCoord = new Matrix32(
|
||||
cameraAtt.colum1.vec,
|
||||
cameraAtt.colum2.vec
|
||||
);
|
||||
float angle = -r._radius;
|
||||
//Console.WriteLine(angle);
|
||||
Matrix22 rotation = new Matrix22(
|
||||
Scaler.Cos(angle), -Scaler.Sin(angle),
|
||||
Scaler.Sin(angle), Scaler.Cos( angle)
|
||||
);
|
||||
|
||||
partialCoord *= rotation;
|
||||
cameraAtt.colum1.vec = partialCoord.colum0.vec;
|
||||
cameraAtt.colum2.vec = partialCoord.colum1.vec;
|
||||
|
||||
cameraAtt.isTransposed = false;
|
||||
}
|
||||
|
||||
public void Row(Radius r)
|
||||
{
|
||||
_isLookAtAvailable = false;
|
||||
Matrix32 partialCoord = new Matrix32(
|
||||
cameraAtt.colum0.vec,
|
||||
cameraAtt.colum1.vec
|
||||
);
|
||||
float angle = -r._radius;
|
||||
//Console.WriteLine(angle);
|
||||
Matrix22 rotation = new Matrix22(
|
||||
Scaler.Cos(angle), -Scaler.Sin(angle),
|
||||
Scaler.Sin(angle), Scaler.Cos(angle)
|
||||
);
|
||||
|
||||
partialCoord *= rotation;
|
||||
cameraAtt.colum0.vec = partialCoord.colum0.vec;
|
||||
cameraAtt.colum1.vec = partialCoord.colum1.vec;
|
||||
|
||||
cameraAtt.isTransposed = false;
|
||||
}
|
||||
|
||||
public void Yaw(Radius r)
|
||||
{
|
||||
_isLookAtAvailable = false;
|
||||
Matrix32 partialCoord = new Matrix32(
|
||||
cameraAtt.colum0.vec,
|
||||
cameraAtt.colum2.vec
|
||||
);
|
||||
float angle = -r._radius;
|
||||
//Console.WriteLine(angle);
|
||||
Matrix22 rotation = new Matrix22(
|
||||
Scaler.Cos(angle), -Scaler.Sin(angle),
|
||||
Scaler.Sin(angle), Scaler.Cos(angle)
|
||||
);
|
||||
|
||||
partialCoord *= rotation;
|
||||
cameraAtt.colum0.vec = partialCoord.colum0.vec;
|
||||
cameraAtt.colum2.vec = partialCoord.colum1.vec;
|
||||
|
||||
cameraAtt.isTransposed = false;
|
||||
}
|
||||
|
||||
public void SetViewDirection(vec3d position, vec3d target, vec3d up)
|
||||
{
|
||||
vec3d direction = position - target;
|
||||
if (position == cameraCoord && this.up == up && cameraAtt.colum2.vec == direction.vec)
|
||||
{
|
||||
//no difference with precious value
|
||||
return;
|
||||
}
|
||||
if (direction.GetLength() == 0)
|
||||
{
|
||||
//deadlock
|
||||
throw new ArgumentException();
|
||||
}
|
||||
if (Vec3d.IsParallel(direction, up))
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
_target = direction;
|
||||
cameraCoord = position;
|
||||
this.up = up;
|
||||
|
||||
_isLookAtAvailable = false;
|
||||
|
||||
Linear.Normalize(ref direction, ref up);
|
||||
|
||||
vec3d right = Linear.Normalize(Linear.Cross(up,direction));
|
||||
|
||||
cameraAtt.colum0.vec = right.vec;
|
||||
cameraAtt.colum1.vec = up.vec;
|
||||
cameraAtt.colum2.vec = direction.vec;
|
||||
cameraAtt.isTransposed = false;
|
||||
}
|
||||
|
||||
public void DisplayGLtypeDefinition()
|
||||
{
|
||||
Console.WriteLine("uniform matrix4x4 cameraName;");
|
||||
@@ -244,23 +113,204 @@ namespace StgSharp.Graphics
|
||||
/// <exception cref="ArgumentException"></exception>
|
||||
public unsafe void GainAllUniforms(ShaderProgram source, params string[] uniformName)
|
||||
{
|
||||
if (uniformName.Length!=1)
|
||||
if (uniformName.Length != 1)
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
convertedUniform = source.GetUniform<Matrix44>(uniformName[0]);
|
||||
}
|
||||
|
||||
ShaderStruct IglConvertable.GetConvertedGLtype()
|
||||
public void MoveNear(float distance)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
cameraAtt.colum3.Z -= distance;
|
||||
_isLookAtAvailable = false;
|
||||
}
|
||||
|
||||
public void MoveRight(float distance)
|
||||
{
|
||||
cameraAtt.colum3.X -= distance;
|
||||
_isLookAtAvailable = false;
|
||||
}
|
||||
|
||||
public void MoveUp(float distance)
|
||||
{
|
||||
cameraAtt.colum3.Y -= distance;
|
||||
_isLookAtAvailable = false;
|
||||
}
|
||||
|
||||
|
||||
public unsafe void SetAllUniforms()
|
||||
{
|
||||
//Console.WriteLine(Projection * View);
|
||||
GL.SetValue(convertedUniform, Projection * View);
|
||||
}
|
||||
|
||||
public void SetViewDirection(vec3d position, vec3d target, vec3d up)
|
||||
{
|
||||
vec3d direction = position - target;
|
||||
if ((position.vec == cameraAtt.colum3.vec) && (this.up == up) && (cameraAtt.colum2.vec == direction.vec))
|
||||
{
|
||||
//no difference with precious value
|
||||
return;
|
||||
}
|
||||
if (direction.GetLength() == 0)
|
||||
{
|
||||
//deadlock
|
||||
throw new ArgumentException();
|
||||
}
|
||||
if (Vec3d.IsParallel(direction, up))
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
_target = direction;
|
||||
this.up = up;
|
||||
|
||||
_isLookAtAvailable = false;
|
||||
|
||||
Linear.Normalize(ref direction, ref up);
|
||||
|
||||
vec3d right = Linear.Normalize(Linear.Cross(up, direction));
|
||||
|
||||
cameraAtt.colum0.vec = right.vec;
|
||||
cameraAtt.colum1.vec = up.vec;
|
||||
cameraAtt.colum2.vec = direction.vec;
|
||||
cameraAtt.colum3.vec = position.vec;
|
||||
|
||||
InternalPitch();
|
||||
InternalRow();
|
||||
InternalYaw();
|
||||
|
||||
}
|
||||
|
||||
public void SetViewRange(Radius fovRadius, vec2d size, vec2d offset, (float front, float back) dephRange)
|
||||
{
|
||||
float
|
||||
distance = _target.GetLength(),
|
||||
near = distance - dephRange.front,
|
||||
far = distance + dephRange.back,
|
||||
offsetX = offset.X,
|
||||
offsetY = offset.Y,
|
||||
width = Scaler.Abs(GeometryScaler.Tan(fovRadius / 2) * near * 2),
|
||||
height = (width * size.Y) / size.X;
|
||||
|
||||
_projection.colum0.X = (2 * near) / width;
|
||||
_projection.colum1.Y = (2 * near) / height;
|
||||
_projection.colum2.X = (2 * offsetX) / width;
|
||||
_projection.colum2.Y = (2 * offsetY) / height;
|
||||
_projection.colum2.Z = (far + near) / (near - far);
|
||||
_projection.colum2.W = -1;
|
||||
_projection.colum3.Z = (2 * near * far) / (near - far);
|
||||
|
||||
}
|
||||
|
||||
public void Test(params vec4d[] vec)
|
||||
{
|
||||
Console.WriteLine(View);
|
||||
Console.WriteLine(Projection);
|
||||
Console.WriteLine(Projection * View);
|
||||
Console.WriteLine(View);
|
||||
foreach (var item in vec)
|
||||
{
|
||||
Console.Write($"{Projection * View * item};");
|
||||
}
|
||||
}
|
||||
|
||||
#region ratation
|
||||
|
||||
public void Yaw(Radius r)
|
||||
{
|
||||
_yaw -= r;
|
||||
//Console.WriteLine(_yaw._radius);
|
||||
//Console.WriteLine(rotationAtt);
|
||||
InternalYaw();
|
||||
}
|
||||
|
||||
public void Pitch(Radius r)
|
||||
{
|
||||
_pitch -= r;
|
||||
//Console.WriteLine(_pitch._radius);
|
||||
//Console.WriteLine(rotationAtt);
|
||||
InternalPitch();
|
||||
}
|
||||
|
||||
public void Row(Radius r)
|
||||
{
|
||||
_row -= r;
|
||||
//Console.WriteLine(_row._radius);
|
||||
//Console.WriteLine(rotationAtt);
|
||||
InternalRow();
|
||||
}
|
||||
|
||||
internal void InternalPitch()
|
||||
{
|
||||
_isLookAtAvailable = false;
|
||||
|
||||
Matrix32 partialCoord = new Matrix32(
|
||||
cameraAtt.colum1.vec,
|
||||
cameraAtt.colum2.vec
|
||||
);
|
||||
float angle = _pitch._radius;
|
||||
|
||||
Matrix22 rotation = new Matrix22(
|
||||
Scaler.Cos(angle), -Scaler.Sin(angle),
|
||||
Scaler.Sin(angle), Scaler.Cos(angle)
|
||||
);
|
||||
|
||||
partialCoord *= rotation;
|
||||
rotationAtt.colum1.vec = partialCoord.colum0.vec;
|
||||
rotationAtt.colum2.vec = partialCoord.colum1.vec;
|
||||
rotationAtt.isTransposed = false;
|
||||
}
|
||||
|
||||
internal void InternalRow()
|
||||
{
|
||||
_isLookAtAvailable = false;
|
||||
|
||||
Matrix32 partialCoord = new Matrix32(
|
||||
cameraAtt.colum0.vec,
|
||||
cameraAtt.colum1.vec
|
||||
);
|
||||
float angle = _row._radius;
|
||||
|
||||
Matrix22 rotation = new Matrix22(
|
||||
Scaler.Cos(angle), -Scaler.Sin(angle),
|
||||
Scaler.Sin(angle), Scaler.Cos(angle)
|
||||
);
|
||||
|
||||
partialCoord *= rotation;
|
||||
rotationAtt.colum0.vec = partialCoord.colum0.vec;
|
||||
rotationAtt.colum1.vec = partialCoord.colum1.vec;
|
||||
rotationAtt.isTransposed = false;
|
||||
}
|
||||
|
||||
internal void InternalYaw()
|
||||
{
|
||||
_isLookAtAvailable = false;
|
||||
|
||||
Matrix32 partialCoord = new Matrix32(
|
||||
cameraAtt.colum0.vec,
|
||||
cameraAtt.colum2.vec
|
||||
);
|
||||
float angle = _yaw._radius;
|
||||
Matrix22 rotation = new Matrix22(
|
||||
Scaler.Cos(angle), -Scaler.Sin(angle),
|
||||
Scaler.Sin(angle), Scaler.Cos(angle)
|
||||
);
|
||||
|
||||
partialCoord *= rotation;
|
||||
rotationAtt.colum0.vec = partialCoord.colum0.vec;
|
||||
rotationAtt.colum2.vec = partialCoord.colum1.vec;
|
||||
rotationAtt.isTransposed = false;
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
ShaderStruct IglConvertable.GetConvertedGLtype()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
~Camera()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace StgSharp
|
||||
|
||||
internal static partial class InternalIO
|
||||
{
|
||||
[DllImport(SSC_libname, EntryPoint = "normalize",
|
||||
[DllImport(SSC_libName, EntryPoint = "normalize",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void Normalize(M128* source, M128* target);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace StgSharp
|
||||
|
||||
#region add
|
||||
|
||||
[DllImport(InternalIO.SSC_libname, EntryPoint = "add_Mat2",
|
||||
[DllImport(InternalIO.SSC_libName, EntryPoint = "add_Mat2",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static extern Mat2* add_mat2(Mat2* left, Mat2* right);
|
||||
@@ -52,7 +52,7 @@ namespace StgSharp
|
||||
|
||||
#region deinit mat2
|
||||
|
||||
[DllImport(InternalIO.SSC_libname, EntryPoint = "deinit_mat2",
|
||||
[DllImport(InternalIO.SSC_libName, EntryPoint = "deinit_mat2",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static extern unsafe void deinit_mat2(Mat2* mat);
|
||||
@@ -61,7 +61,7 @@ namespace StgSharp
|
||||
|
||||
#region sub
|
||||
|
||||
[DllImport(InternalIO.SSC_libname, EntryPoint = "sub_mat2",
|
||||
[DllImport(InternalIO.SSC_libName, EntryPoint = "sub_mat2",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static extern unsafe Mat2* sub_mat2(Mat2* left, Mat2* right);
|
||||
@@ -71,12 +71,12 @@ namespace StgSharp
|
||||
#region transpose
|
||||
|
||||
|
||||
[DllImport(InternalIO.SSC_libname, EntryPoint = "transpose2to4",
|
||||
[DllImport(InternalIO.SSC_libName, EntryPoint = "transpose2to4",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static extern unsafe void Transpose2to4_internal(Mat2* source, Mat4* target);
|
||||
|
||||
[DllImport(InternalIO.SSC_libname, EntryPoint = "transpose2to3",
|
||||
[DllImport(InternalIO.SSC_libName, EntryPoint = "transpose2to3",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static extern unsafe void Transpose2to3_internal(Mat2* source, Mat3* target);
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace StgSharp
|
||||
|
||||
#region det
|
||||
|
||||
[DllImport(InternalIO.SSC_libname, EntryPoint = "det_mat3",
|
||||
[DllImport(InternalIO.SSC_libName, EntryPoint = "det_mat3",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static extern unsafe float det_mat3(Mat3* mat);
|
||||
@@ -51,15 +51,15 @@ namespace StgSharp
|
||||
|
||||
#region transpose
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "transpose3to4",
|
||||
[DllImport(SSC_libName, EntryPoint = "transpose3to4",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void Transpose3to4_internal(Mat3* source, Mat4* target);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "transpose3to3",
|
||||
[DllImport(SSC_libName, EntryPoint = "transpose3to3",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void Transpose3to3_internal(Mat3* source, Mat3* target);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "transpose3to2",
|
||||
[DllImport(SSC_libName, EntryPoint = "transpose3to2",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void Transpose3to2_internal(Mat3* source, Mat2* target);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace StgSharp
|
||||
#region deinit_mat4
|
||||
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "deinit_mat4",
|
||||
[DllImport(SSC_libName, EntryPoint = "deinit_mat4",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static extern void deinit_mat4(Mat4* mat);
|
||||
@@ -53,7 +53,7 @@ namespace StgSharp
|
||||
|
||||
#region det
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "det_mat4",
|
||||
[DllImport(SSC_libName, EntryPoint = "det_mat4",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static extern unsafe float det_mat4(Mat4* matPtr, Mat4* transpose);
|
||||
@@ -63,15 +63,15 @@ namespace StgSharp
|
||||
|
||||
#region transpose
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "transpose4to4",
|
||||
[DllImport(SSC_libName, EntryPoint = "transpose4to4",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void Transpose4to4_internal(Mat4* source, Mat4* target);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "transpose4to3",
|
||||
[DllImport(SSC_libName, EntryPoint = "transpose4to3",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void Transpose4to3_internal(Mat4* source, Mat3* target);
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "transpose4to2",
|
||||
[DllImport(SSC_libName, EntryPoint = "transpose4to2",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void Transpose4to2_internal(Mat4* source, Mat2* target);
|
||||
|
||||
|
||||
@@ -29,10 +29,15 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Controlling;
|
||||
using StgSharp.Math.HighPrecession;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.Intrinsics.Arm;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Math
|
||||
@@ -77,14 +82,39 @@ namespace StgSharp.Math
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
private static byte[] randomSeed;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static float Random()
|
||||
public static T Random<T>() where T : struct, IConvertible
|
||||
#if NET8_0_OR_GREATER
|
||||
,INumber
|
||||
#endif
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
if (randomSeed==null)
|
||||
{
|
||||
randomSeed = new byte[64];
|
||||
var originSeed =
|
||||
$"{(Assembly.GetEntryAssembly()==null? Assembly.GetAssembly(typeof(StgSharp))!:
|
||||
Assembly.GetEntryAssembly())}" +
|
||||
$"{DateTime.UtcNow.ToString("o")}";
|
||||
using (SHA256 sha = SHA256.Create())
|
||||
{
|
||||
randomSeed = sha.ComputeHash(Encoding.UTF8.GetBytes(originSeed));
|
||||
}
|
||||
}
|
||||
using (SHA256 sha = SHA256.Create())
|
||||
{
|
||||
randomSeed = sha.ComputeHash(randomSeed);
|
||||
}
|
||||
fixed (byte* bptr = randomSeed)
|
||||
{
|
||||
return *(T*)bptr;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -9,21 +9,13 @@
|
||||
".NETStandard,Version=v2.1/": {
|
||||
"StgSharp/1.0.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.Bcl.HashCode": "1.1.1",
|
||||
"Microsoft.CSharp": "4.7.0"
|
||||
"Microsoft.CSharp": "4.7.0",
|
||||
"Microsoft.Windows.CsWin32": "0.3.49-beta"
|
||||
},
|
||||
"runtime": {
|
||||
"StgSharp.dll": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.Bcl.HashCode/1.1.1": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.1/Microsoft.Bcl.HashCode.dll": {
|
||||
"assemblyVersion": "1.0.0.0",
|
||||
"fileVersion": "4.700.20.56604"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.CSharp/4.7.0": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/Microsoft.CSharp.dll": {
|
||||
@@ -31,6 +23,59 @@
|
||||
"fileVersion": "4.700.19.56404"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Windows.CsWin32/0.3.49-beta": {
|
||||
"dependencies": {
|
||||
"Microsoft.Windows.SDK.Win32Docs": "0.1.42-alpha",
|
||||
"Microsoft.Windows.SDK.Win32Metadata": "55.0.45-preview",
|
||||
"Microsoft.Windows.WDK.Win32Metadata": "0.9.9-experimental",
|
||||
"System.Memory": "4.5.5",
|
||||
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
|
||||
}
|
||||
},
|
||||
"Microsoft.Windows.SDK.Win32Docs/0.1.42-alpha": {},
|
||||
"Microsoft.Windows.SDK.Win32Metadata/55.0.45-preview": {},
|
||||
"Microsoft.Windows.WDK.Win32Metadata/0.9.9-experimental": {
|
||||
"dependencies": {
|
||||
"Microsoft.Windows.SDK.Win32Metadata": "55.0.45-preview"
|
||||
}
|
||||
},
|
||||
"System.Buffers/4.5.1": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Buffers.dll": {
|
||||
"assemblyVersion": "4.0.3.0",
|
||||
"fileVersion": "4.6.28619.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Memory/4.5.5": {
|
||||
"dependencies": {
|
||||
"System.Buffers": "4.5.1",
|
||||
"System.Numerics.Vectors": "4.4.0",
|
||||
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Memory.dll": {
|
||||
"assemblyVersion": "4.0.1.2",
|
||||
"fileVersion": "4.6.31308.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Numerics.Vectors/4.4.0": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Numerics.Vectors.dll": {
|
||||
"assemblyVersion": "4.1.3.0",
|
||||
"fileVersion": "4.6.25519.3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": {
|
||||
"assemblyVersion": "6.0.0.0",
|
||||
"fileVersion": "6.0.21.52210"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -40,19 +85,68 @@
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Microsoft.Bcl.HashCode/1.1.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-MalY0Y/uM/LjXtHfX/26l2VtN4LDNZ2OE3aumNOHDLsT4fNYy2hiHXI4CXCqKpNUNm7iJ2brrc4J89UdaL56FA==",
|
||||
"path": "microsoft.bcl.hashcode/1.1.1",
|
||||
"hashPath": "microsoft.bcl.hashcode.1.1.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.CSharp/4.7.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA==",
|
||||
"path": "microsoft.csharp/4.7.0",
|
||||
"hashPath": "microsoft.csharp.4.7.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Windows.CsWin32/0.3.49-beta": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-/iAXplVDKESFyLz/MShuVYVx62YFvFePpq3qrzREl8KScQqG6Z2kV7r9UJTjQS1g+hfy3V+e4m1x9lsu24YNSg==",
|
||||
"path": "microsoft.windows.cswin32/0.3.49-beta",
|
||||
"hashPath": "microsoft.windows.cswin32.0.3.49-beta.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Windows.SDK.Win32Docs/0.1.42-alpha": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-Z/9po23gUA9aoukirh2ItMU2ZS9++Js9Gdds9fu5yuMojDrmArvY2y+tq9985tR3cxFxpZO1O35Wjfo0khj5HA==",
|
||||
"path": "microsoft.windows.sdk.win32docs/0.1.42-alpha",
|
||||
"hashPath": "microsoft.windows.sdk.win32docs.0.1.42-alpha.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Windows.SDK.Win32Metadata/55.0.45-preview": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-2i1kVIk8rMuMCYtoeYeWbmCRLqNgb63Berac3Gv+J/pjp0oucopasKgLQNslryhsgBl4xex9ENhJX2MXEW5vdA==",
|
||||
"path": "microsoft.windows.sdk.win32metadata/55.0.45-preview",
|
||||
"hashPath": "microsoft.windows.sdk.win32metadata.55.0.45-preview.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Windows.WDK.Win32Metadata/0.9.9-experimental": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-cncPlxLqR25mFOuvpxZPgXgJqRmXyV5eTULj/9w8AQvO/c1xJDEapohRsWkYaia7hCR/EwEzBHr7RU9u93T03w==",
|
||||
"path": "microsoft.windows.wdk.win32metadata/0.9.9-experimental",
|
||||
"hashPath": "microsoft.windows.wdk.win32metadata.0.9.9-experimental.nupkg.sha512"
|
||||
},
|
||||
"System.Buffers/4.5.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==",
|
||||
"path": "system.buffers/4.5.1",
|
||||
"hashPath": "system.buffers.4.5.1.nupkg.sha512"
|
||||
},
|
||||
"System.Memory/4.5.5": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==",
|
||||
"path": "system.memory/4.5.5",
|
||||
"hashPath": "system.memory.4.5.5.nupkg.sha512"
|
||||
},
|
||||
"System.Numerics.Vectors/4.4.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==",
|
||||
"path": "system.numerics.vectors/4.4.0",
|
||||
"hashPath": "system.numerics.vectors.4.4.0.nupkg.sha512"
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==",
|
||||
"path": "system.runtime.compilerservices.unsafe/6.0.0",
|
||||
"hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8149dfacb01d49f8173ee2799eb2bc20f34ee231")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+66efce19fcb461782c49255dc5500144f8c267e6")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/8149dfacb01d49f8173ee2799eb2bc20f34ee231/*"}}
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/66efce19fcb461782c49255dc5500144f8c267e6/*"}}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
|
||||
@@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+66efce19fcb461782c49255dc5500144f8c267e6")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// 由 MSBuild WriteCodeFragment 类生成。
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+98aa111a299366695c7ec9bbfdce90445050afa2")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+66efce19fcb461782c49255dc5500144f8c267e6")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9a10ec201c1e78c441727446c2649fae962d9b7a")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+66efce19fcb461782c49255dc5500144f8c267e6")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -17,7 +17,7 @@ SSCAPI void SSCDECL initGL(int majorVersion, int minorVersion)
|
||||
SSCAPI GLFWglproc SSCDECL loadGlfuncDefault(char* procName)
|
||||
{
|
||||
void* ret = glfwGetProcAddress(procName);
|
||||
printf("%llu\n", (uint64_t)ret);
|
||||
//printf("%llu\n", (uint64_t)ret);
|
||||
if (ret = NULL)
|
||||
{
|
||||
*infolog = "Failed to load OpenGL api:";
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>PGOptimize</WholeProgramOptimization>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
@@ -76,6 +76,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)</OutDir>
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
@@ -136,9 +137,10 @@
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<AssemblerOutput>All</AssemblerOutput>
|
||||
<AssemblerOutput>AssemblyAndMachineCode</AssemblerOutput>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
<LanguageStandard_C>stdc17</LanguageStandard_C>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -146,6 +148,8 @@
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>opengl32.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerbose</ShowProgress>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC.dll.lastcodeanalysissucceeded
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\x64\Debug\NativeCodeAnalysis.read.1.tlog
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#version 330 core
|
||||
|
||||
in vec4 TexColor;
|
||||
in vec2 TexCoord;
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
uniform vec4 color;
|
||||
uniform sampler2D ourTexture;
|
||||
uniform sampler2D ourTexture2;
|
||||
|
||||
@@ -12,6 +12,6 @@ void main()
|
||||
{
|
||||
vec4 tex1 = texture(ourTexture, TexCoord);
|
||||
vec4 tex2 = texture(ourTexture2,TexCoord);
|
||||
FragColor = mix(tex1 * vec4( TexColor.xyz, 1.0), tex2, 0.2) /* *vec4( TexColor,1.0) /**/;
|
||||
FragColor = mix(tex1 * vec4( color.xyz, 1.0), tex2, 0.2) /* *vec4( TexColor,1.0) /**/;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,23 +4,13 @@ layout(location = 0) in vec3 aPos;
|
||||
layout(location = 1) in vec3 aColor;
|
||||
layout(location = 2) in vec2 aTextCoord;
|
||||
|
||||
out vec4 TexColor;
|
||||
out vec2 TexCoord;
|
||||
|
||||
uniform vec4 color;
|
||||
uniform mat4x4 camera;
|
||||
|
||||
void main()
|
||||
{
|
||||
float as = sin( color.w );
|
||||
float ac = cos( color.w );
|
||||
mat4x4 rotation = mat4x4(
|
||||
ac,-as,0,0,
|
||||
as,ac,0,0,
|
||||
0,0,1,0,
|
||||
0,0,0,1
|
||||
);
|
||||
TexColor = color;
|
||||
|
||||
TexCoord = aTextCoord;
|
||||
vec4 temp = vec4(aPos.xyz,1.0);
|
||||
gl_Position = /**/ camera * /**/ temp;
|
||||
|
||||
@@ -1,4 +1,34 @@
|
||||
using StgSharp;
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="MainRenderStream.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;
|
||||
using StgSharp.Geometries;
|
||||
using StgSharp.Graphics;
|
||||
using StgSharp.Logic;
|
||||
@@ -15,12 +45,13 @@ namespace StgSharp
|
||||
|
||||
public class MainRenderStream : glRenderStream
|
||||
{
|
||||
private Uniform<float, float, float, float> color;
|
||||
|
||||
private ElementBuffer ebo;
|
||||
private Uniform<int> ourTexture;
|
||||
private Uniform<int> ourTexture2;
|
||||
private ShaderProgram shader;
|
||||
private Texture texture;
|
||||
private Uniform<float, float, float, float> color;
|
||||
private Uniform<int> ourTexture;
|
||||
private Uniform<int> ourTexture2;
|
||||
private VertexArray vao;
|
||||
private VertexBuffer vbo;
|
||||
|
||||
@@ -42,16 +73,13 @@ namespace StgSharp
|
||||
/**/
|
||||
}
|
||||
|
||||
protected sealed override void Init()
|
||||
protected override sealed void Init()
|
||||
{
|
||||
SetSizeLimit(800, 800, 800, 800);
|
||||
|
||||
|
||||
FrameSizeCallback =
|
||||
(IntPtr id, uint width, uint height) =>
|
||||
{
|
||||
GL.Viewport(0, 0, width, height);
|
||||
};
|
||||
(IntPtr id, uint width, uint height) => GL.Viewport(0, 0, width, height);
|
||||
|
||||
shader = CreateShaderProgram();
|
||||
var vertex = CreateShaderSegment(ShaderType.Vertex, 1);
|
||||
@@ -122,19 +150,19 @@ namespace StgSharp
|
||||
new vec3d(0, 0, 100),
|
||||
new vec3d(0, 1, 0)
|
||||
);
|
||||
NativeCameraViewRange(new Degree(5),(0, 0), (50f, 50f));
|
||||
NativeCameraUniform(shader, "NativeCamera");
|
||||
|
||||
NativeCameraViewRange(new Degree(10f), (0, 0), (50f, 50f));
|
||||
NativeCameraUniform(shader, "camera");
|
||||
|
||||
}
|
||||
|
||||
protected sealed override void Main(
|
||||
protected override sealed void Main(
|
||||
in Dictionary<string, BlueprintPipeline> input,
|
||||
in Dictionary<string, BlueprintPipeline> output
|
||||
)
|
||||
{
|
||||
GL.ClearColor(0.333f, 0.555f, 0.555f, 1.0f);
|
||||
//Console.WriteLine(1);
|
||||
GL.Clear(MaskBufferBit.COLOR | MaskBufferBit.DEPTH);
|
||||
GL.Clear(MaskBufferBit.COLOR /**/| MaskBufferBit.DEPTH /**/ );
|
||||
|
||||
/**/
|
||||
vao.Bind(0);
|
||||
@@ -148,29 +176,26 @@ namespace StgSharp
|
||||
/**/
|
||||
|
||||
/**/
|
||||
float time = /* CurrentFrameCount / /**/ 60.0f;
|
||||
float time = /* CurrentFrameCount, / /**/ 60.0f;
|
||||
|
||||
//Console.WriteLine(2);
|
||||
|
||||
GL.SetValue(color,
|
||||
0.5f + MathF.Cos(time),
|
||||
0.5f + MathF.Sin(time * 0.66667f + (2 * Scaler.Pi / 3)),
|
||||
0.5f + MathF.Sin(time * 0.33333f + (Scaler.Pi / 3)),
|
||||
0.5f + MathF.Sin((time * 0.66667f) + ((2 * Scaler.Pi) / 3)),
|
||||
0.5f + MathF.Sin((time * 0.33333f) + (Scaler.Pi / 3)),
|
||||
time
|
||||
);
|
||||
|
||||
NativeCamera.SetAllUniforms();
|
||||
/**/
|
||||
|
||||
//Console.WriteLine(NativeCamera.Projection);
|
||||
|
||||
GL.DrawElements(GepmetryType.TRIANGLES, 6, TypeCode.UInt32, IntPtr.Zero);
|
||||
|
||||
//vao.BindNull();
|
||||
vao.BindNull();
|
||||
/**/
|
||||
//Console.WriteLine(3);
|
||||
BlueprintPipeline.SkipAll(output);
|
||||
|
||||
//Console.WriteLine(4);
|
||||
//Console.Clear();
|
||||
}
|
||||
|
||||
protected override void ProcessInput()
|
||||
@@ -183,20 +208,25 @@ namespace StgSharp
|
||||
}
|
||||
if (InternalIO.glfwGetKey(this.CanvasHandle, GLconst.GLFW_KEY_UP) == KeyStatus.PRESS)
|
||||
{
|
||||
//Console.WriteLine(8);
|
||||
NativeCamera.Pitch(new Radius(movement));
|
||||
}
|
||||
else if (InternalIO.glfwGetKey(this.CanvasHandle, GLconst.GLFW_KEY_DOWN) == KeyStatus.PRESS)
|
||||
{
|
||||
//Console.WriteLine(2);
|
||||
NativeCamera.Pitch(new Radius(-movement));
|
||||
}
|
||||
if (InternalIO.glfwGetKey(CanvasHandle, GLconst.GLFW_KEY_LEFT) == KeyStatus.PRESS)
|
||||
{
|
||||
//Console.WriteLine(4);
|
||||
NativeCamera.Yaw(new Radius(-movement));
|
||||
}
|
||||
else if (InternalIO.glfwGetKey(CanvasHandle, GLconst.GLFW_KEY_RIGHT) == KeyStatus.PRESS)
|
||||
{
|
||||
//Console.WriteLine(6);
|
||||
NativeCamera.Yaw(new Radius(movement));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace StgSharp
|
||||
{
|
||||
try
|
||||
{
|
||||
InternalIO.InternalWriteLog($"\n\n\nProgram Started",LogType.Info);
|
||||
InternalIO.InternalWriteLog($"Program Started",LogType.Info);
|
||||
|
||||
//StgSharp.TryCreatWindow();
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8149dfacb01d49f8173ee2799eb2bc20f34ee231")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+66efce19fcb461782c49255dc5500144f8c267e6")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/8149dfacb01d49f8173ee2799eb2bc20f34ee231/*"}}
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/66efce19fcb461782c49255dc5500144f8c267e6/*"}}
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9a10ec201c1e78c441727446c2649fae962d9b7a")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+66efce19fcb461782c49255dc5500144f8c267e6")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+98aa111a299366695c7ec9bbfdce90445050afa2")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+66efce19fcb461782c49255dc5500144f8c267e6")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/98aa111a299366695c7ec9bbfdce90445050afa2/*"}}
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/66efce19fcb461782c49255dc5500144f8c267e6/*"}}
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9a10ec201c1e78c441727446c2649fae962d9b7a")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+66efce19fcb461782c49255dc5500144f8c267e6")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/9a10ec201c1e78c441727446c2649fae962d9b7a/*"}}
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/66efce19fcb461782c49255dc5500144f8c267e6/*"}}
|
||||
@@ -33,7 +33,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||
.editorconfig = .editorconfig
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OEM", "OEM\OEM.csproj", "{183AA95A-FEBD-42A5-A205-AB7048678251}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OEM", "OEM\OEM.csproj", "{183AA95A-FEBD-42A5-A205-AB7048678251}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -61,8 +61,8 @@ Global
|
||||
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Benchmark|x86.Build.0 = Benchmark|Any CPU
|
||||
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Debug|x64.Build.0 = Debug|x64
|
||||
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Debug|x64.ActiveCfg = Release|x64
|
||||
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Debug|x64.Build.0 = Release|x64
|
||||
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.RealDebug|Any CPU.ActiveCfg = RealDebug|Any CPU
|
||||
@@ -85,8 +85,8 @@ Global
|
||||
{610B992B-BB34-49C3-9993-676C595FC12E}.Benchmark|x64.ActiveCfg = Benchmark|x64
|
||||
{610B992B-BB34-49C3-9993-676C595FC12E}.Benchmark|x86.ActiveCfg = Benchmark|Any CPU
|
||||
{610B992B-BB34-49C3-9993-676C595FC12E}.Benchmark|x86.Build.0 = Benchmark|Any CPU
|
||||
{610B992B-BB34-49C3-9993-676C595FC12E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{610B992B-BB34-49C3-9993-676C595FC12E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{610B992B-BB34-49C3-9993-676C595FC12E}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{610B992B-BB34-49C3-9993-676C595FC12E}.Debug|Any CPU.Build.0 = Debug|x64
|
||||
{610B992B-BB34-49C3-9993-676C595FC12E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{610B992B-BB34-49C3-9993-676C595FC12E}.Debug|x64.Build.0 = Debug|x64
|
||||
{610B992B-BB34-49C3-9993-676C595FC12E}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
@@ -205,7 +205,6 @@ Global
|
||||
{183AA95A-FEBD-42A5-A205-AB7048678251}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{183AA95A-FEBD-42A5-A205-AB7048678251}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{183AA95A-FEBD-42A5-A205-AB7048678251}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{183AA95A-FEBD-42A5-A205-AB7048678251}.Release|x64.Build.0 = Release|Any CPU
|
||||
{183AA95A-FEBD-42A5-A205-AB7048678251}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{183AA95A-FEBD-42A5-A205-AB7048678251}.Release|x86.Build.0 = Release|Any CPU
|
||||
{183AA95A-FEBD-42A5-A205-AB7048678251}.Toollist|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgsharpEnvDebug")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0cd01ed9ddc7e151899218121d69a29650b39b34")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+66efce19fcb461782c49255dc5500144f8c267e6")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgsharpEnvDebug")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgsharpEnvDebug")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgsharpEnvDebug")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9a10ec201c1e78c441727446c2649fae962d9b7a")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+66efce19fcb461782c49255dc5500144f8c267e6")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgsharpEnvDebug")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgsharpEnvDebug")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
@@ -2,6 +2,14 @@
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u7F16\u7801\u5668\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{B33F35F1-0A92-4D72-B334-FE0565F64BF7}|StgSharpData\\StgSharpData.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u7F16\u7801\u5668\\stgsharpdata\\ssd\\ssdraw.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{B33F35F1-0A92-4D72-B334-FE0565F64BF7}|StgSharpData\\StgSharpData.csproj|solutionrelative:stgsharpdata\\ssd\\ssdraw.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{B33F35F1-0A92-4D72-B334-FE0565F64BF7}|StgSharpData\\StgSharpData.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u7F16\u7801\u5668\\stgsharpdata\\ssd\\ssd.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{B33F35F1-0A92-4D72-B334-FE0565F64BF7}|StgSharpData\\StgSharpData.csproj|solutionrelative:stgsharpdata\\ssd\\ssd.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{E8A7C475-2369-4673-B299-9BFDE38B950D}|SSD_Test\\SSD_Test.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u7F16\u7801\u5668\\ssd_test\\unittest1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{E8A7C475-2369-4673-B299-9BFDE38B950D}|SSD_Test\\SSD_Test.csproj|solutionrelative:ssd_test\\unittest1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
@@ -26,14 +34,6 @@
|
||||
"AbsoluteMoniker": "D:0:0:{B33F35F1-0A92-4D72-B334-FE0565F64BF7}|StgSharpData\\StgSharpData.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u7F16\u7801\u5668\\stgsharpdata\\ssd\\ssdvirtualfolder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{B33F35F1-0A92-4D72-B334-FE0565F64BF7}|StgSharpData\\StgSharpData.csproj|solutionrelative:stgsharpdata\\ssd\\ssdvirtualfolder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{B33F35F1-0A92-4D72-B334-FE0565F64BF7}|StgSharpData\\StgSharpData.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u7F16\u7801\u5668\\stgsharpdata\\ssd\\ssdraw.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{B33F35F1-0A92-4D72-B334-FE0565F64BF7}|StgSharpData\\StgSharpData.csproj|solutionrelative:stgsharpdata\\ssd\\ssdraw.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{B33F35F1-0A92-4D72-B334-FE0565F64BF7}|StgSharpData\\StgSharpData.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u7F16\u7801\u5668\\stgsharpdata\\ssd\\ssd.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{B33F35F1-0A92-4D72-B334-FE0565F64BF7}|StgSharpData\\StgSharpData.csproj|solutionrelative:stgsharpdata\\ssd\\ssd.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{F89AE661-900E-40C1-9A18-930BE72754A0}|StgSharpDataEncoder\\StgSharpDataEncoder.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u7F16\u7801\u5668\\stgsharpdataencoder\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{F89AE661-900E-40C1-9A18-930BE72754A0}|StgSharpDataEncoder\\StgSharpDataEncoder.csproj|solutionrelative:stgsharpdataencoder\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
@@ -99,11 +99,11 @@
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 197,
|
||||
"SelectedChildIndex": 19,
|
||||
"SelectedChildIndex": 11,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"DocumentIndex": 4,
|
||||
"Title": "BitArray.cs",
|
||||
"DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u7F16\u7801\u5668\\StgSharpData\\Serialize\\BitArray.cs",
|
||||
"RelativeDocumentMoniker": "StgSharpData\\Serialize\\BitArray.cs",
|
||||
@@ -111,12 +111,11 @@
|
||||
"RelativeToolTip": "StgSharpData\\Serialize\\BitArray.cs",
|
||||
"ViewState": "AQIAADYAAAAAAAAAAAAswGUAAAAUAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-04-18T12:46:55.9Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2024-04-18T12:46:55.9Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"DocumentIndex": 3,
|
||||
"Title": "Dictionary.cs",
|
||||
"DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u7F16\u7801\u5668\\StgSharpData\\Serialize\\Dictionary.cs",
|
||||
"RelativeDocumentMoniker": "StgSharpData\\Serialize\\Dictionary.cs",
|
||||
@@ -124,12 +123,11 @@
|
||||
"RelativeToolTip": "StgSharpData\\Serialize\\Dictionary.cs",
|
||||
"ViewState": "AQIAACIAAAAAAAAAAAAswDoAAAAzAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-04-18T10:08:12.032Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2024-04-18T10:08:12.032Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"DocumentIndex": 5,
|
||||
"Title": "Define.cs",
|
||||
"DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u7F16\u7801\u5668\\StgSharpData\\Serialize\\Define.cs",
|
||||
"RelativeDocumentMoniker": "StgSharpData\\Serialize\\Define.cs",
|
||||
@@ -137,12 +135,11 @@
|
||||
"RelativeToolTip": "StgSharpData\\Serialize\\Define.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAABAAAAAAAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-04-18T10:06:53.321Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2024-04-18T10:06:53.321Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 4,
|
||||
"DocumentIndex": 6,
|
||||
"Title": "DataHead.cs",
|
||||
"DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u7F16\u7801\u5668\\StgSharpData\\SSD\\DataHead.cs",
|
||||
"RelativeDocumentMoniker": "StgSharpData\\SSD\\DataHead.cs",
|
||||
@@ -150,8 +147,7 @@
|
||||
"RelativeToolTip": "StgSharpData\\SSD\\DataHead.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAABUAAAAiAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-04-18T09:42:55.32Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2024-04-18T09:42:55.32Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
@@ -165,7 +161,7 @@
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 5,
|
||||
"DocumentIndex": 7,
|
||||
"Title": "SSDVirtualFolder.cs",
|
||||
"DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u7F16\u7801\u5668\\StgSharpData\\SSD\\SSDVirtualFolder.cs",
|
||||
"RelativeDocumentMoniker": "StgSharpData\\SSD\\SSDVirtualFolder.cs",
|
||||
@@ -173,12 +169,11 @@
|
||||
"RelativeToolTip": "StgSharpData\\SSD\\SSDVirtualFolder.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAA0AAAAAAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-04-18T01:07:23.53Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2024-04-18T01:07:23.53Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 7,
|
||||
"DocumentIndex": 1,
|
||||
"Title": "SSD.cs",
|
||||
"DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u7F16\u7801\u5668\\StgSharpData\\SSD\\SSD.cs",
|
||||
"RelativeDocumentMoniker": "StgSharpData\\SSD\\SSD.cs",
|
||||
@@ -186,7 +181,8 @@
|
||||
"RelativeToolTip": "StgSharpData\\SSD\\SSD.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAABAAAAAAAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-04-18T01:06:01.434Z"
|
||||
"WhenOpened": "2024-04-18T01:06:01.434Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
@@ -232,13 +228,13 @@
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 6,
|
||||
"DocumentIndex": 0,
|
||||
"Title": "SSDraw.cs",
|
||||
"DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u7F16\u7801\u5668\\StgSharpData\\SSD\\SSDraw.cs",
|
||||
"RelativeDocumentMoniker": "StgSharpData\\SSD\\SSDraw.cs",
|
||||
"ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u7F16\u7801\u5668\\StgSharpData\\SSD\\SSDraw.cs",
|
||||
"RelativeToolTip": "StgSharpData\\SSD\\SSDraw.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAADQAAAAnAAAA",
|
||||
"ViewState": "AQIAADYAAAAAAAAAAAA1wDwAAAAnAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-04-16T18:46:55.737Z",
|
||||
"EditorCaption": ""
|
||||
@@ -322,13 +318,13 @@
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"DocumentIndex": 2,
|
||||
"Title": "UnitTest1.cs",
|
||||
"DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u7F16\u7801\u5668\\SSD_Test\\UnitTest1.cs",
|
||||
"RelativeDocumentMoniker": "SSD_Test\\UnitTest1.cs",
|
||||
"ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u7F16\u7801\u5668\\SSD_Test\\UnitTest1.cs",
|
||||
"RelativeToolTip": "SSD_Test\\UnitTest1.cs",
|
||||
"ViewState": "AQIAAAMAAAAAAAAAAAAAACcAAAAqAAAA",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAACcAAAAqAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-04-15T08:44:36.91Z",
|
||||
"EditorCaption": ""
|
||||
|
||||
Binary file not shown.
@@ -58,7 +58,7 @@ namespace StgSharp.Data.FileIO
|
||||
public void CreateRawFile(string outputFolder, bool rewrite)
|
||||
{
|
||||
string route =
|
||||
(outputFolder == "" ? " " : $"{outputFolder}\\")
|
||||
(outputFolder == "" ? "" : $"{outputFolder}\\")
|
||||
+ $"{_name}.{FileType}";
|
||||
if (File.Exists(route) && !rewrite)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user