daily update on 20240305 by nitload youmu

This commit is contained in:
YoumuLiu
2024-03-05 10:17:02 +08:00
parent 1f2fca4c8f
commit 6a0cccae79
156 changed files with 23040 additions and 1385 deletions
+10 -4
View File
@@ -7,7 +7,7 @@
GladGLContext* currentContext;
extern char infolog[512] = { 0 };
SSCAPI void _cdecl initGL(int majorVersion, int minorVersion)
SSCAPI void SSCDECL initGL(int majorVersion, int minorVersion)
{
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, majorVersion);
@@ -15,10 +15,16 @@ SSCAPI void _cdecl initGL(int majorVersion, int minorVersion)
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
}
SSCAPI unsigned int loadShaderCode(GladGLContext* context, char* const shaderCode, GLint shadertype)
SSCAPI unsigned int SSCDECL loadShaderCode(GladGLContext* context, char* const shaderCode, GLint shadertype)
{
unsigned int shader = context->CreateShader(shadertype);
context->ShaderSource(shader, 1, &shaderCode, NULL);
unsigned int shader = context->CreateShader(GL_VERTEX_SHADER);
if (!shader)
{
return 0xffffffff;
}
printf("%s\n", shaderCode);
context->ShaderSource(shader, 1, shaderCode, NULL);
printf("%s\n", shaderCode);
context->CompileShader(shader);
int success;
context->GetShaderiv(shader, GL_COMPILE_STATUS, &success);