pygfx / pyshader

Write modern GPU shaders in Python!
BSD 2-Clause "Simplified" License
72 stars 1 forks source link

Deduplicate equal texture type definitions #31

Closed almarklein closed 4 years ago

almarklein commented 4 years ago

Explanation (technical): The texture typedef has a few fields for which the value is determined later. These values indicate how the shader is going to be used, but we don't know that until we've parsed the rest of the shader. So we use a placeholder object, and that makes that two texture typedefs can be created that are exactly equal. This PR does some de-duplication at the end.