daily update on 20230516 by nitload youmu, geometry interfaces created between cs and c
This commit is contained in:
@@ -73,3 +73,9 @@ STGSHARPGRAPHICS_API int initWindow(int width, int height)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void renderTriangle()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
// 符号视为是被导出的。
|
||||
|
||||
#include "internal.h"
|
||||
#include "geometryHandler.h"
|
||||
|
||||
#define STGSHARPGRAPHICS_API __declspec(dllexport)
|
||||
|
||||
@@ -21,4 +22,6 @@ extern STGSHARPGRAPHICS_API int* versionInfo;
|
||||
|
||||
STGSHARPGRAPHICS_API int fnStgSharpGraphics(void);
|
||||
STGSHARPGRAPHICS_API int initWindow(int width, int height);
|
||||
STGSHARPGRAPHICS_API IOpackage initPackage(void);
|
||||
STGSHARPGRAPHICS_API IOpackage initPackage(void);
|
||||
|
||||
STGSHARPGRAPHICS_API TriangleVertexHandler initTriangle(void);
|
||||
|
||||
@@ -162,6 +162,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h" />
|
||||
<ClInclude Include="geometryHandler.h" />
|
||||
<ClInclude Include="glad\glad.h" />
|
||||
<ClInclude Include="GLFW\glfw3.h" />
|
||||
<ClInclude Include="GLFW\glfw3native.h" />
|
||||
@@ -172,6 +173,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dllmain.c" />
|
||||
<ClCompile Include="geometryHandler.c" />
|
||||
<ClCompile Include="glad.c" />
|
||||
<ClCompile Include="pch.c">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
<ClInclude Include="internal.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="geometryHandler.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="StgSharpGraphics.c">
|
||||
@@ -56,6 +59,9 @@
|
||||
<ClCompile Include="glad.c">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="geometryHandler.c">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Library Include="glfw3.lib">
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
#include "glad/glad.h"
|
||||
#include "GLFW/glfw3.h"
|
||||
#include "stdio.h"
|
||||
#include "StgSharpGraphics.h"
|
||||
|
||||
|
||||
|
||||
STGSHARPGRAPHICS_API TriangleVertexHandler initTriangle(void)
|
||||
{
|
||||
float vertex[9] = {
|
||||
0,0,0,
|
||||
0,0,0,
|
||||
0,0,0,
|
||||
};
|
||||
|
||||
TriangleVertexHandler tri;
|
||||
|
||||
tri.vertex1 = &vertex[0];
|
||||
tri.vertex2 = &vertex[3];
|
||||
tri.vertex3 = &vertex[6];
|
||||
|
||||
return tri;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#include "glad/glad.h"
|
||||
#include "GLFW/glfw3.h"
|
||||
#include "stdio.h"
|
||||
|
||||
typedef struct TriangleVertexHandler
|
||||
{
|
||||
float* vertex1;
|
||||
float* vertex2;
|
||||
float* vertex3;
|
||||
}TriangleVertexHandler;
|
||||
@@ -7,10 +7,10 @@
|
||||
|
||||
#define init InitProgram;
|
||||
|
||||
|
||||
|
||||
typedef struct internalIO
|
||||
{
|
||||
void (*InitWindow)(int width,int height);
|
||||
}IOpackage;
|
||||
|
||||
|
||||
|
||||
|
||||
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.
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.
Reference in New Issue
Block a user