I am trying to use the
AutomaticSourceOutputGenerator Python class from the SDK to write a script that generates code for an API layer.
I am able to write a generator that works great for core spec (I can specify a list of functions from the core spec and get code generated for them). However, I am unable to get this to work for core extensions (eg:
My generator is here:
I noticed that there are two class members,
ext_commands. However, even looking at the
ext_commands dictionary, I am not able to see functions from extensions.
Down to the call to
apiGen(), I don’t understand all the parameters of
AutomaticSourceGeneratorOptions: what is the difference between
emitExtensions for example? What is
I’m pretty sure it’s down to this
apiGen call that I am missing something, but I just can’t figure out what it is…
conventions = OpenXRConventions() featuresPat = "XR_VERSION_1_0" registry.setGenerator(DispatchGenCppOutputGenerator(diagFile=None)) registry.apiGen(AutomaticSourceGeneratorOptions( conventions = conventions, filename = 'dispatch.gen.cpp', directory = cur_dir, apiname = 'openxr', profile = None, versions = featuresPat, emitversions = featuresPat, defaultExtensions = 'openxr', addExtensions = None, removeExtensions = None, emitExtensions = None))
I tried setting
makeREstring('.*') like it is done in
genxr.py, but that did not make any difference.
Any help appreciated. Thanks!