mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 11:03:03 +08:00
Fix ShaderWrapper.init_textures
This commit is contained in:
@ -80,10 +80,11 @@ class ShaderWrapper(object):
|
||||
self.vert_format = moderngl.detect_format(self.program, self.vert_attributes)
|
||||
|
||||
def init_textures(self, texture_paths: dict[str, str]):
|
||||
for name, path in texture_paths.items():
|
||||
texture = image_path_to_texture(path, self.ctx)
|
||||
tid = get_texture_id(texture)
|
||||
self.uniforms[name] = tid
|
||||
names_to_ids = {
|
||||
name: get_texture_id(image_path_to_texture(path, self.ctx))
|
||||
for name, path in texture_paths.items()
|
||||
}
|
||||
self.update_program_uniforms(names_to_ids)
|
||||
|
||||
def init_vao(self):
|
||||
self.vbo = None
|
||||
|
Reference in New Issue
Block a user