summaryrefslogtreecommitdiff
path: root/src/texture.rs
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2024-04-21 23:16:23 -0400
committerLLLL Colonq <llll@colonq>2024-04-21 23:16:23 -0400
commitd2f9bfeba00018a1109949eed5a2434a040881fe (patch)
treec396e4e8a00b500957d07ef47210b09d6325c412 /src/texture.rs
parentf449efbebd6f04a94648c8c662191845a6ed9472 (diff)
More general texture binding
Diffstat (limited to 'src/texture.rs')
-rw-r--r--src/texture.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/texture.rs b/src/texture.rs
index 6e46d58..2fd9aab 100644
--- a/src/texture.rs
+++ b/src/texture.rs
@@ -60,9 +60,9 @@ impl Texture {
}
}
- pub fn bind_normal(&self, ctx: &context::Context) {
+ pub fn bind_index(&self, ctx: &context::Context, idx: u32) {
unsafe {
- ctx.gl.active_texture(glow::TEXTURE1);
+ ctx.gl.active_texture(glow::TEXTURE0 + idx);
ctx.gl.bind_texture(glow::TEXTURE_2D, Some(self.tex));
}
}