简体   繁体   中英

c++ DirectX 11 glGetUniformLocation equivalent

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.

You use D3DReflect() to get reflection interface (ID3D11ShaderReflection) for given shader byte code. Check ID3D11ShaderReflection::GetResourceBindingDescByName() for querying specific uniform binding point.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM