Hundreds of errors in Visual Studio, we meet again!
After refactoring shaders to support hot reloading (which is awesome) I realised the way textures were bound to shaders wasn't great.
So now, I'm refactoring shaders... again...
After refactoring shaders to support hot reloading (which is awesome) I realised the way textures were bound to shaders wasn't great.
So now, I'm refactoring shaders... again...
Comments
However this meant I could call SetMat4 on an integer uniform, and it won't throw an error.
To define uniforms for a shader, I can now call AddUInt(...), AddFloat(...), etc:
This uniform class is the only time that glActiveTexture is called, which means uniforms and textures will never be out of sync.
Bindless textures would also solve this, but I'd like to maintain support for older GPUs