diff options
author | sanine-a <sanine.not@pm.me> | 2020-10-31 22:43:41 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2020-10-31 22:43:41 -0500 |
commit | 42d42c9ba3b741d167eaa2196c686962559686f1 (patch) | |
tree | 46f9d9c51d1d4fe1ccbacf1d1f73c066e93dfc32 /src/texture/texture.h | |
parent | ad75604ec79d70d328595f114e65bac80db9999f (diff) |
add basic framebuffer operations
Diffstat (limited to 'src/texture/texture.h')
-rw-r--r-- | src/texture/texture.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/texture/texture.h b/src/texture/texture.h index 785fef0..9dc0308 100644 --- a/src/texture/texture.h +++ b/src/texture/texture.h @@ -37,7 +37,7 @@ void honey_setup_texture(lua_State* L); * @param[in] height The height in pixels of the texture to create. * @param[in] data The data to populate the texture with, or NULL to leave it unpopulated. * - * @returns HONEY_OK on success, and appropriate error on failure. + * @returns Nothing. */ void honey_texture_new_greyscale(honey_texture* texture, int width, int height, @@ -50,7 +50,7 @@ void honey_texture_new_greyscale(honey_texture* texture, * @param[in] height The height in pixels of the texture to create. * @param[in] data The data to populate the texture with, or NULL to leave it unpopulated. * - * @returns HONEY_OK on success, and appropriate error on failure. + * @returns Nothing. */ void honey_texture_new_rgb(honey_texture* texture, int width, int height, @@ -63,7 +63,7 @@ void honey_texture_new_rgb(honey_texture* texture, * @param[in] height The height in pixels of the texture to create. * @param[in] data The data to populate the texture with, or NULL to leave it unpopulated. * - * @returns HONEY_OK on success, and appropriate error on failure. + * @returns Nothing. */ void honey_texture_new_rgba(honey_texture* texture, int width, int height, @@ -76,7 +76,7 @@ void honey_texture_new_rgba(honey_texture* texture, * @param[in] height The height in pixels of the texture to create. * @param[in] data The data to populate the texture with, or NULL to leave it unpopulated. * - * @returns HONEY_OK on success, and appropriate error on failure. + * @returns Nothing. */ void honey_texture_new_depth(honey_texture* texture, int width, int height, @@ -102,13 +102,20 @@ void honey_texture_use(honey_texture texture, int texture_unit); /** @brief Create a framebuffer object. * + * You must specify at least one of draw and depth; otherwise, the framebuffer will + * be incomplete and fail. + * * @param[out] destination Pointer to store the resulting OpenGL handle in. + * @param[in] draw Pointer to a texture to draw to. + * @param[in] depth Pointer to a depth texture. * @param[in] width The width in pixels of the FBO. * @param[in] height The height in pixels of the FBO. * - * @returns HONEY_OK on success; appropriate error otherwise. + * @returns Nothing. */ -honey_result honey_texture_framebuffer_object_new(unsigned int* destination, - int width, int height); +void honey_texture_framebuffer_object_new(unsigned int* destination, + honey_texture* draw, + honey_texture* depth, + int width, int height); #endif |