--- /dev/null
+UniformMatrix2fv(...)
+ param value Float32 in array [count*4]
+
+UniformMatrix3fv(...)
+ param value Float32 in array [count*9]
+
+UniformMatrix4fv(...)
+ param value Float32 in array [count*16]
+
+Uniform2fv(...)
+ param value Float32 in array [count*2]
+
+Uniform3fv(...)
+ param value Float32 in array [count*3]
+
+Uniform4fv(...)
+ param value Float32 in array [count*4]
+
+Uniform2iv(...)
+ param value Int32 in array [count*2]
+
+Uniform3iv(...)
+ param value Int32 in array [count*3]
+
+Uniform4iv(...)
+ param value Int32 in array [count*4]
+
+GetActiveUniformsiv(...)
+ param params Int32 out array [COMPSIZE(pname/uniformCount)]
if (s.type=="SizeI" or s.type.endswith("Int32") or s.type.startswith("BufferSize")):
if s.kind=="value":
self.csize = "%s"%self.size
- if self.func.name.startswith("glUniformMatrix") and self.func.name[16]!='x':
- self.csize += "*%d"%(int(self.func.name[15])**2)
- elif self.func.name.startswith("glUniform") and self.func.name[9].isdigit():
- self.csize += "*%s"%self.func.name[9]
if strip_name(self.base_ctype)!="void":
self.csize += "*sizeof(%s)"%self.base_ctype
elif s.kind=="array" and s.size==1:
iomap = IOmap(api.iomap)
for spec in api.specs:
funcs = read_spec(spec, api.prefix)
+ for err in api.errata:
+ read_spec(err, api.prefix, funcs)
funcs = [f for f in funcs if f.name not in api.ignore_funcs and f.category not in api.ignore_categs]
for func in funcs:
func.finalize(typemap, iomap)
self.typemap = None
self.iomap = None
self.specs = []
+ self.errata = []
self.prefix = None
self.enumspecs = []
self.enumprefix = None
self.iomap = os.path.join(path, parts[1])
elif parts[0]=="spec":
self.specs.append(os.path.join(path, parts[1]))
+ elif parts[0]=="errata":
+ self.errata.append(os.path.join(path, parts[1]))
elif parts[0]=="prefix":
self.prefix = parts[1]
elif parts[0]=="enumspec":
sys.stderr.write("Unknown keyword '%s'\n", parts[0])
-def read_spec(fn, prefix):
- funcs = []
+def read_spec(fn, prefix, funcs=None):
+ if funcs is None:
+ funcs = []
cur_func = None
for line in InputFile(fn):
pnames = [n.strip() for n in line[paren+1:cparen].split(",")]
else:
pnames = []
- cur_func = Function(prefix+line[:paren], pnames)
- funcs.append(cur_func)
+ fname = prefix+line[:paren]
+ cur_func = None
+ for f in funcs:
+ if f.name==fname:
+ cur_func = f
+ break
+ if not cur_func:
+ cur_func = Function(prefix+line[:paren], pnames)
+ funcs.append(cur_func)
return funcs