Current OpenGL port status

This commit is contained in:
Cacodemon345
2025-03-09 01:39:07 +06:00
parent a4a521b345
commit 7572469988
13 changed files with 473 additions and 9 deletions

View File

@@ -91,13 +91,16 @@ extern ini_section_t ini_find_or_create_section(ini_t ini, const char *name);
extern void ini_rename_section(ini_section_t section, const char *name);
extern void ini_delete_section_if_empty(ini_t ini, ini_section_t section);
static inline void *wx_config_load(const char *path) { return (void*) ini_read(path); };
static inline void *wx_config_load(const char *path) { return (void*) ini_read(path); }
static inline int wx_config_get_string(void *config, const char *name, char *dst, int size, const char *defVal) {
int res = ini_has_entry(ini_find_or_create_section((ini_t)config, ""), name);
char* str = ini_get_string((ini_t)config, "", name, (char*)defVal);
if (size == 0)
return res;
strncpy(dst, str, size);
if (str != NULL)
strncpy(dst, str, size - 1);
else
dst[0] = 0;
return res;
}
static inline int wx_config_get_int(void *config, const char *name, int *dst, int defVal) {

View File

@@ -53,4 +53,7 @@ void get_glslp_name(const char *f, char *s, int size);
glslp_t *glslp_parse(const char *f);
void glslp_free(glslp_t *p);
#endif /* SRC_WX_GLSLP_PARSER_H_ */
void glslp_read_shader_config(glslp_t *shader);
void glslp_write_shader_config(glslp_t *shader);
#endif /* SRC_WX_GLSLP_PARSER_H_ */