Code to get uniform locations

This commit is contained in:
Kovid Goyal
2017-09-11 08:40:01 +05:30
parent 8ce2794a8a
commit d2b3052918
2 changed files with 57 additions and 22 deletions

View File

@@ -35,7 +35,6 @@ UBO = namedtuple('UBO', 'size index offsets buf_id')
BASE = os.path.dirname(os.path.abspath(__file__))
@lru_cache()
def load_shaders(name):
vert = open(os.path.join(BASE, '{}_vertex.glsl'.format(name))).read().replace('GLSL_VERSION', str(GLSL_VERSION), 1)
frag = open(os.path.join(BASE, '{}_fragment.glsl'.format(name))).read().replace('GLSL_VERSION', str(GLSL_VERSION), 1)