daily uodate on 20231208 by nitload youmu, preparation for multi thread rendering
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user