10 for line in file("gl.spec"):
11 if line[0]=='#' or line.find(':')>=0:
13 elif line[0]=='\t' and cur_func:
15 if parts[0]=="category" and parts[1]==ext:
16 funcs.append(cur_func)
22 out=file(ext.lower()+".h", "w")
23 out.write("#ifndef MSP_GL_%s_\n"%ext.upper())
24 out.write("#define MSP_GL_%s_\n"%ext.upper())
36 out.write("extern PFNGL%sPROC gl%s;\n"%(f.upper(), f))
38 out.write("\nvoid init_%s();\n"%ext.lower())
47 out=file(ext.lower()+".cpp", "w")
48 out.write("#include \"extension.h\"\n")
49 out.write("#include \"%s.h\"\n"%ext.lower())
58 out.write("PFNGL%sPROC gl%s=0;\n"%(f.upper(), f))
60 out.write("\nvoid init_%s()\n{\n"%ext.lower())
62 out.write("\tgl%s=reinterpret_cast<PFNGL%sPROC>(get_proc_address(\"gl%s\"));\n"%(f, f.upper(), f))