daily update on 20230525 by nitload youmu, ses00001 not solved
This commit is contained in:
@@ -9,9 +9,32 @@
|
||||
#include "internal.h"
|
||||
|
||||
extern float* triangleVertexes;
|
||||
double previousTime = 0;
|
||||
double targetFPS = 60.0;
|
||||
|
||||
const char* vertexShaderSource =
|
||||
"#version 460 core\n"
|
||||
"layout (location = 0) in vec3 aPos;\n"
|
||||
"void main()\n"
|
||||
"{\n"
|
||||
"gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0);\n"
|
||||
"}\n\0";
|
||||
|
||||
const char* fragmentShaderSource =
|
||||
"#version 460 core\n"
|
||||
"out vec4 FragColor;\n"
|
||||
"void main()\n"
|
||||
"{\n"
|
||||
"FragColor = vec4(1.0f, 0.5f, 0.2f, 1.0f);\n"
|
||||
"}\n\0"
|
||||
;
|
||||
|
||||
float triangle[] =
|
||||
{
|
||||
0,0.5f,0,
|
||||
-0.5f,-0.5f,0,
|
||||
0.5f,-0.5f,0,
|
||||
};
|
||||
|
||||
int version[4] = { 0,0,0,0 };
|
||||
STGSHARPGRAPHICS_API int* versionInfo = &version;
|
||||
@@ -32,31 +55,7 @@ STGSHARPGRAPHICS_API IOpackage initPackage(void)
|
||||
|
||||
STGSHARPGRAPHICS_API int initWindow(basicWindowInfo info)
|
||||
{
|
||||
printf("%f,%f,%f,%f,", info.backgroundColor[0], info.backgroundColor[1], info.backgroundColor[2], info.backgroundColor[3]);
|
||||
|
||||
const char* vertexShaderSource =
|
||||
"#version 460 core\n"
|
||||
"layout (location = 0) in vec3 aPos;\n"
|
||||
"void main()\n"
|
||||
"{\n"
|
||||
"gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0);\n"
|
||||
"}\n";
|
||||
|
||||
const char* fragmentShaderSource =
|
||||
"#version 460 core\n"
|
||||
"out vec4 FragColor;\n"
|
||||
"void main()\n"
|
||||
"{\n"
|
||||
"FragColor = vec4(1.0f, 0.5f, 0.2f, 1.0f);\n"
|
||||
"}\n"
|
||||
;
|
||||
|
||||
float triangle[] =
|
||||
{
|
||||
0,0.5f,0,
|
||||
-0.5f,-0.5f,0,
|
||||
0.5f,-0.5f,0,
|
||||
};
|
||||
|
||||
|
||||
|
||||
glfwInit();
|
||||
@@ -83,6 +82,8 @@ STGSHARPGRAPHICS_API int initWindow(basicWindowInfo info)
|
||||
return -1;
|
||||
}
|
||||
|
||||
glfwSwapInterval(0);
|
||||
|
||||
//编译顶点着色器
|
||||
|
||||
unsigned int vertexShader;
|
||||
@@ -135,23 +136,33 @@ STGSHARPGRAPHICS_API int initWindow(basicWindowInfo info)
|
||||
|
||||
while (!glfwWindowShouldClose(window))
|
||||
{
|
||||
if (1)
|
||||
{
|
||||
|
||||
}
|
||||
// input
|
||||
// -----
|
||||
|
||||
// render
|
||||
// ------
|
||||
|
||||
/**/
|
||||
glClearColor(
|
||||
info.backgroundColor[0],
|
||||
info.backgroundColor[1],
|
||||
info.backgroundColor[2],
|
||||
info.backgroundColor[3]
|
||||
info.backgroundColor.x,
|
||||
info.backgroundColor.y,
|
||||
info.backgroundColor.Z,
|
||||
info.backgroundColor.w
|
||||
);
|
||||
/**/
|
||||
//glClearColor(0.1f,0.3f,0.5f,1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
// draw our first triangle
|
||||
/**/
|
||||
glUseProgram(shaderProgram);
|
||||
glBindVertexArray(VAO); // seeing as we only have a single VAO there's no need to bind it every time, but we'll do so to keep things a bit more organized
|
||||
glBindVertexArray(VAO);
|
||||
// seeing as we only have a single VAO there's no need to bind it every time,
|
||||
// but we'll do so to keep things a bit more organized
|
||||
glDrawArrays(GL_TRIANGLES, 0, 3);
|
||||
//glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, 0);
|
||||
// glBindVertexArray(0); // no need to unbind it every time
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
<TargetName>StgSharpGraphics</TargetName>
|
||||
<OutDir>$(SolutionDir)StgSharp\</OutDir>
|
||||
<LibraryPath>$(SolutionDir)StgSharpGraphics;$(LibraryPath)</LibraryPath>
|
||||
<IntDir>$(projectdir)$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<TargetName>StgSharpGraphics</TargetName>
|
||||
@@ -85,6 +86,7 @@
|
||||
<TargetName>StgSharpGraphics</TargetName>
|
||||
<OutDir>$(SolutionDir)StgSharp\</OutDir>
|
||||
<LibraryPath>$(SolutionDir)StgSharpGraphics;$(LibraryPath)</LibraryPath>
|
||||
<IntDir>$(projectdir)$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
|
||||
@@ -13,11 +13,19 @@ typedef struct internalIO
|
||||
void (*InitWindow)(int width,int height);
|
||||
}IOpackage;
|
||||
|
||||
typedef struct vec4d
|
||||
{
|
||||
float x;
|
||||
float y;
|
||||
float Z;
|
||||
float w;
|
||||
}vec4d;
|
||||
|
||||
typedef struct basicWindowInfo
|
||||
{
|
||||
int width;
|
||||
int height;
|
||||
float backgroundColor[4];
|
||||
vec4d backgroundColor;
|
||||
char name[];
|
||||
}basicWindowInfo;
|
||||
|
||||
|
||||
@@ -2,19 +2,10 @@ d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharp
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpgraphics\x64\debug\vc143.pdb
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpgraphics\x64\debug\vc143.idb
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpgraphics\x64\debug\pch.obj
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpgraphics\x64\debug\stgsharpgraphics.obj
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpgraphics\x64\debug\glad.obj
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpgraphics\x64\debug\geometryhandler.obj
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpgraphics\x64\debug\dllmain.obj
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpgraphics\x64\debug\stgsharpgraphics.ilk
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharp\stgsharpgraphics.dll
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharp\stgsharpgraphics.pdb
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharp\stgsharpgraphics.lib
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharp\stgsharpgraphics.exp
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpgraphics\x64\debug\stgsharpgraphics.vcxproj.filelistabsolute.txt
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpgraphics\x64\debug\stgsharpgraphics.tlog\cl.command.1.tlog
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpgraphics\x64\debug\stgsharpgraphics.tlog\cl.read.1.tlog
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpgraphics\x64\debug\stgsharpgraphics.tlog\cl.write.1.tlog
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpgraphics\x64\debug\stgsharpgraphics.tlog\link.command.1.tlog
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpgraphics\x64\debug\stgsharpgraphics.tlog\link.read.1.tlog
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpgraphics\x64\debug\stgsharpgraphics.tlog\link.write.1.tlog
|
||||
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpgraphics\x64\debug\stgsharpgraphics.tlog\stgsharpgraphics.write.1u.tlog
|
||||
|
||||
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.
@@ -1 +1 @@
|
||||
x64\Debug\\_IsIncrementalBuild
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpGraphics\x64\Debug\\_IsIncrementalBuild
|
||||
|
||||
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