daily update on 20240226 by nitload youmu
This commit is contained in:
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u5B9E\u9A8C\\contexttest\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{00EF73C2-CC73-4478-884E-08979F4A429A}|StgSharpC\\StgSharpGraphic.vcxproj|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u5B9E\u9A8C\\contexttest\\StgSharpC\\StgSharpC.c||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{00EF73C2-CC73-4478-884E-08979F4A429A}|StgSharpC\\StgSharpGraphic.vcxproj|solutionrelative:StgSharpC\\StgSharpC.c||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{00EF73C2-CC73-4478-884E-08979F4A429A}|StgSharpC\\StgSharpGraphic.vcxproj|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u5B9E\u9A8C\\contexttest\\StgSharpC\\gl.c||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{00EF73C2-CC73-4478-884E-08979F4A429A}|StgSharpC\\StgSharpGraphic.vcxproj|solutionrelative:StgSharpC\\gl.c||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{00EF73C2-CC73-4478-884E-08979F4A429A}|StgSharpC\\StgSharpGraphic.vcxproj|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u5B9E\u9A8C\\contexttest\\StgSharpC\\include\\glad_gl.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{00EF73C2-CC73-4478-884E-08979F4A429A}|StgSharpC\\StgSharpGraphic.vcxproj|solutionrelative:StgSharpC\\include\\glad_gl.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 0,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "StgSharpC.c",
|
||||
"DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u5B9E\u9A8C\\contexttest\\StgSharpC\\StgSharpC.c",
|
||||
"RelativeDocumentMoniker": "StgSharpC\\StgSharpC.c",
|
||||
"ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u5B9E\u9A8C\\contexttest\\StgSharpC\\StgSharpC.c",
|
||||
"RelativeToolTip": "StgSharpC\\StgSharpC.c",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAB8AAAAAAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000423|",
|
||||
"WhenOpened": "2024-02-15T13:11:05.796Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "gl.c",
|
||||
"DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u5B9E\u9A8C\\contexttest\\StgSharpC\\gl.c",
|
||||
"RelativeDocumentMoniker": "StgSharpC\\gl.c",
|
||||
"ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u5B9E\u9A8C\\contexttest\\StgSharpC\\gl.c",
|
||||
"RelativeToolTip": "StgSharpC\\gl.c",
|
||||
"ViewState": "AQIAAEgUAAAAAAAAAAAUwFgUAAAAAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000423|",
|
||||
"WhenOpened": "2024-02-15T13:17:04.927Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"Title": "glad_gl.h",
|
||||
"DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u5B9E\u9A8C\\contexttest\\StgSharpC\\include\\glad_gl.h",
|
||||
"RelativeDocumentMoniker": "StgSharpC\\include\\glad_gl.h",
|
||||
"ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u5B9E\u9A8C\\contexttest\\StgSharpC\\include\\glad_gl.h",
|
||||
"RelativeToolTip": "StgSharpC\\include\\glad_gl.h",
|
||||
"ViewState": "AQIAAEgrAAAAAAAAAAAAAEkSAAAgAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-02-15T13:16:34.337Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
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.
@@ -0,0 +1,49 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34031.279
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StgSharpC", "StgSharpC\StgSharpGraphic.vcxproj", "{00EF73C2-CC73-4478-884E-08979F4A429A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Benchmark|x64 = Benchmark|x64
|
||||
Benchmark|x86 = Benchmark|x86
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
RealDebug|x64 = RealDebug|x64
|
||||
RealDebug|x86 = RealDebug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
Toollist|x64 = Toollist|x64
|
||||
Toollist|x86 = Toollist|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.Benchmark|x64.ActiveCfg = Benchmark|x64
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.Benchmark|x64.Build.0 = Benchmark|x64
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.Benchmark|x86.ActiveCfg = Benchmark|Win32
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.Benchmark|x86.Build.0 = Benchmark|Win32
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.Debug|x64.Build.0 = Debug|x64
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.Debug|x86.Build.0 = Debug|Win32
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.RealDebug|x64.ActiveCfg = RealDebug|x64
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.RealDebug|x64.Build.0 = RealDebug|x64
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.RealDebug|x86.ActiveCfg = RealDebug|Win32
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.RealDebug|x86.Build.0 = RealDebug|Win32
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.Release|x64.ActiveCfg = Release|x64
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.Release|x64.Build.0 = Release|x64
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.Release|x86.ActiveCfg = Release|Win32
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.Release|x86.Build.0 = Release|Win32
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.Toollist|x64.ActiveCfg = Toollist|x64
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.Toollist|x64.Build.0 = Toollist|x64
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.Toollist|x86.ActiveCfg = Toollist|Win32
|
||||
{00EF73C2-CC73-4478-884E-08979F4A429A}.Toollist|x86.Build.0 = Toollist|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {01D9066E-E930-489B-B900-3B9BE14D2D38}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,126 @@
|
||||
// StgShqrpGraphic.cpp : 定义 DLL 的导出函数。
|
||||
//
|
||||
|
||||
#include "./include/ssgc_framework.h"
|
||||
#include "./include/glad_gl.h"
|
||||
#include "./include/glfw3.h"
|
||||
#include "./include/StgSharpC.h"
|
||||
#include <stdio.h>
|
||||
|
||||
GladGLContext* currentContext;
|
||||
extern char* infolog[512] = { 0 };
|
||||
|
||||
void FrameBufferSizeCallback(int x, int y, int height, int width);
|
||||
|
||||
int main()
|
||||
{
|
||||
glfwInit();
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 6);
|
||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
|
||||
GLFWwindow* window = glfwCreateWindow(
|
||||
800, 600, "Test Context", NULL, NULL
|
||||
);
|
||||
|
||||
glfwMakeContextCurrent(window);
|
||||
|
||||
currentContext = malloc(sizeof(GladGLContext));
|
||||
gladLoadGLContext(currentContext, glfwGetProcAddress);
|
||||
|
||||
glfwSetFramebufferSizeCallback(window, FrameBufferSizeCallback);
|
||||
|
||||
while (glfwWindowShouldClose(window))
|
||||
{
|
||||
currentContext->Clear(GL_COLOR_BUFFER_BIT | GLFW_DEPTH_BITS);
|
||||
currentContext->ClearColor(0.5f, 0.3f, 0.6f, 1.0f);
|
||||
|
||||
glfwSwapBuffers(window);
|
||||
glfwPollEvents();
|
||||
}
|
||||
}
|
||||
|
||||
void FrameBufferSizeCallback(int x, int y, int height, int width)
|
||||
{
|
||||
currentContext->Viewport(0, 0, height, width);
|
||||
}
|
||||
|
||||
void printShaderCode(char* const* code)
|
||||
{
|
||||
printf(*code);
|
||||
}
|
||||
|
||||
SSCAPI void _cdecl initGL(int majorVersion, int minorVersion)
|
||||
{
|
||||
glfwInit();
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, majorVersion);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, minorVersion);
|
||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
|
||||
#ifdef __APPLE__
|
||||
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
|
||||
#endif
|
||||
}
|
||||
|
||||
SSCAPI unsigned int loadShaderCode(GladGLContext* context, char* const shaderCode, GLint shadertype)
|
||||
{
|
||||
if (currentContext != NULL)
|
||||
{
|
||||
unsigned int shader = context->CreateShader(shadertype);
|
||||
context->ShaderSource(shader, 1, &shaderCode, NULL);
|
||||
context->CompileShader(shader);
|
||||
int success;
|
||||
context->GetShaderiv(shader, GL_COMPILE_STATUS, &success);
|
||||
if (!success)
|
||||
{
|
||||
context->GetShaderInfoLog(shader, 512, NULL, infolog);
|
||||
infolog[511] = '\0';
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return shader;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
SSCAPI unsigned int linkShaderProgram(GladGLContext* context, GLuint shaderProgram)
|
||||
{
|
||||
context->LinkProgram(shaderProgram);
|
||||
|
||||
int success;
|
||||
context->GetProgramiv(shaderProgram, GL_LINK_STATUS, &success);
|
||||
if (!success)
|
||||
{
|
||||
context->GetProgramInfoLog(shaderProgram, 512, NULL, infolog);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return shaderProgram;
|
||||
}
|
||||
}
|
||||
|
||||
SSCAPI void SSCDECL loadImageData(char* location, Image* out, imageLoader loader)
|
||||
{
|
||||
if (loader == NULL)
|
||||
{
|
||||
loader = stbi_load;
|
||||
}
|
||||
out->pixelPtr = loader(location, &(out->width), &(out->height), &(out->channel), 0);
|
||||
}
|
||||
|
||||
SSCAPI void SSCDECL unloadImageData(Image* out)
|
||||
{
|
||||
free(out->pixelPtr);
|
||||
}
|
||||
|
||||
char* _cdecl readLog()
|
||||
{
|
||||
infolog[511] = '\0';
|
||||
return &infolog;
|
||||
}
|
||||
+11
-12
@@ -83,35 +83,35 @@
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Benchmark|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Toollist|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RealDebug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
@@ -287,6 +287,7 @@
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>OpenGL32.lib;glfw3.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerbose</ShowProgress>
|
||||
<EntryPointSymbol>Main</EntryPointSymbol>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Benchmark|x64'">
|
||||
@@ -308,6 +309,7 @@
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>OpenGL32.lib;glfw3.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerbose</ShowProgress>
|
||||
<EntryPointSymbol>Main</EntryPointSymbol>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Toollist|x64'">
|
||||
@@ -329,6 +331,7 @@
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>OpenGL32.lib;glfw3.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerbose</ShowProgress>
|
||||
<EntryPointSymbol>Main</EntryPointSymbol>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RealDebug|x64'">
|
||||
@@ -350,6 +353,7 @@
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>OpenGL32.lib;glfw3.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerbose</ShowProgress>
|
||||
<EntryPointSymbol>Main</EntryPointSymbol>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@@ -378,19 +382,16 @@
|
||||
<MapExports>true</MapExports>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
<ShowProgress>LinkVerbose</ShowProgress>
|
||||
<EntryPointSymbol>Main</EntryPointSymbol>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\glad_gl.h" />
|
||||
<ClInclude Include="include\glad_glsc2.h" />
|
||||
<ClInclude Include="include\glad_glx.h" />
|
||||
<ClInclude Include="include\glad_wgl.h" />
|
||||
<ClInclude Include="include\glfw3.h" />
|
||||
<ClInclude Include="include\glfw3native.h" />
|
||||
<ClInclude Include="include\khrplatform.h" />
|
||||
<ClInclude Include="include\ssgc_framework.h" />
|
||||
<ClInclude Include="include\ssgc_internal.h" />
|
||||
<ClInclude Include="include\stb_image.h" />
|
||||
<ClInclude Include="include\StgSharpC.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -401,14 +402,12 @@
|
||||
<ItemGroup>
|
||||
<ClCompile Include="debuger.c" />
|
||||
<ClCompile Include="dllmain.c" />
|
||||
<ClCompile Include="glsc2.c" />
|
||||
<ClCompile Include="gl.c" />
|
||||
<ClCompile Include="linear.c" />
|
||||
<ClCompile Include="mat2.c" />
|
||||
<ClCompile Include="mat3.c" />
|
||||
<ClCompile Include="mat4.c" />
|
||||
<ClCompile Include="stb_image.c" />
|
||||
<ClCompile Include="StgSharpC.c" />
|
||||
<ClCompile Include="wgl.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
+1
-19
@@ -39,15 +39,6 @@
|
||||
<ClInclude Include="include\glad_gl.h">
|
||||
<Filter>头文件\glad</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\glad_glsc2.h">
|
||||
<Filter>头文件\glad</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\glad_glx.h">
|
||||
<Filter>头文件\glad</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\glad_wgl.h">
|
||||
<Filter>头文件\glad</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\ssgc_framework.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
@@ -60,9 +51,6 @@
|
||||
<ClInclude Include="include\khrplatform.h">
|
||||
<Filter>头文件\KHRplatform</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\stb_image.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Library Include="lib\glfw3.lib">
|
||||
@@ -97,14 +85,8 @@
|
||||
<ClCompile Include="StgSharpC.c">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="glsc2.c">
|
||||
<ClCompile Include="gl.c">
|
||||
<Filter>源文件\glad</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="wgl.c">
|
||||
<Filter>源文件\glad</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="stb_image.c">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,55 @@
|
||||
// dllmain.cpp : 定义 DLL 应用程序的入口点。
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "./include/ssgc_framework.h"
|
||||
#endif // __
|
||||
|
||||
|
||||
#include "./include/StgSharpC.h"
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
BOOL APIENTRY DllMain(HMODULE hModule,
|
||||
DWORD ul_reason_for_call,
|
||||
LPVOID lpReserved
|
||||
)
|
||||
{
|
||||
switch (ul_reason_for_call)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
do
|
||||
{
|
||||
defaultVecPtr = _aligned_malloc(sizeof(__m128), 16);
|
||||
} while (defaultVecPtr == NULL);
|
||||
return 1;
|
||||
|
||||
case DLL_THREAD_ATTACH:
|
||||
return 1;
|
||||
|
||||
case DLL_THREAD_DETACH:
|
||||
return 1;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
return 1;
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
#else
|
||||
attribute((constructor)) void DllMain()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif // _WIN32
|
||||
|
||||
|
||||
__m128* defaultVecPtr = NULL;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,13 +21,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static void glad_gl_load_GL_VERSION_1_0(GladGLContext* context, GLADuserptrloadfunc load, void* userptr) {
|
||||
if (!context->VERSION_1_0) return;
|
||||
context->BlendFunc = (PFNGLBLENDFUNCPROC)load(userptr, "glBlendFunc");
|
||||
@@ -4082,8 +4075,6 @@ extern "C" {
|
||||
context->TexCoord4fVertex4fvSUN = (PFNGLTEXCOORD4FVERTEX4FVSUNPROC)load(userptr, "glTexCoord4fVertex4fvSUN");
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if defined(GL_ES_VERSION_3_0) || defined(GL_VERSION_3_0)
|
||||
#define GLAD_GL_IS_SOME_NEW_VERSION 1
|
||||
#else
|
||||
@@ -4103,38 +4094,38 @@ extern "C" {
|
||||
}
|
||||
*out_exts = (const char*)context->GetString(GL_EXTENSIONS);
|
||||
#if GLAD_GL_IS_SOME_NEW_VERSION
|
||||
}
|
||||
}
|
||||
else {
|
||||
unsigned int index = 0;
|
||||
unsigned int num_exts_i = 0;
|
||||
char** exts_i = NULL;
|
||||
if (context->GetStringi == NULL || context->GetIntegerv == NULL) {
|
||||
return 0;
|
||||
}
|
||||
context->GetIntegerv(GL_NUM_EXTENSIONS, (int*)&num_exts_i);
|
||||
if (num_exts_i > 0) {
|
||||
exts_i = (char**)malloc(num_exts_i * (sizeof * exts_i));
|
||||
}
|
||||
if (exts_i == NULL) {
|
||||
return 0;
|
||||
}
|
||||
for (index = 0; index < num_exts_i; index++) {
|
||||
const char* gl_str_tmp = (const char*)context->GetStringi(GL_EXTENSIONS, index);
|
||||
size_t len = strlen(gl_str_tmp) + 1;
|
||||
unsigned int index = 0;
|
||||
unsigned int num_exts_i = 0;
|
||||
char** exts_i = NULL;
|
||||
if (context->GetStringi == NULL || context->GetIntegerv == NULL) {
|
||||
return 0;
|
||||
}
|
||||
context->GetIntegerv(GL_NUM_EXTENSIONS, (int*)&num_exts_i);
|
||||
if (num_exts_i > 0) {
|
||||
exts_i = (char**)malloc(num_exts_i * (sizeof * exts_i));
|
||||
}
|
||||
if (exts_i == NULL) {
|
||||
return 0;
|
||||
}
|
||||
for (index = 0; index < num_exts_i; index++) {
|
||||
const char* gl_str_tmp = (const char*)context->GetStringi(GL_EXTENSIONS, index);
|
||||
size_t len = strlen(gl_str_tmp) + 1;
|
||||
|
||||
char* local_str = (char*)malloc(len * sizeof(char));
|
||||
if (local_str != NULL) {
|
||||
memcpy(local_str, gl_str_tmp, len * sizeof(char));
|
||||
char* local_str = (char*)malloc(len * sizeof(char));
|
||||
if (local_str != NULL) {
|
||||
memcpy(local_str, gl_str_tmp, len * sizeof(char));
|
||||
}
|
||||
|
||||
exts_i[index] = local_str;
|
||||
}
|
||||
|
||||
exts_i[index] = local_str;
|
||||
}
|
||||
|
||||
*out_num_exts_i = num_exts_i;
|
||||
*out_exts_i = exts_i;
|
||||
}
|
||||
*out_num_exts_i = num_exts_i;
|
||||
*out_exts_i = exts_i;
|
||||
}
|
||||
#endif
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
static void glad_gl_free_extensions(char** exts_i, unsigned int num_exts_i) {
|
||||
if (exts_i != NULL) {
|
||||
@@ -4862,7 +4853,7 @@ static int glad_gl_find_core_gl(GladGLContext* context) {
|
||||
return GLAD_MAKE_VERSION(major, minor);
|
||||
}
|
||||
|
||||
SSCAPI int SSCDECL gladLoadGLContextUserPtr(GladGLContext* context, GLADuserptrloadfunc load, void* userptr)
|
||||
int gladLoadGLContextUserPtr(GladGLContext* context, GLADuserptrloadfunc load, void* userptr)
|
||||
{
|
||||
int version;
|
||||
|
||||
@@ -5201,19 +5192,13 @@ SSCAPI int SSCDECL gladLoadGLContextUserPtr(GladGLContext* context, GLADuserptrl
|
||||
glad_gl_load_GL_SUN_triangle_list(context, load, userptr);
|
||||
glad_gl_load_GL_SUN_vertex(context, load, userptr);
|
||||
|
||||
|
||||
|
||||
return version;
|
||||
}
|
||||
|
||||
SSCAPI int SSCDECL gladLoadGLContext(GladGLContext* context, GLADloadfunc load) {
|
||||
int gladLoadGLContext(GladGLContext* context, GLADloadfunc load) {
|
||||
return gladLoadGLContextUserPtr(context, glad_gl_get_proc_from_userptr, GLAD_GNUC_EXTENSION(void*) load);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef GLAD_GL
|
||||
|
||||
#ifndef GLAD_LOADER_LIBRARY_C_
|
||||
@@ -5228,7 +5213,6 @@ SSCAPI int SSCDECL gladLoadGLContext(GladGLContext* context, GLADloadfunc load)
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
|
||||
static void* glad_get_dlopen_handle(const char* lib_names[], int length) {
|
||||
void* handle = NULL;
|
||||
int i;
|
||||
@@ -5244,7 +5228,7 @@ static void* glad_get_dlopen_handle(const char* lib_names[], int length) {
|
||||
handle = (void*)LoadPackagedLibrary(buffer, 0);
|
||||
}
|
||||
free((void*)buffer);
|
||||
}
|
||||
}
|
||||
#else
|
||||
handle = (void*)LoadLibraryA(lib_names[i]);
|
||||
#endif
|
||||
@@ -5254,7 +5238,7 @@ static void* glad_get_dlopen_handle(const char* lib_names[], int length) {
|
||||
if (handle != NULL) {
|
||||
return handle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -5303,7 +5287,6 @@ static GLADapiproc glad_gl_get_proc(void* vuserptr, const char* name) {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
static void* glad_gl_dlopen_handle(GladGLContext* context) {
|
||||
#if GLAD_PLATFORM_APPLE
|
||||
static const char* NAMES[] = {
|
||||
@@ -5348,7 +5331,7 @@ static struct _glad_gl_userptr glad_gl_build_userptr(void* handle) {
|
||||
return userptr;
|
||||
}
|
||||
|
||||
SSCAPI int SSCDECL gladLoaderLoadGLContext(GladGLContext* context)
|
||||
int gladLoaderLoadGLContext(GladGLContext* context)
|
||||
{
|
||||
int version = 0;
|
||||
void* handle;
|
||||
@@ -5370,7 +5353,7 @@ SSCAPI int SSCDECL gladLoaderLoadGLContext(GladGLContext* context)
|
||||
return version;
|
||||
}
|
||||
|
||||
SSCAPI void SSCDECL gladLoaderUnloadGLContext(GladGLContext* context) {
|
||||
void gladLoaderUnloadGLContext(GladGLContext* context) {
|
||||
if (context->glad_loader_handle != NULL) {
|
||||
glad_close_dlopen_handle(context->glad_loader_handle);
|
||||
context->glad_loader_handle = NULL;
|
||||
@@ -5381,4 +5364,4 @@ SSCAPI void SSCDECL gladLoaderUnloadGLContext(GladGLContext* context) {
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -61,8 +61,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "ssgc_internal.h"
|
||||
|
||||
#ifndef GLAD_PLATFORM_H_
|
||||
#define GLAD_PLATFORM_H_
|
||||
|
||||
@@ -121,10 +119,6 @@ extern "C" {
|
||||
|
||||
#define GLAD_UNUSED(x) (void)(x)
|
||||
|
||||
#ifndef SSCAPI
|
||||
|
||||
|
||||
|
||||
#ifndef GLAD_API_CALL
|
||||
#if defined(GLAD_API_CALL_EXPORT)
|
||||
#if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__)
|
||||
@@ -150,10 +144,6 @@ extern "C" {
|
||||
#define GLAD_API_CALL extern
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#define GLAD_API_CALL
|
||||
#endif // SSCAPI
|
||||
|
||||
|
||||
#ifdef APIENTRY
|
||||
#define GLAD_API_PTR APIENTRY
|
||||
@@ -187,10 +177,6 @@ extern "C" {
|
||||
|
||||
#endif /* GLAD_PLATFORM_H_ */
|
||||
|
||||
#pragma region __glad_gl_const_
|
||||
|
||||
|
||||
|
||||
#define GL_1PASS_EXT 0x80A1
|
||||
#define GL_1PASS_SGIS 0x80A1
|
||||
#define GL_2PASS_0_EXT 0x80A2
|
||||
@@ -4692,9 +4678,7 @@ extern "C" {
|
||||
#define GL_ZERO_TO_ONE 0x935F
|
||||
#define GL_Z_EXT 0x87D7
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#include "khrplatform.h"
|
||||
#include <KHRplatform.h>
|
||||
typedef unsigned int GLenum;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef unsigned int GLbitfield;
|
||||
@@ -4758,10 +4742,6 @@ extern "C" {
|
||||
typedef GLintptr GLvdpauSurfaceNV;
|
||||
typedef void (GLAD_API_PTR* GLVULKANPROCNV)(void);
|
||||
|
||||
#pragma region __glad_gl_package
|
||||
|
||||
|
||||
|
||||
#define GL_VERSION_1_0 1
|
||||
#define GL_VERSION_1_1 1
|
||||
#define GL_VERSION_1_2 1
|
||||
@@ -5401,13 +5381,6 @@ extern "C" {
|
||||
#define GL_WIN_phong_shading 1
|
||||
#define GL_WIN_specular_fog 1
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region __glad_gl_api_define
|
||||
|
||||
|
||||
|
||||
|
||||
typedef void (GLAD_API_PTR* PFNGLACCUMXOESPROC)(GLenum op, GLfixed value);
|
||||
typedef GLboolean(GLAD_API_PTR* PFNGLACQUIREKEYEDMUTEXWIN32EXTPROC)(GLuint memory, GLuint64 key, GLuint timeout);
|
||||
typedef void (GLAD_API_PTR* PFNGLACTIVEPROGRAMEXTPROC)(GLuint program);
|
||||
@@ -7941,14 +7914,647 @@ extern "C" {
|
||||
typedef void (GLAD_API_PTR* PFNGLWINDOWRECTANGLESEXTPROC)(GLenum mode, GLsizei count, const GLint* box);
|
||||
typedef void (GLAD_API_PTR* PFNGLWRITEMASKEXTPROC)(GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
typedef struct GladGLContext {
|
||||
void* userptr;
|
||||
|
||||
#pragma region platformAPI
|
||||
|
||||
|
||||
int VERSION_1_0;
|
||||
int VERSION_1_1;
|
||||
int VERSION_1_2;
|
||||
int VERSION_1_3;
|
||||
int VERSION_1_4;
|
||||
int VERSION_1_5;
|
||||
int VERSION_2_0;
|
||||
int VERSION_2_1;
|
||||
int VERSION_3_0;
|
||||
int VERSION_3_1;
|
||||
int VERSION_3_2;
|
||||
int VERSION_3_3;
|
||||
int VERSION_4_0;
|
||||
int VERSION_4_1;
|
||||
int VERSION_4_2;
|
||||
int VERSION_4_3;
|
||||
int VERSION_4_4;
|
||||
int VERSION_4_5;
|
||||
int VERSION_4_6;
|
||||
int _3DFX_multisample;
|
||||
int _3DFX_tbuffer;
|
||||
int _3DFX_texture_compression_FXT1;
|
||||
int AMD_blend_minmax_factor;
|
||||
int AMD_conservative_depth;
|
||||
int AMD_debug_output;
|
||||
int AMD_depth_clamp_separate;
|
||||
int AMD_draw_buffers_blend;
|
||||
int AMD_framebuffer_multisample_advanced;
|
||||
int AMD_framebuffer_sample_positions;
|
||||
int AMD_gcn_shader;
|
||||
int AMD_gpu_shader_half_float;
|
||||
int AMD_gpu_shader_int16;
|
||||
int AMD_gpu_shader_int64;
|
||||
int AMD_interleaved_elements;
|
||||
int AMD_multi_draw_indirect;
|
||||
int AMD_name_gen_delete;
|
||||
int AMD_occlusion_query_event;
|
||||
int AMD_performance_monitor;
|
||||
int AMD_pinned_memory;
|
||||
int AMD_query_buffer_object;
|
||||
int AMD_sample_positions;
|
||||
int AMD_seamless_cubemap_per_texture;
|
||||
int AMD_shader_atomic_counter_ops;
|
||||
int AMD_shader_ballot;
|
||||
int AMD_shader_explicit_vertex_parameter;
|
||||
int AMD_shader_gpu_shader_half_float_fetch;
|
||||
int AMD_shader_image_load_store_lod;
|
||||
int AMD_shader_stencil_export;
|
||||
int AMD_shader_trinary_minmax;
|
||||
int AMD_sparse_texture;
|
||||
int AMD_stencil_operation_extended;
|
||||
int AMD_texture_gather_bias_lod;
|
||||
int AMD_texture_texture4;
|
||||
int AMD_transform_feedback3_lines_triangles;
|
||||
int AMD_transform_feedback4;
|
||||
int AMD_vertex_shader_layer;
|
||||
int AMD_vertex_shader_tessellator;
|
||||
int AMD_vertex_shader_viewport_index;
|
||||
int APPLE_aux_depth_stencil;
|
||||
int APPLE_client_storage;
|
||||
int APPLE_element_array;
|
||||
int APPLE_fence;
|
||||
int APPLE_float_pixels;
|
||||
int APPLE_flush_buffer_range;
|
||||
int APPLE_object_purgeable;
|
||||
int APPLE_rgb_422;
|
||||
int APPLE_row_bytes;
|
||||
int APPLE_specular_vector;
|
||||
int APPLE_texture_range;
|
||||
int APPLE_transform_hint;
|
||||
int APPLE_vertex_array_object;
|
||||
int APPLE_vertex_array_range;
|
||||
int APPLE_vertex_program_evaluators;
|
||||
int APPLE_ycbcr_422;
|
||||
int ARB_ES2_compatibility;
|
||||
int ARB_ES3_1_compatibility;
|
||||
int ARB_ES3_2_compatibility;
|
||||
int ARB_ES3_compatibility;
|
||||
int ARB_arrays_of_arrays;
|
||||
int ARB_base_instance;
|
||||
int ARB_bindless_texture;
|
||||
int ARB_blend_func_extended;
|
||||
int ARB_buffer_storage;
|
||||
int ARB_cl_event;
|
||||
int ARB_clear_buffer_object;
|
||||
int ARB_clear_texture;
|
||||
int ARB_clip_control;
|
||||
int ARB_color_buffer_float;
|
||||
int ARB_compatibility;
|
||||
int ARB_compressed_texture_pixel_storage;
|
||||
int ARB_compute_shader;
|
||||
int ARB_compute_variable_group_size;
|
||||
int ARB_conditional_render_inverted;
|
||||
int ARB_conservative_depth;
|
||||
int ARB_copy_buffer;
|
||||
int ARB_copy_image;
|
||||
int ARB_cull_distance;
|
||||
int ARB_debug_output;
|
||||
int ARB_depth_buffer_float;
|
||||
int ARB_depth_clamp;
|
||||
int ARB_depth_texture;
|
||||
int ARB_derivative_control;
|
||||
int ARB_direct_state_access;
|
||||
int ARB_draw_buffers;
|
||||
int ARB_draw_buffers_blend;
|
||||
int ARB_draw_elements_base_vertex;
|
||||
int ARB_draw_indirect;
|
||||
int ARB_draw_instanced;
|
||||
int ARB_enhanced_layouts;
|
||||
int ARB_explicit_attrib_location;
|
||||
int ARB_explicit_uniform_location;
|
||||
int ARB_fragment_coord_conventions;
|
||||
int ARB_fragment_layer_viewport;
|
||||
int ARB_fragment_program;
|
||||
int ARB_fragment_program_shadow;
|
||||
int ARB_fragment_shader;
|
||||
int ARB_fragment_shader_interlock;
|
||||
int ARB_framebuffer_no_attachments;
|
||||
int ARB_framebuffer_object;
|
||||
int ARB_framebuffer_sRGB;
|
||||
int ARB_geometry_shader4;
|
||||
int ARB_get_program_binary;
|
||||
int ARB_get_texture_sub_image;
|
||||
int ARB_gl_spirv;
|
||||
int ARB_gpu_shader5;
|
||||
int ARB_gpu_shader_fp64;
|
||||
int ARB_gpu_shader_int64;
|
||||
int ARB_half_float_pixel;
|
||||
int ARB_half_float_vertex;
|
||||
int ARB_imaging;
|
||||
int ARB_indirect_parameters;
|
||||
int ARB_instanced_arrays;
|
||||
int ARB_internalformat_query;
|
||||
int ARB_internalformat_query2;
|
||||
int ARB_invalidate_subdata;
|
||||
int ARB_map_buffer_alignment;
|
||||
int ARB_map_buffer_range;
|
||||
int ARB_matrix_palette;
|
||||
int ARB_multi_bind;
|
||||
int ARB_multi_draw_indirect;
|
||||
int ARB_multisample;
|
||||
int ARB_multitexture;
|
||||
int ARB_occlusion_query;
|
||||
int ARB_occlusion_query2;
|
||||
int ARB_parallel_shader_compile;
|
||||
int ARB_pipeline_statistics_query;
|
||||
int ARB_pixel_buffer_object;
|
||||
int ARB_point_parameters;
|
||||
int ARB_point_sprite;
|
||||
int ARB_polygon_offset_clamp;
|
||||
int ARB_post_depth_coverage;
|
||||
int ARB_program_interface_query;
|
||||
int ARB_provoking_vertex;
|
||||
int ARB_query_buffer_object;
|
||||
int ARB_robust_buffer_access_behavior;
|
||||
int ARB_robustness;
|
||||
int ARB_robustness_isolation;
|
||||
int ARB_sample_locations;
|
||||
int ARB_sample_shading;
|
||||
int ARB_sampler_objects;
|
||||
int ARB_seamless_cube_map;
|
||||
int ARB_seamless_cubemap_per_texture;
|
||||
int ARB_separate_shader_objects;
|
||||
int ARB_shader_atomic_counter_ops;
|
||||
int ARB_shader_atomic_counters;
|
||||
int ARB_shader_ballot;
|
||||
int ARB_shader_bit_encoding;
|
||||
int ARB_shader_clock;
|
||||
int ARB_shader_draw_parameters;
|
||||
int ARB_shader_group_vote;
|
||||
int ARB_shader_image_load_store;
|
||||
int ARB_shader_image_size;
|
||||
int ARB_shader_objects;
|
||||
int ARB_shader_precision;
|
||||
int ARB_shader_stencil_export;
|
||||
int ARB_shader_storage_buffer_object;
|
||||
int ARB_shader_subroutine;
|
||||
int ARB_shader_texture_image_samples;
|
||||
int ARB_shader_texture_lod;
|
||||
int ARB_shader_viewport_layer_array;
|
||||
int ARB_shading_language_100;
|
||||
int ARB_shading_language_420pack;
|
||||
int ARB_shading_language_include;
|
||||
int ARB_shading_language_packing;
|
||||
int ARB_shadow;
|
||||
int ARB_shadow_ambient;
|
||||
int ARB_sparse_buffer;
|
||||
int ARB_sparse_texture;
|
||||
int ARB_sparse_texture2;
|
||||
int ARB_sparse_texture_clamp;
|
||||
int ARB_spirv_extensions;
|
||||
int ARB_stencil_texturing;
|
||||
int ARB_sync;
|
||||
int ARB_tessellation_shader;
|
||||
int ARB_texture_barrier;
|
||||
int ARB_texture_border_clamp;
|
||||
int ARB_texture_buffer_object;
|
||||
int ARB_texture_buffer_object_rgb32;
|
||||
int ARB_texture_buffer_range;
|
||||
int ARB_texture_compression;
|
||||
int ARB_texture_compression_bptc;
|
||||
int ARB_texture_compression_rgtc;
|
||||
int ARB_texture_cube_map;
|
||||
int ARB_texture_cube_map_array;
|
||||
int ARB_texture_env_add;
|
||||
int ARB_texture_env_combine;
|
||||
int ARB_texture_env_crossbar;
|
||||
int ARB_texture_env_dot3;
|
||||
int ARB_texture_filter_anisotropic;
|
||||
int ARB_texture_filter_minmax;
|
||||
int ARB_texture_float;
|
||||
int ARB_texture_gather;
|
||||
int ARB_texture_mirror_clamp_to_edge;
|
||||
int ARB_texture_mirrored_repeat;
|
||||
int ARB_texture_multisample;
|
||||
int ARB_texture_non_power_of_two;
|
||||
int ARB_texture_query_levels;
|
||||
int ARB_texture_query_lod;
|
||||
int ARB_texture_rectangle;
|
||||
int ARB_texture_rg;
|
||||
int ARB_texture_rgb10_a2ui;
|
||||
int ARB_texture_stencil8;
|
||||
int ARB_texture_storage;
|
||||
int ARB_texture_storage_multisample;
|
||||
int ARB_texture_swizzle;
|
||||
int ARB_texture_view;
|
||||
int ARB_timer_query;
|
||||
int ARB_transform_feedback2;
|
||||
int ARB_transform_feedback3;
|
||||
int ARB_transform_feedback_instanced;
|
||||
int ARB_transform_feedback_overflow_query;
|
||||
int ARB_transpose_matrix;
|
||||
int ARB_uniform_buffer_object;
|
||||
int ARB_vertex_array_bgra;
|
||||
int ARB_vertex_array_object;
|
||||
int ARB_vertex_attrib_64bit;
|
||||
int ARB_vertex_attrib_binding;
|
||||
int ARB_vertex_blend;
|
||||
int ARB_vertex_buffer_object;
|
||||
int ARB_vertex_program;
|
||||
int ARB_vertex_shader;
|
||||
int ARB_vertex_type_10f_11f_11f_rev;
|
||||
int ARB_vertex_type_2_10_10_10_rev;
|
||||
int ARB_viewport_array;
|
||||
int ARB_window_pos;
|
||||
int ATI_draw_buffers;
|
||||
int ATI_element_array;
|
||||
int ATI_envmap_bumpmap;
|
||||
int ATI_fragment_shader;
|
||||
int ATI_map_object_buffer;
|
||||
int ATI_meminfo;
|
||||
int ATI_pixel_format_float;
|
||||
int ATI_pn_triangles;
|
||||
int ATI_separate_stencil;
|
||||
int ATI_text_fragment_shader;
|
||||
int ATI_texture_env_combine3;
|
||||
int ATI_texture_float;
|
||||
int ATI_texture_mirror_once;
|
||||
int ATI_vertex_array_object;
|
||||
int ATI_vertex_attrib_array_object;
|
||||
int ATI_vertex_streams;
|
||||
int EXT_422_pixels;
|
||||
int EXT_EGL_image_storage;
|
||||
int EXT_EGL_sync;
|
||||
int EXT_abgr;
|
||||
int EXT_bgra;
|
||||
int EXT_bindable_uniform;
|
||||
int EXT_blend_color;
|
||||
int EXT_blend_equation_separate;
|
||||
int EXT_blend_func_separate;
|
||||
int EXT_blend_logic_op;
|
||||
int EXT_blend_minmax;
|
||||
int EXT_blend_subtract;
|
||||
int EXT_clip_volume_hint;
|
||||
int EXT_cmyka;
|
||||
int EXT_color_subtable;
|
||||
int EXT_compiled_vertex_array;
|
||||
int EXT_convolution;
|
||||
int EXT_coordinate_frame;
|
||||
int EXT_copy_texture;
|
||||
int EXT_cull_vertex;
|
||||
int EXT_debug_label;
|
||||
int EXT_debug_marker;
|
||||
int EXT_depth_bounds_test;
|
||||
int EXT_direct_state_access;
|
||||
int EXT_draw_buffers2;
|
||||
int EXT_draw_instanced;
|
||||
int EXT_draw_range_elements;
|
||||
int EXT_external_buffer;
|
||||
int EXT_fog_coord;
|
||||
int EXT_framebuffer_blit;
|
||||
int EXT_framebuffer_blit_layers;
|
||||
int EXT_framebuffer_multisample;
|
||||
int EXT_framebuffer_multisample_blit_scaled;
|
||||
int EXT_framebuffer_object;
|
||||
int EXT_framebuffer_sRGB;
|
||||
int EXT_geometry_shader4;
|
||||
int EXT_gpu_program_parameters;
|
||||
int EXT_gpu_shader4;
|
||||
int EXT_histogram;
|
||||
int EXT_index_array_formats;
|
||||
int EXT_index_func;
|
||||
int EXT_index_material;
|
||||
int EXT_index_texture;
|
||||
int EXT_light_texture;
|
||||
int EXT_memory_object;
|
||||
int EXT_memory_object_fd;
|
||||
int EXT_memory_object_win32;
|
||||
int EXT_misc_attribute;
|
||||
int EXT_multi_draw_arrays;
|
||||
int EXT_multisample;
|
||||
int EXT_multiview_tessellation_geometry_shader;
|
||||
int EXT_multiview_texture_multisample;
|
||||
int EXT_multiview_timer_query;
|
||||
int EXT_packed_depth_stencil;
|
||||
int EXT_packed_float;
|
||||
int EXT_packed_pixels;
|
||||
int EXT_paletted_texture;
|
||||
int EXT_pixel_buffer_object;
|
||||
int EXT_pixel_transform;
|
||||
int EXT_pixel_transform_color_table;
|
||||
int EXT_point_parameters;
|
||||
int EXT_polygon_offset;
|
||||
int EXT_polygon_offset_clamp;
|
||||
int EXT_post_depth_coverage;
|
||||
int EXT_provoking_vertex;
|
||||
int EXT_raster_multisample;
|
||||
int EXT_rescale_normal;
|
||||
int EXT_secondary_color;
|
||||
int EXT_semaphore;
|
||||
int EXT_semaphore_fd;
|
||||
int EXT_semaphore_win32;
|
||||
int EXT_separate_shader_objects;
|
||||
int EXT_separate_specular_color;
|
||||
int EXT_shader_framebuffer_fetch;
|
||||
int EXT_shader_framebuffer_fetch_non_coherent;
|
||||
int EXT_shader_image_load_formatted;
|
||||
int EXT_shader_image_load_store;
|
||||
int EXT_shader_integer_mix;
|
||||
int EXT_shader_samples_identical;
|
||||
int EXT_shadow_funcs;
|
||||
int EXT_shared_texture_palette;
|
||||
int EXT_sparse_texture2;
|
||||
int EXT_stencil_clear_tag;
|
||||
int EXT_stencil_two_side;
|
||||
int EXT_stencil_wrap;
|
||||
int EXT_subtexture;
|
||||
int EXT_texture;
|
||||
int EXT_texture3D;
|
||||
int EXT_texture_array;
|
||||
int EXT_texture_buffer_object;
|
||||
int EXT_texture_compression_latc;
|
||||
int EXT_texture_compression_rgtc;
|
||||
int EXT_texture_compression_s3tc;
|
||||
int EXT_texture_cube_map;
|
||||
int EXT_texture_env_add;
|
||||
int EXT_texture_env_combine;
|
||||
int EXT_texture_env_dot3;
|
||||
int EXT_texture_filter_anisotropic;
|
||||
int EXT_texture_filter_minmax;
|
||||
int EXT_texture_integer;
|
||||
int EXT_texture_lod_bias;
|
||||
int EXT_texture_mirror_clamp;
|
||||
int EXT_texture_object;
|
||||
int EXT_texture_perturb_normal;
|
||||
int EXT_texture_sRGB;
|
||||
int EXT_texture_sRGB_R8;
|
||||
int EXT_texture_sRGB_RG8;
|
||||
int EXT_texture_sRGB_decode;
|
||||
int EXT_texture_shadow_lod;
|
||||
int EXT_texture_shared_exponent;
|
||||
int EXT_texture_snorm;
|
||||
int EXT_texture_storage;
|
||||
int EXT_texture_swizzle;
|
||||
int EXT_timer_query;
|
||||
int EXT_transform_feedback;
|
||||
int EXT_vertex_array;
|
||||
int EXT_vertex_array_bgra;
|
||||
int EXT_vertex_attrib_64bit;
|
||||
int EXT_vertex_shader;
|
||||
int EXT_vertex_weighting;
|
||||
int EXT_win32_keyed_mutex;
|
||||
int EXT_window_rectangles;
|
||||
int EXT_x11_sync_object;
|
||||
int GREMEDY_frame_terminator;
|
||||
int GREMEDY_string_marker;
|
||||
int HP_convolution_border_modes;
|
||||
int HP_image_transform;
|
||||
int HP_occlusion_test;
|
||||
int HP_texture_lighting;
|
||||
int IBM_cull_vertex;
|
||||
int IBM_multimode_draw_arrays;
|
||||
int IBM_rasterpos_clip;
|
||||
int IBM_static_data;
|
||||
int IBM_texture_mirrored_repeat;
|
||||
int IBM_vertex_array_lists;
|
||||
int INGR_blend_func_separate;
|
||||
int INGR_color_clamp;
|
||||
int INGR_interlace_read;
|
||||
int INTEL_blackhole_render;
|
||||
int INTEL_conservative_rasterization;
|
||||
int INTEL_fragment_shader_ordering;
|
||||
int INTEL_framebuffer_CMAA;
|
||||
int INTEL_map_texture;
|
||||
int INTEL_parallel_arrays;
|
||||
int INTEL_performance_query;
|
||||
int KHR_blend_equation_advanced;
|
||||
int KHR_blend_equation_advanced_coherent;
|
||||
int KHR_context_flush_control;
|
||||
int KHR_debug;
|
||||
int KHR_no_error;
|
||||
int KHR_parallel_shader_compile;
|
||||
int KHR_robust_buffer_access_behavior;
|
||||
int KHR_robustness;
|
||||
int KHR_shader_subgroup;
|
||||
int KHR_texture_compression_astc_hdr;
|
||||
int KHR_texture_compression_astc_ldr;
|
||||
int KHR_texture_compression_astc_sliced_3d;
|
||||
int MESAX_texture_stack;
|
||||
int MESA_framebuffer_flip_x;
|
||||
int MESA_framebuffer_flip_y;
|
||||
int MESA_framebuffer_swap_xy;
|
||||
int MESA_pack_invert;
|
||||
int MESA_program_binary_formats;
|
||||
int MESA_resize_buffers;
|
||||
int MESA_shader_integer_functions;
|
||||
int MESA_tile_raster_order;
|
||||
int MESA_window_pos;
|
||||
int MESA_ycbcr_texture;
|
||||
int NVX_blend_equation_advanced_multi_draw_buffers;
|
||||
int NVX_conditional_render;
|
||||
int NVX_gpu_memory_info;
|
||||
int NVX_gpu_multicast2;
|
||||
int NVX_linked_gpu_multicast;
|
||||
int NVX_progress_fence;
|
||||
int NV_alpha_to_coverage_dither_control;
|
||||
int NV_bindless_multi_draw_indirect;
|
||||
int NV_bindless_multi_draw_indirect_count;
|
||||
int NV_bindless_texture;
|
||||
int NV_blend_equation_advanced;
|
||||
int NV_blend_equation_advanced_coherent;
|
||||
int NV_blend_minmax_factor;
|
||||
int NV_blend_square;
|
||||
int NV_clip_space_w_scaling;
|
||||
int NV_command_list;
|
||||
int NV_compute_program5;
|
||||
int NV_compute_shader_derivatives;
|
||||
int NV_conditional_render;
|
||||
int NV_conservative_raster;
|
||||
int NV_conservative_raster_dilate;
|
||||
int NV_conservative_raster_pre_snap;
|
||||
int NV_conservative_raster_pre_snap_triangles;
|
||||
int NV_conservative_raster_underestimation;
|
||||
int NV_copy_depth_to_color;
|
||||
int NV_copy_image;
|
||||
int NV_deep_texture3D;
|
||||
int NV_depth_buffer_float;
|
||||
int NV_depth_clamp;
|
||||
int NV_draw_texture;
|
||||
int NV_draw_vulkan_image;
|
||||
int NV_evaluators;
|
||||
int NV_explicit_multisample;
|
||||
int NV_fence;
|
||||
int NV_fill_rectangle;
|
||||
int NV_float_buffer;
|
||||
int NV_fog_distance;
|
||||
int NV_fragment_coverage_to_color;
|
||||
int NV_fragment_program;
|
||||
int NV_fragment_program2;
|
||||
int NV_fragment_program4;
|
||||
int NV_fragment_program_option;
|
||||
int NV_fragment_shader_barycentric;
|
||||
int NV_fragment_shader_interlock;
|
||||
int NV_framebuffer_mixed_samples;
|
||||
int NV_framebuffer_multisample_coverage;
|
||||
int NV_geometry_program4;
|
||||
int NV_geometry_shader4;
|
||||
int NV_geometry_shader_passthrough;
|
||||
int NV_gpu_multicast;
|
||||
int NV_gpu_program4;
|
||||
int NV_gpu_program5;
|
||||
int NV_gpu_program5_mem_extended;
|
||||
int NV_gpu_shader5;
|
||||
int NV_half_float;
|
||||
int NV_internalformat_sample_query;
|
||||
int NV_light_max_exponent;
|
||||
int NV_memory_attachment;
|
||||
int NV_memory_object_sparse;
|
||||
int NV_mesh_shader;
|
||||
int NV_multisample_coverage;
|
||||
int NV_multisample_filter_hint;
|
||||
int NV_occlusion_query;
|
||||
int NV_packed_depth_stencil;
|
||||
int NV_parameter_buffer_object;
|
||||
int NV_parameter_buffer_object2;
|
||||
int NV_path_rendering;
|
||||
int NV_path_rendering_shared_edge;
|
||||
int NV_pixel_data_range;
|
||||
int NV_point_sprite;
|
||||
int NV_present_video;
|
||||
int NV_primitive_restart;
|
||||
int NV_primitive_shading_rate;
|
||||
int NV_query_resource;
|
||||
int NV_query_resource_tag;
|
||||
int NV_register_combiners;
|
||||
int NV_register_combiners2;
|
||||
int NV_representative_fragment_test;
|
||||
int NV_robustness_video_memory_purge;
|
||||
int NV_sample_locations;
|
||||
int NV_sample_mask_override_coverage;
|
||||
int NV_scissor_exclusive;
|
||||
int NV_shader_atomic_counters;
|
||||
int NV_shader_atomic_float;
|
||||
int NV_shader_atomic_float64;
|
||||
int NV_shader_atomic_fp16_vector;
|
||||
int NV_shader_atomic_int64;
|
||||
int NV_shader_buffer_load;
|
||||
int NV_shader_buffer_store;
|
||||
int NV_shader_storage_buffer_object;
|
||||
int NV_shader_subgroup_partitioned;
|
||||
int NV_shader_texture_footprint;
|
||||
int NV_shader_thread_group;
|
||||
int NV_shader_thread_shuffle;
|
||||
int NV_shading_rate_image;
|
||||
int NV_stereo_view_rendering;
|
||||
int NV_tessellation_program5;
|
||||
int NV_texgen_emboss;
|
||||
int NV_texgen_reflection;
|
||||
int NV_texture_barrier;
|
||||
int NV_texture_compression_vtc;
|
||||
int NV_texture_env_combine4;
|
||||
int NV_texture_expand_normal;
|
||||
int NV_texture_multisample;
|
||||
int NV_texture_rectangle;
|
||||
int NV_texture_rectangle_compressed;
|
||||
int NV_texture_shader;
|
||||
int NV_texture_shader2;
|
||||
int NV_texture_shader3;
|
||||
int NV_timeline_semaphore;
|
||||
int NV_transform_feedback;
|
||||
int NV_transform_feedback2;
|
||||
int NV_uniform_buffer_std430_layout;
|
||||
int NV_uniform_buffer_unified_memory;
|
||||
int NV_vdpau_interop;
|
||||
int NV_vdpau_interop2;
|
||||
int NV_vertex_array_range;
|
||||
int NV_vertex_array_range2;
|
||||
int NV_vertex_attrib_integer_64bit;
|
||||
int NV_vertex_buffer_unified_memory;
|
||||
int NV_vertex_program;
|
||||
int NV_vertex_program1_1;
|
||||
int NV_vertex_program2;
|
||||
int NV_vertex_program2_option;
|
||||
int NV_vertex_program3;
|
||||
int NV_vertex_program4;
|
||||
int NV_video_capture;
|
||||
int NV_viewport_array2;
|
||||
int NV_viewport_swizzle;
|
||||
int OES_byte_coordinates;
|
||||
int OES_compressed_paletted_texture;
|
||||
int OES_fixed_point;
|
||||
int OES_query_matrix;
|
||||
int OES_read_format;
|
||||
int OES_single_precision;
|
||||
int OML_interlace;
|
||||
int OML_resample;
|
||||
int OML_subsample;
|
||||
int OVR_multiview;
|
||||
int OVR_multiview2;
|
||||
int PGI_misc_hints;
|
||||
int PGI_vertex_hints;
|
||||
int REND_screen_coordinates;
|
||||
int S3_s3tc;
|
||||
int SGIS_detail_texture;
|
||||
int SGIS_fog_function;
|
||||
int SGIS_generate_mipmap;
|
||||
int SGIS_multisample;
|
||||
int SGIS_pixel_texture;
|
||||
int SGIS_point_line_texgen;
|
||||
int SGIS_point_parameters;
|
||||
int SGIS_sharpen_texture;
|
||||
int SGIS_texture4D;
|
||||
int SGIS_texture_border_clamp;
|
||||
int SGIS_texture_color_mask;
|
||||
int SGIS_texture_edge_clamp;
|
||||
int SGIS_texture_filter4;
|
||||
int SGIS_texture_lod;
|
||||
int SGIS_texture_select;
|
||||
int SGIX_async;
|
||||
int SGIX_async_histogram;
|
||||
int SGIX_async_pixel;
|
||||
int SGIX_blend_alpha_minmax;
|
||||
int SGIX_calligraphic_fragment;
|
||||
int SGIX_clipmap;
|
||||
int SGIX_convolution_accuracy;
|
||||
int SGIX_depth_pass_instrument;
|
||||
int SGIX_depth_texture;
|
||||
int SGIX_flush_raster;
|
||||
int SGIX_fog_offset;
|
||||
int SGIX_fragment_lighting;
|
||||
int SGIX_framezoom;
|
||||
int SGIX_igloo_interface;
|
||||
int SGIX_instruments;
|
||||
int SGIX_interlace;
|
||||
int SGIX_ir_instrument1;
|
||||
int SGIX_list_priority;
|
||||
int SGIX_pixel_texture;
|
||||
int SGIX_pixel_tiles;
|
||||
int SGIX_polynomial_ffd;
|
||||
int SGIX_reference_plane;
|
||||
int SGIX_resample;
|
||||
int SGIX_scalebias_hint;
|
||||
int SGIX_shadow;
|
||||
int SGIX_shadow_ambient;
|
||||
int SGIX_sprite;
|
||||
int SGIX_subsample;
|
||||
int SGIX_tag_sample_buffer;
|
||||
int SGIX_texture_add_env;
|
||||
int SGIX_texture_coordinate_clamp;
|
||||
int SGIX_texture_lod_bias;
|
||||
int SGIX_texture_multi_buffer;
|
||||
int SGIX_texture_scale_bias;
|
||||
int SGIX_vertex_preclip;
|
||||
int SGIX_ycrcb;
|
||||
int SGIX_ycrcb_subsample;
|
||||
int SGIX_ycrcba;
|
||||
int SGI_color_matrix;
|
||||
int SGI_color_table;
|
||||
int SGI_texture_color_table;
|
||||
int SUNX_constant_data;
|
||||
int SUN_convolution_border_modes;
|
||||
int SUN_global_alpha;
|
||||
int SUN_mesh_array;
|
||||
int SUN_slice_accum;
|
||||
int SUN_triangle_list;
|
||||
int SUN_vertex;
|
||||
int WIN_phong_shading;
|
||||
int WIN_specular_fog;
|
||||
|
||||
PFNGLACCUMXOESPROC AccumxOES;
|
||||
PFNGLACQUIREKEYEDMUTEXWIN32EXTPROC AcquireKeyedMutexWin32EXT;
|
||||
@@ -10483,20 +11089,16 @@ extern "C" {
|
||||
PFNGLWINDOWRECTANGLESEXTPROC WindowRectanglesEXT;
|
||||
PFNGLWRITEMASKEXTPROC WriteMaskEXT;
|
||||
|
||||
|
||||
#pragma endregion
|
||||
|
||||
void* glad_loader_handle;
|
||||
} GladGLContext;
|
||||
|
||||
SSCAPI GLAD_API_CALL int SSCDECL gladLoadGLContextUserPtr(GladGLContext* context, GLADuserptrloadfunc load, void* userptr);
|
||||
SSCAPI GLAD_API_CALL int SSCDECL gladLoadGLContext(GladGLContext* context, GLADloadfunc load);
|
||||
|
||||
GLAD_API_CALL int gladLoadGLContextUserPtr(GladGLContext* context, GLADuserptrloadfunc load, void* userptr);
|
||||
GLAD_API_CALL int gladLoadGLContext(GladGLContext* context, GLADloadfunc load);
|
||||
|
||||
#ifdef GLAD_GL
|
||||
|
||||
SSCAPI GLAD_API_CALL int SSCDECL gladLoaderLoadGLContext(GladGLContext* context);
|
||||
SSCAPI GLAD_API_CALL void SSCDECL gladLoaderUnloadGLContext(GladGLContext* context);
|
||||
GLAD_API_CALL int gladLoaderLoadGLContext(GladGLContext* context);
|
||||
GLAD_API_CALL void gladLoaderUnloadGLContext(GladGLContext* context);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
#include "./include/StgSharpC.h"
|
||||
|
||||
|
||||
|
||||
|
||||
SSCAPI _inline void __cdecl transpose2to3(matrix2map* source, matrix3map* target)
|
||||
{
|
||||
__m128 t0 = _mm_shuffle_ps(ALIGN(source->m[0][0]), ALIGN(source->m[0][1]), _MM_SHUFFLE(1, 0, 1, 0));
|
||||
__m128 t1 = _mm_shuffle_ps(ALIGN(source->m[0][0]), ALIGN(source->m[0][1]), _MM_SHUFFLE(3, 2, 3, 2));
|
||||
|
||||
target->colum[0] = _mm_shuffle_ps(t0, *defaultVecPtr, _MM_SHUFFLE(2, 0, 2, 0));
|
||||
target->colum[1] = _mm_shuffle_ps(t0, *defaultVecPtr, _MM_SHUFFLE(3, 1, 3, 1));
|
||||
target->colum[2] = _mm_shuffle_ps(t1, *defaultVecPtr, _MM_SHUFFLE(2, 0, 2, 0));
|
||||
}
|
||||
|
||||
SSCAPI _inline void __cdecl transpose2to4(matrix2map* source, matrix4map* target)
|
||||
{
|
||||
__m128 t0 = _mm_shuffle_ps(ALIGN(source->m[0][0]), ALIGN(source->m[0][1]), _MM_SHUFFLE(1, 0, 1, 0));
|
||||
__m128 t1 = _mm_shuffle_ps(ALIGN(source->m[0][0]), ALIGN(source->m[0][1]), _MM_SHUFFLE(3, 2, 3, 2));
|
||||
|
||||
target->colum[0] = _mm_shuffle_ps(t0, *defaultVecPtr, _MM_SHUFFLE(2, 0, 2, 0));
|
||||
target->colum[1] = _mm_shuffle_ps(t0, *defaultVecPtr, _MM_SHUFFLE(3, 1, 3, 1));
|
||||
target->colum[2] = _mm_shuffle_ps(t1, *defaultVecPtr, _MM_SHUFFLE(2, 0, 2, 0));
|
||||
target->colum[3] = _mm_shuffle_ps(t1, *defaultVecPtr, _MM_SHUFFLE(3, 1, 3, 1));
|
||||
}
|
||||
|
||||
SSCAPI _inline void __cdecl deinit_mat2(matrix2map* mat)
|
||||
{
|
||||
_aligned_free(mat);
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
|
||||
|
||||
#include "./include/StgSharpC.h"
|
||||
#include <stdio.h>
|
||||
|
||||
SSCAPI __inline void _cdecl transpose3to2(matrix3map* source, matrix2map* target)
|
||||
{
|
||||
__m128 t0 = _mm_shuffle_ps(ALIGN(source->m[0][0]), ALIGN(source->m[0][1]), _MM_SHUFFLE(1, 0, 1, 0));
|
||||
__m128 t2 = _mm_shuffle_ps(ALIGN(source->m[0][2]), *defaultVecPtr, _MM_SHUFFLE(1, 0, 1, 0));
|
||||
|
||||
target->colum[0] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(2, 0, 2, 0));
|
||||
target->colum[1] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(3, 1, 3, 1));
|
||||
}
|
||||
|
||||
SSCAPI __inline void _cdecl transpose3to3(matrix3map* source, matrix3map* target)
|
||||
{
|
||||
__m128 t0 = _mm_shuffle_ps(ALIGN(source->m[0][0]), ALIGN(source->m[0][1]), _MM_SHUFFLE(1, 0, 1, 0));
|
||||
__m128 t1 = _mm_shuffle_ps(ALIGN(source->m[0][0]), ALIGN(source->m[0][1]), _MM_SHUFFLE(3, 2, 3, 2));
|
||||
__m128 t2 = _mm_shuffle_ps(ALIGN(source->m[0][2]), *defaultVecPtr, _MM_SHUFFLE(1, 0, 1, 0));
|
||||
__m128 t3 = _mm_shuffle_ps(ALIGN(source->m[0][2]), *defaultVecPtr, _MM_SHUFFLE(3, 2, 3, 2));
|
||||
|
||||
target->colum[0] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(2, 0, 2, 0));
|
||||
target->colum[1] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(3, 1, 3, 1));
|
||||
target->colum[2] = _mm_shuffle_ps(t1, t3, _MM_SHUFFLE(2, 0, 2, 0));
|
||||
}
|
||||
|
||||
|
||||
SSCAPI __inline void _cdecl transpose3to4(matrix3map* source, matrix4map* target)
|
||||
{
|
||||
__m128 t0 = _mm_shuffle_ps(ALIGN(source->m[0][0]), ALIGN(source->m[0][1]), _MM_SHUFFLE(1, 0, 1, 0));
|
||||
__m128 t1 = _mm_shuffle_ps(ALIGN(source->m[0][0]), ALIGN(source->m[0][1]), _MM_SHUFFLE(3, 2, 3, 2));
|
||||
__m128 t2 = _mm_shuffle_ps(ALIGN(source->m[0][2]), *defaultVecPtr, _MM_SHUFFLE(1, 0, 1, 0));
|
||||
__m128 t3 = _mm_shuffle_ps(ALIGN(source->m[0][2]), *defaultVecPtr, _MM_SHUFFLE(3, 2, 3, 2));
|
||||
|
||||
target->colum[0] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(2, 0, 2, 0));
|
||||
target->colum[1] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(3, 1, 3, 1));
|
||||
target->colum[2] = _mm_shuffle_ps(t1, t3, _MM_SHUFFLE(2, 0, 2, 0));
|
||||
target->colum[3] = _mm_shuffle_ps(t1, t3, _MM_SHUFFLE(3, 1, 3, 1));
|
||||
}
|
||||
|
||||
SSCAPI _inline float _cdecl det_mat3_internal(__m128 const c0, __m128 const c1, __m128 const c2)
|
||||
{
|
||||
|
||||
//let adding row aligned
|
||||
__m128 addc1 = _mm_shuffle_ps(c1, c1, _MM_SHUFFLE(3, 0, 2, 1));
|
||||
__m128 addc2 = _mm_shuffle_ps(c2, c2, _MM_SHUFFLE(3, 1, 0, 2));
|
||||
|
||||
//let sub row aligned
|
||||
__m128 subc1 = _mm_shuffle_ps(c1, c1, _MM_SHUFFLE(3, 1, 0, 2));
|
||||
__m128 subc2 = _mm_shuffle_ps(c2, c2, _MM_SHUFFLE(3, 0, 2, 1));
|
||||
|
||||
//multple all add row
|
||||
__m128 cache = _mm_mul_ps(c0, addc1);
|
||||
cache = _mm_mul_ps(cache, addc2);
|
||||
|
||||
//multiple all sub row
|
||||
__m128 sub = _mm_mul_ps(c0, subc1);
|
||||
sub = _mm_mul_ps(sub, subc2);
|
||||
|
||||
//main-corner sub sub-corner
|
||||
cache = _mm_sub_ps(cache, sub);
|
||||
|
||||
__m128 ret = _mm_hadd_ps(cache, cache); //element 1 add element 2
|
||||
ret = _mm_add_ps(ret, cache); //(e1 add e2) add element 3
|
||||
|
||||
|
||||
return ret.m128_f32[2];
|
||||
}
|
||||
|
||||
SSCAPI _inline float _cdecl det_mat3(matrix3map* mat)
|
||||
{
|
||||
return det_mat3_internal(
|
||||
mat->colum[0],
|
||||
mat->colum[1],
|
||||
mat->colum[2]
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
#include "./include/StgSharpC.h"
|
||||
#include <stdio.h>
|
||||
#include <pmmintrin.h>
|
||||
|
||||
|
||||
|
||||
|
||||
SSCAPI __inline void __cdecl transpose4to2(matrix4map* source, matrix4map* target)
|
||||
{
|
||||
__m128 t0 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(1, 0, 1, 0));
|
||||
__m128 t2 = _mm_shuffle_ps(ALIGN(source->colum[2]), ALIGN(source->colum[3]), _MM_SHUFFLE(1, 0, 1, 0));
|
||||
|
||||
target->colum[0] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(2, 0, 2, 0));
|
||||
target->colum[1] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(3, 1, 3, 1));
|
||||
}
|
||||
|
||||
SSCAPI __inline void __cdecl transpose4to4(matrix4map* source, matrix4map* target)
|
||||
{
|
||||
__m128 t0 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(1, 0, 1, 0));
|
||||
__m128 t1 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(3, 2, 3, 2));
|
||||
__m128 t2 = _mm_shuffle_ps(ALIGN(source->colum[2]), ALIGN(source->colum[3]), _MM_SHUFFLE(1, 0, 1, 0));
|
||||
__m128 t3 = _mm_shuffle_ps(ALIGN(source->colum[2]), ALIGN(source->colum[3]), _MM_SHUFFLE(3, 2, 3, 2));
|
||||
|
||||
target->colum[0] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(2, 0, 2, 0));
|
||||
target->colum[1] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(3, 1, 3, 1));
|
||||
target->colum[2] = _mm_shuffle_ps(t1, t3, _MM_SHUFFLE(2, 0, 2, 0));
|
||||
target->colum[3] = _mm_shuffle_ps(t1, t3, _MM_SHUFFLE(3, 1, 3, 1));
|
||||
|
||||
}
|
||||
|
||||
SSCAPI __inline void __cdecl transpose4to3(matrix4map* source, matrix3map* target)
|
||||
{
|
||||
__m128 t0 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(1, 0, 1, 0));
|
||||
__m128 t1 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(3, 2, 3, 2));
|
||||
__m128 t2 = _mm_shuffle_ps(ALIGN(source->colum[2]), ALIGN(source->colum[3]), _MM_SHUFFLE(1, 0, 1, 0));
|
||||
__m128 t3 = _mm_shuffle_ps(ALIGN(source->colum[2]), ALIGN(source->colum[3]), _MM_SHUFFLE(3, 2, 3, 2));
|
||||
|
||||
target->colum[0] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(2, 0, 2, 0));
|
||||
target->colum[1] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(3, 1, 3, 1));
|
||||
target->colum[2] = _mm_shuffle_ps(t1, t3, _MM_SHUFFLE(2, 0, 2, 0));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
SSCAPI __inline float __cdecl det_mat4(matrix4map* matPtr, matrix4map* transpose)
|
||||
{
|
||||
__m128 mc0 = ALIGN(matPtr->colum[0]);
|
||||
__m128 mc1 = ALIGN(matPtr->colum[1]);
|
||||
__m128 mc2 = ALIGN(matPtr->colum[2]);
|
||||
__m128 mc3 = ALIGN(matPtr->colum[3]);
|
||||
|
||||
__m128 cogeneration = _mm_set_ps(
|
||||
det_mat3_internal(mc0, mc1, mc2),
|
||||
det_mat3_internal(mc0, mc1, mc3),
|
||||
det_mat3_internal(mc0, mc2, mc3),
|
||||
det_mat3_internal(mc1, mc2, mc3)
|
||||
);
|
||||
__m128 retvec = _mm_mul_ps(ALIGN(transpose->colum[3]), cogeneration);
|
||||
retvec = _mm_hsub_ps(retvec, retvec);
|
||||
retvec = _mm_hadd_ps(retvec, retvec);
|
||||
return -retvec.m128_f32[0];
|
||||
|
||||
}
|
||||
|
||||
SSCAPI __inline void __cdecl deinit_mat4(matrix4map* matPtr)
|
||||
{
|
||||
_aligned_free(matPtr);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,10 @@
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\debuger.c;D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\x64\Debug\debuger.obj
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\dllmain.c;D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\x64\Debug\dllmain.obj
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\glsc2.c;D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\x64\Debug\glsc2.obj
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\linear.c;D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\x64\Debug\linear.obj
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat2.c;D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\x64\Debug\mat2.obj
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat3.c;D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\x64\Debug\mat3.obj
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat4.c;D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\x64\Debug\mat4.obj
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\stb_image.c;D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\x64\Debug\stb_image.obj
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c;D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\x64\Debug\StgSharpC.obj
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\wgl.c;D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\x64\Debug\wgl.obj
|
||||
@@ -0,0 +1,2 @@
|
||||
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.39.33519:TargetPlatformVersion=10.0.22621.0:
|
||||
Debug|x64|D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\实验\contexttest\|
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
^D:\NITLOADINDUSTRY\研究项目\1-FLAGSHIP\TH2020\PROJECTFILE\源代码\STGSHARPC\LIB\GLFW3.LIB|D:\NITLOADINDUSTRY\研究项目\1-FLAGSHIP\TH2020\PROJECTFILE\源代码\STGSHARPC\LIB\GLFW3DLL.LIB|D:\NITLOADINDUSTRY\研究项目\1-FLAGSHIP\TH2020\PROJECTFILE\源代码\STGSHARPC\LIB\GLFW3_MT.LIB|D:\NITLOADINDUSTRY\研究项目\1-FLAGSHIP\TH2020\PROJECTFILE\源代码\STGSHARPC\X64\DEBUG\DEBUGER.OBJ|D:\NITLOADINDUSTRY\研究项目\1-FLAGSHIP\TH2020\PROJECTFILE\源代码\STGSHARPC\X64\DEBUG\DLLMAIN.OBJ|D:\NITLOADINDUSTRY\研究项目\1-FLAGSHIP\TH2020\PROJECTFILE\源代码\STGSHARPC\X64\DEBUG\GLSC2.OBJ|D:\NITLOADINDUSTRY\研究项目\1-FLAGSHIP\TH2020\PROJECTFILE\源代码\STGSHARPC\X64\DEBUG\LINEAR.OBJ|D:\NITLOADINDUSTRY\研究项目\1-FLAGSHIP\TH2020\PROJECTFILE\源代码\STGSHARPC\X64\DEBUG\MAT2.OBJ|D:\NITLOADINDUSTRY\研究项目\1-FLAGSHIP\TH2020\PROJECTFILE\源代码\STGSHARPC\X64\DEBUG\MAT3.OBJ|D:\NITLOADINDUSTRY\研究项目\1-FLAGSHIP\TH2020\PROJECTFILE\源代码\STGSHARPC\X64\DEBUG\MAT4.OBJ|D:\NITLOADINDUSTRY\研究项目\1-FLAGSHIP\TH2020\PROJECTFILE\源代码\STGSHARPC\X64\DEBUG\STB_IMAGE.OBJ|D:\NITLOADINDUSTRY\研究项目\1-FLAGSHIP\TH2020\PROJECTFILE\源代码\STGSHARPC\X64\DEBUG\STGSHARPC.OBJ|D:\NITLOADINDUSTRY\研究项目\1-FLAGSHIP\TH2020\PROJECTFILE\源代码\STGSHARPC\X64\DEBUG\WGL.OBJ
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC.lib
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC.EXP
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\x64\Debug\StgSharpC.ilk
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -1,4 +1,4 @@
|
||||
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.38.33130.0
|
||||
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.39.33519.0
|
||||
|
||||
include listing.inc
|
||||
|
||||
@@ -6,6 +6,6 @@ INCLUDELIB MSVCRTD
|
||||
INCLUDELIB OLDNAMES
|
||||
|
||||
msvcjmc SEGMENT
|
||||
__ECC25BFC_debuger@c DB 01H
|
||||
__4E119E7D_debuger@c DB 01H
|
||||
msvcjmc ENDS
|
||||
END
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user