summaryrefslogtreecommitdiff
path: root/src/texture.c
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2020-05-21 10:16:59 -0500
committersanine-a <sanine.not@pm.me>2020-05-21 10:16:59 -0500
commit8b7e8a1a3e77b4e3b56ea9025af8b254faa16c13 (patch)
tree3f39bb785d5f1df1f026589a6cc1aa2749e30e6d /src/texture.c
parent9b66b322b600ab0db66cb6f3ff5a7c4196b9193f (diff)
add textured cube primitive
Diffstat (limited to 'src/texture.c')
-rw-r--r--src/texture.c7
1 files changed, 7 insertions, 0 deletions
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);
+}