Shader and ShaderProgram interfaces should be refactored to follow the 'descriptor at creation time' principle.
Attaching, detaching, and re-compiling shaders does not work properly for Direct3D and Vulkan.
Moreover, it has only been adopted from the deprecated interface of OpenGL (like with glAttachShader).
In the new interface, the shaders must be compiled at creation time:
Shader
andShaderProgram
interfaces should be refactored to follow the 'descriptor at creation time' principle. Attaching, detaching, and re-compiling shaders does not work properly for Direct3D and Vulkan. Moreover, it has only been adopted from the deprecated interface of OpenGL (like withglAttachShader
).In the new interface, the shaders must be compiled at creation time:
Functions that will be removed from the interfaces:
Functions that will be added to the interfaces:
Example usage: