diff options
author | sanine-a <sanine.not@pm.me> | 2020-05-21 10:16:59 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2020-05-21 10:16:59 -0500 |
commit | 8b7e8a1a3e77b4e3b56ea9025af8b254faa16c13 (patch) | |
tree | 3f39bb785d5f1df1f026589a6cc1aa2749e30e6d /src/texture.c | |
parent | 9b66b322b600ab0db66cb6f3ff5a7c4196b9193f (diff) |
add textured cube primitive
Diffstat (limited to 'src/texture.c')
-rw-r--r-- | src/texture.c | 7 |
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); +} |