From 8b7e8a1a3e77b4e3b56ea9025af8b254faa16c13 Mon Sep 17 00:00:00 2001 From: sanine-a Date: Thu, 21 May 2020 10:16:59 -0500 Subject: add textured cube primitive --- src/texture.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/texture.c') diff --git a/src/texture.c b/src/texture.c index b041b4f..c1a5843 100644 --- a/src/texture.c +++ b/src/texture.c @@ -36,3 +36,10 @@ enum honey_texture_result honey_texture_new(honey_texture* texture, return TEXTURE_OK; } + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +void honey_texture_use(honey_texture texture, int texture_unit) { + glActiveTexture(GL_TEXTURE0 + texture_unit); + glBindTexture(GL_TEXTURE_2D, texture.texture_id); +} -- cgit v1.2.1