From: Mikko Rasa Date: Mon, 16 Jun 2014 20:06:01 +0000 (+0300) Subject: Use GL_VERSION_x_y to guard the enums for promoted extensions X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=f159ebc4120fb057c9d59efb0e5c7c36bff6f40a;p=libs%2Fgl.git Use GL_VERSION_x_y to guard the enums for promoted extensions The core names for enums are used in headers, and older systems might have the extension present but too old core version. --- diff --git a/scripts/extgen.py b/scripts/extgen.py index 7ab8abc3..7a1b1862 100755 --- a/scripts/extgen.py +++ b/scripts/extgen.py @@ -263,7 +263,10 @@ if funcs or enums: out.write("#endif\n\n") if enums: - out.write("#ifndef GL_%s\n"%ext) + if ver: + out.write("#ifndef GL_VERSION_%s\n"%"_".join(map(str, ver))) + else: + out.write("#ifndef GL_%s\n"%ext) for e in enums: out.write("#define %s 0x%04X\n"%(e.name, e.value)) out.write("#endif\n\n")