Skip to content
Discussion options

You must be logged in to vote

For anyone in this in the future:

Slang now has a toJson API directly, which makes this easier.

Steps:

  1. Create global session
  2. Create session
  3. For each slang file, create a module if and only if it has at least one entry point (getDefinedEntryPointCount() > 0)
  4. For each module, for each entry point index, get that defined entry point, create a composite component type with just that entry point, link it, optionally produce GLSL or other languages, and then just use toJson on the linked program to get the full reflection file.

I didn't use slang-rs because I think at the exact moment I was solving this it was missing something, but I think it has everything I was missing now.

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Andrewp2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants