wait, so it's possible? <@U0JRS2YUB>
# getting-started
e
wait, so it's possible? @sreich
s
elect: no idea, was only trying to get other people to answer you instead of try and get you to prematurely optimize your hashmap :D
e
you deceived me for a second 😛
e
Because the asked solution is not always the best way forward. So we were trying to share our experiences for alternatives. Also, no one has told any what to actually do. To answer the question then: I don’t think it’s possible, at least not targeting the JVM. Then you need a custom class loader. I also think from an interface perspective in a statically typed language such an interface does not make sense. Since the consumer of it has to guess what fields exist. I think a better solution would be to generate a class from the shader file or use Vulkan 🙂
e
I know, I appreciated your intervents Andreas 😉 However, for my openvr sample, I needed three times a program with a matrix location and one with a texture one. Since it's just a sample, I'd go for the hashmap, but for production code I generally agree with your point of view. One thing that I really dislike is to create
ProgramA
,
ProgramB
and so on, each one with its own set of uniforms
shader["matrix"]
looks so much more elegant to me..