Working glx pltf implementation

This commit is contained in:
2026-08-07 14:31:06 +03:00
parent 06acff4dba
commit dc65a5c07e
17 changed files with 592 additions and 527 deletions

29
generate_gl_func_alias.py Normal file
View File

@@ -0,0 +1,29 @@
import os
from sys import argv
sc_dir = os.path.dirname(os.path.realpath(argv[0]))
os.chdir(sc_dir)
hg_tag = "PLTF_GL_FUNC_ALIAS_H_"
lines: list[str] = [
f"#ifndef {hg_tag}\n",
f"#define {hg_tag}\n"
]
with open("./src/pltf/internal/gl_func_decl.h", "r") as f:
header = f.readlines()
for h_line in header:
h_split = h_line.split(" ")
for token in h_split:
if token[0] == "g" and token[1] == "l":
token = token.removesuffix(");")
line = f"#define {token} pltf_{token}\n"
lines.append(line)
lines.append(f"#endif // {hg_tag}\n")
# for line in lines:
# print(line)
with open("./src/pltf/internal/gl_func_alias.h", "w") as f:
f.writelines(lines)