summaryrefslogtreecommitdiff
path: root/include/primitives.h
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2020-06-05 18:20:49 -0500
committersanine-a <sanine.not@pm.me>2020-06-05 18:20:49 -0500
commite4dd7978d24f53465c8475bd3a027047b4a53bb8 (patch)
tree5c861830a2f7ad6ed2bcc0f9f04cd504403b3292 /include/primitives.h
parent70784cdb24628e758df27cbe1965ff83102decb0 (diff)
refactor: rename honey_error to honey_result
Diffstat (limited to 'include/primitives.h')
-rw-r--r--include/primitives.h31
1 files changed, 23 insertions, 8 deletions
diff --git a/include/primitives.h b/include/primitives.h
index a7e4ccb..58e9dd3 100644
--- a/include/primitives.h
+++ b/include/primitives.h
@@ -9,6 +9,21 @@
#include "common.h"
#include "mesh.h"
+/** @brief Create a textured plane.
+ *
+ * This function creates a plane with vertex positions in attribute 0,
+ * vertex normals in attribute 1, and UV coordinates in attribute 2.
+ *
+ * @param[out] mesh Pointer to the destination mesh
+ * @param[in] width Desired width of the plane (x-axis)
+ * @param[in] height Desired height of the plane (y-axis)
+ *
+ * @return 0 (HONEY_OK) on success, and an error code otherwise.
+ */
+honey_result honey_mesh_new_textured_plane(honey_mesh* mesh,
+ float width,
+ float height);
+
/** @brief Create a cube.
*
* This function creates a cube with vertex positions in attribute 0.
@@ -20,10 +35,10 @@
*
* @return Success or failure code
*/
-enum honey_mesh_result honey_mesh_new_cube(honey_mesh* mesh,
- float width,
- float height,
- float depth);
+honey_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,
@@ -36,9 +51,9 @@ enum honey_mesh_result honey_mesh_new_cube(honey_mesh* mesh,
*
* @return Success or failure code
*/
-enum honey_mesh_result honey_mesh_new_textured_cube(honey_mesh* mesh,
- float width,
- float height,
- float depth);
+honey_result honey_mesh_new_textured_cube(honey_mesh* mesh,
+ float width,
+ float height,
+ float depth);
#endif