Adding dirty flags to uniforms

Still need to figure out a smart way to update them though, without
asking the user to manually setDirty.