Reputation: 469
Is there an equivalent to glGetUniformLocation equivalent in DirectX 11?
If no, how do you handle shaders in your code? Setting every layouts manually is not funny, and can cause mistakes easily. To handle this I created a class to parse shader files, and create the appropriate layout with this. But this sounds wild.
Upvotes: 2
Views: 492
Reputation: 1918
You use D3DReflect() to get reflection interface (ID3D11ShaderReflection) for given shader byte code. Check ID3D11ShaderReflection::GetResourceBindingDescByName() for querying specific uniform binding point.
Upvotes: 3