diff options
| author | 0scar <qgt268@alumni.ku.dk> | 2024-02-06 11:52:32 +0000 |
|---|---|---|
| committer | 0scar <qgt268@alumni.ku.dk> | 2024-02-06 11:52:32 +0000 |
| commit | c7a3dcdc8a26eb5bf98ce2079abd66fd64534459 (patch) | |
| tree | ff5c572f94c3bf3e11e7f9e75e617d4454cc263a /src/core/include/engine | |
| parent | 3705b14a4b2ac0d6baa418f08991424cfad89891 (diff) | |
Fixup window handling & rendering
Diffstat (limited to 'src/core/include/engine')
| -rw-r--r-- | src/core/include/engine/engine.h | 58 |
1 files changed, 12 insertions, 46 deletions
diff --git a/src/core/include/engine/engine.h b/src/core/include/engine/engine.h index ba4e227..6e208d3 100644 --- a/src/core/include/engine/engine.h +++ b/src/core/include/engine/engine.h @@ -20,14 +20,14 @@ typedef struct { i32 x, y, w, h; } RenderUnit; -typedef struct Window Window; +#include <engine/rendering/window.h> #define NUM_GLOBAL_BINDINGS 1 typedef struct { void* data; /* Contains textures and such */ u64 data_len; - Window* window; + Window window; bool quit; u64 frame; @@ -78,7 +78,7 @@ void render_adjust_zoom(f32 diff); void render_add_unit(RenderUnit* u); f64 get_time(void); -v2_i32 get_windowsize(void); +//v2_i32 get_windowsize(void); v2_i32* get_mousepos(void); /* Input handling */ @@ -86,48 +86,14 @@ void engine_input_ctx_push(i_ctx* ctx); void engine_input_ctx_pop(void); void engine_input_ctx_reset(void); -#include <engine/rendering/rendering.h> +//#include <engine/rendering/rendering.h> -#ifdef ENGINE_INTERNALS - -#include <glad/gl.h> -#define GLFW_INCLUDE_NONE -#include <GLFW/glfw3.h> - -/* Window */ -struct Window { - GLFWwindow* window; - GladGLContext* context; - f32 render_scale; - - v2_i32 windowsize; - - i32* game_w; - i32* game_h; -}; - -typedef struct { - const i32 tilesize; - const i32 width; - const i32 height; -} Texture; - -struct Resources { - usize textures_len; - usize textures_size; - usize fonts_len; - - usize texturepaths_len; - usize fontpaths_len; - - /* Paths for our sources, kept in case the user wants to reload them */ - Asset_TextureSpec** texture_paths; - Asset_FontSpec** font_paths; - - /* Our actual sources */ - Texture** textures; - //TTF_Font** fonts; -}; - -#endif +//#ifdef ENGINE_INTERNALS +// +//#include <glad/gl.h> +//#define GLFW_INCLUDE_NONE +//#include <GLFW/glfw3.h> +// +// +//#endif #endif |
