daily uodate on 20231208 by nitload youmu, preparation for multi thread rendering

This commit is contained in:
Nitload
2023-12-08 05:36:04 +08:00
parent ae804553ce
commit ab85c1a9fe
297 changed files with 157896 additions and 5170 deletions
+11 -5
View File
@@ -5,9 +5,10 @@
#include "./include/glad_gl.h"
#include "./include/glfw3.h"
#include "./include/StgSharpC.h"
#include <stdio.h>
GladGLContext* currentContext;
extern char* infolog[512] = { 0 };
@@ -16,10 +17,6 @@ void printShaderCode(char* const* code)
printf(*code);
}
SSCAPI void _cdecl initGL(int majorVersion, int minorVersion)
{
glfwInit();
@@ -78,6 +75,15 @@ SSCAPI unsigned int linkShaderProgram(GLuint 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);
}
char* _cdecl readLog()
{
infolog[511] = '\0';