summaryrefslogtreecommitdiff
path: root/include/honey.h
blob: 77dd678c6e63c64c9564b30c5bda8d69b52bc29b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef HONEY_ENGINE_H
#define HONEY_ENGINE_H

/** @file honey.h
 * 
 * @brief Defines the basic loading and callback functions. 
*/

#include "camera.h"
#include "common.h"
#include "input.h"
#include "light.h"
#include "mesh.h"
#include "model.h"
#include "primitives.h"
#include "shader.h"
#include "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