daily update on 20230623 by nitload youmu, SSG lib rewrite

This commit is contained in:
Nitload
2023-06-24 01:03:48 +08:00
parent ee8132c149
commit f99a0674b0
193 changed files with 16115 additions and 8972 deletions
@@ -0,0 +1,36 @@
#include "glad/glad.h"
#include "StgSharpGraphic.h"
glIOpackage pack;
SSGAPI_OUT glIOpackage loadGLApi(void)
{
pack.createWindow = glfwCreateWindow;
pack.makeContextCurrent = glfwMakeContextCurrent;
pack.swapInterval = glfwSwapInterval;
pack.clearColor = glClearColor;
pack.getProcAddress = glfwGetProcAddress;
return pack;
}
SSGAPI_OUT void initGL(void)
{
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
#ifdef __APPLE__
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
#endif // __APPLE__
}
SSGAPI_OUT int initGLAD(void)
{
return gladLoadGLLoader((GLADloadproc)glfwGetProcAddress);
}