diff options
author | sanine-a <sanine.not@pm.me> | 2020-10-19 05:35:06 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2020-10-19 05:35:06 -0500 |
commit | 41fa908dc15b522e53946a716f4f6c00520bd46f (patch) | |
tree | bc8176462000b2c77c00d3227037c1acbb13e0ee /src/honey.h | |
parent | 2d046ffd16d8ff3a06f92ca438ca6b2d6842ce6a (diff) |
add honey libraries back and reorganize directories
Diffstat (limited to 'src/honey.h')
-rw-r--r-- | src/honey.h | 52 |
1 files changed, 50 insertions, 2 deletions
diff --git a/src/honey.h b/src/honey.h index c124903..c134894 100644 --- a/src/honey.h +++ b/src/honey.h @@ -1,6 +1,54 @@ -#ifndef HONEY_H -#define HONEY_H +#ifndef HONEY_ENGINE_H +#define HONEY_ENGINE_H +/** @file honey.h + * + * @brief Defines the basic loading and callback functions. +*/ +#include "common.h" + +#include "camera/camera.h" +#include "input/input.h" +#include "light/light.h" +#include "mesh/mesh.h" +#include "model/model.h" +#include "primitives/primitives.h" +#include "shader/shader.h" +#include "texture/texture.h" + +/** @brief Initialize Honey. + * + * @param[in] screen_width The desired width of the screen in pixels + * @param[in] screen_height The desired height of the screen in pixels + * @param[in] window_title Title to use for the window. + */ +honey_window honey_setup(int screen_width, int screen_height, char* window_title); + +static void (*honey_update_callback)(float dt); +static void (*honey_draw_callback)(); + +/** @brief Set the main update function. + * + * @param[in] update_callback The function to call every loop + */ +void honey_set_update_callback(void (*update_callback)(float)); + +/** @brief Set the main draw function + * + * @param[in] draw_callback The function to call every draw cycle + */ +void honey_set_draw_callback(void (*draw_callback)()); + +/** @brief The main game loop. + * + * @param[in] window The window the game is running in, created with honey_setup() + */ +void honey_run(honey_window window); + +#define honey_set_resize_callback glfwSetFramebufferSizeCallback +#define honey_set_mouse_move_callback glfwSetCursorPosCallback + +#define honey_quit glfwTerminate #endif |