H. Verbeet wrote:
Changelog:
- Select the right shader backend when creating the device
Imho there should be either ps_selected/vs_selected flags, or shader_backend flag, but definitely not both [ does not make sense ]. I'd opt for allowing different backends on pshader vs vshader. Maybe the current drawprim code is implemented to use ARB or GLSL for both, but that's not a good reason to disallow capability by writing future code as if the backend was unified. More importantly, you should be able to mix software shaders, with the other backends.
I'm also not sure replacing all if statements with a function table is a good idea - restructuring code is dangerous, better not to do it unless new features are being added, or the code is being rewritten, or it's completely unmaintainable (I think that's a bit hard to argue).