Add refresh_shader_info_id insetead of having create_shader_info_id called all the time

This commit is contained in:
Grant Sanderson
2020-06-27 00:01:45 -07:00
parent 26ce1d86ab
commit 10c6bfe3ad
3 changed files with 44 additions and 29 deletions

View File

@ -91,6 +91,10 @@ def create_shader_info_id(shader_info):
return "|".join([str(shader_info[key]) for key in SHADER_KEYS_FOR_ID])
def refresh_shader_info_id(shader_info):
shader_info["id"] = create_shader_info_id(shader_info)
def shader_info_program_id(shader_info):
return "|".join([str(shader_info[key]) for key in ["vert", "geom", "frag"]])