diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/primitives.h | 18 | ||||
-rw-r--r-- | include/texture.h | 7 |
2 files changed, 25 insertions, 0 deletions
diff --git a/include/primitives.h b/include/primitives.h index bfa944d..a7e4ccb 100644 --- a/include/primitives.h +++ b/include/primitives.h @@ -11,6 +11,8 @@ /** @brief Create a cube. * + * This function creates a cube with vertex positions in attribute 0. + * * @param[out] mesh Pointer to the destination mesh * @param[in] width Desired width of the cube (x-axis) * @param[in] height Desired height of the cube (y-axis) @@ -22,5 +24,21 @@ enum honey_mesh_result honey_mesh_new_cube(honey_mesh* mesh, float width, float height, float depth); +/** @brief Create a textured cube. + * + * This function creates a cube with vertex positions in attribute 0, + * and texture coordinates in attribute 1. + * + * @param[out] mesh Pointer to the destination mesh + * @param[in] width Desired width of the cube (x-axis) + * @param[in] height Desired height of the cube (y-axis) + * @param[in] depth Desired depth of the cube (z-axis) + * + * @return Success or failure code + */ +enum honey_mesh_result honey_mesh_new_textured_cube(honey_mesh* mesh, + float width, + float height, + float depth); #endif diff --git a/include/texture.h b/include/texture.h index e773e62..4caeebf 100644 --- a/include/texture.h +++ b/include/texture.h @@ -32,4 +32,11 @@ enum honey_texture_result honey_texture_new(honey_texture* texture, char* texture_path, bool alpha_channel); +/** @brief Load a texture into a texture unit. + * + * @param[in] texture The texture to use + * @param[in] texture_unit The texture unit to put the texture in + */ +void honey_texture_use(honey_texture texture, int texture_unit); + #endif |