Beispiel #1
0
uint32_t ShaderManagerVulkan::UpdateUniforms() {
	uint32_t dirty = globalDirty_;
	if (globalDirty_) {
		BaseUpdateUniforms(dirty);
		LightUpdateUniforms(dirty);
		BoneUpdateUniforms(dirty);
	}
	globalDirty_ = 0;
	return dirty;
}
uint64_t ShaderManagerVulkan::UpdateUniforms() {
	uint64_t dirty = gstate_c.GetDirtyUniforms();
	if (dirty != 0) {
		if (dirty & DIRTY_BASE_UNIFORMS)
			BaseUpdateUniforms(&ub_base, dirty, false);
		if (dirty & DIRTY_LIGHT_UNIFORMS)
			LightUpdateUniforms(&ub_lights, dirty);
		if (dirty & DIRTY_BONE_UNIFORMS)
			BoneUpdateUniforms(&ub_bones, dirty);
	}
	gstate_c.CleanUniforms();
	return dirty;
}