daily update on 20231111 by nitload youmu

This commit is contained in:
Nitload
2023-11-11 17:12:37 +08:00
parent 26c7dafc2c
commit dac5f2455b
98 changed files with 10065 additions and 6029 deletions
+30 -29
View File
@@ -746,6 +746,7 @@ extern "C" {
context->PolygonOffsetClamp = (PFNGLPOLYGONOFFSETCLAMPPROC)load(userptr, "glPolygonOffsetClamp");
context->SpecializeShader = (PFNGLSPECIALIZESHADERPROC)load(userptr, "glSpecializeShader");
}
static void glad_gl_load_GL_3DFX_tbuffer(GladGLContext* context, GLADuserptrloadfunc load, void* userptr) {
if (!context->_3DFX_tbuffer) return;
context->TbufferMask3DFX = (PFNGLTBUFFERMASK3DFXPROC)load(userptr, "glTbufferMask3DFX");
@@ -4102,38 +4103,38 @@ extern "C" {
}
*out_exts = (const char*)context->GetString(GL_EXTENSIONS);
#if GLAD_GL_IS_SOME_NEW_VERSION
}
}
else {
unsigned int index = 0;
unsigned int num_exts_i = 0;
char** exts_i = NULL;
if (context->GetStringi == NULL || context->GetIntegerv == NULL) {
return 0;
}
context->GetIntegerv(GL_NUM_EXTENSIONS, (int*)&num_exts_i);
if (num_exts_i > 0) {
exts_i = (char**)malloc(num_exts_i * (sizeof * exts_i));
}
if (exts_i == NULL) {
return 0;
}
for (index = 0; index < num_exts_i; index++) {
const char* gl_str_tmp = (const char*)context->GetStringi(GL_EXTENSIONS, index);
size_t len = strlen(gl_str_tmp) + 1;
unsigned int index = 0;
unsigned int num_exts_i = 0;
char** exts_i = NULL;
if (context->GetStringi == NULL || context->GetIntegerv == NULL) {
return 0;
}
context->GetIntegerv(GL_NUM_EXTENSIONS, (int*)&num_exts_i);
if (num_exts_i > 0) {
exts_i = (char**)malloc(num_exts_i * (sizeof * exts_i));
}
if (exts_i == NULL) {
return 0;
}
for (index = 0; index < num_exts_i; index++) {
const char* gl_str_tmp = (const char*)context->GetStringi(GL_EXTENSIONS, index);
size_t len = strlen(gl_str_tmp) + 1;
char* local_str = (char*)malloc(len * sizeof(char));
if (local_str != NULL) {
memcpy(local_str, gl_str_tmp, len * sizeof(char));
}
exts_i[index] = local_str;
char* local_str = (char*)malloc(len * sizeof(char));
if (local_str != NULL) {
memcpy(local_str, gl_str_tmp, len * sizeof(char));
}
*out_num_exts_i = num_exts_i;
*out_exts_i = exts_i;
}
exts_i[index] = local_str;
}
*out_num_exts_i = num_exts_i;
*out_exts_i = exts_i;
}
#endif
return 1;
return 1;
}
static void glad_gl_free_extensions(char** exts_i, unsigned int num_exts_i) {
if (exts_i != NULL) {
@@ -5243,7 +5244,7 @@ static void* glad_get_dlopen_handle(const char* lib_names[], int length) {
handle = (void*)LoadPackagedLibrary(buffer, 0);
}
free((void*)buffer);
}
}
#else
handle = (void*)LoadLibraryA(lib_names[i]);
#endif
@@ -5253,7 +5254,7 @@ static void* glad_get_dlopen_handle(const char* lib_names[], int length) {
if (handle != NULL) {
return handle;
}
}
}
return NULL;
}