diff --git a/.gitignore b/.gitignore index f4b676b..d4e33b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ **/*.o **/*.a +**/*.exe **/.DS_Store .cache/ -**/*.exe -examples/log.txt +**/log.txt compile_commands.json diff --git a/examples/simple-init.c b/examples/simple-init.c index 74b9213..0df89dd 100644 --- a/examples/simple-init.c +++ b/examples/simple-init.c @@ -7,7 +7,7 @@ int main() { gr_window_create(1920, 1080, "hi"); while(!gr_window_should_close()) { - gr_window_clear(249, 163, 255); + gr_window_clear(26, 26, 26); } } diff --git a/examples/simple.c b/examples/simple.c index 610af17..566c2f9 100644 --- a/examples/simple.c +++ b/examples/simple.c @@ -1,6 +1,6 @@ #include int main() { - gr_state_init(); +// gr_state_init(); gr_window_create(800, 600, "hi"); } diff --git a/src/gearlib.h b/src/gearlib.h index ba936f6..cb5233c 100644 --- a/src/gearlib.h +++ b/src/gearlib.h @@ -5,6 +5,7 @@ #include #include #include +#include typedef uint8_t u8; typedef uint16_t u16; diff --git a/src/window.c b/src/window.c index c2bb82f..5780fa7 100644 --- a/src/window.c +++ b/src/window.c @@ -5,7 +5,7 @@ bool gr_window_init(i32 major, i32 minor) { if(gr_state->window_initialized == true) { - log_fatal("Init already called"); + log_error("Init already called, ignoring call to init"); return false; } @@ -28,7 +28,7 @@ bool gr_window_create(i32 width, i32 height, const char* title) { const char* platform = gr_platform_get_name(); if(!gr_platform_init()) { log_fatal("%s failed to initialize", platform); - return false; + exit(EXIT_FAILURE); } log_info("%s initialized successfully", platform); @@ -36,7 +36,7 @@ bool gr_window_create(i32 width, i32 height, const char* title) { void* window = gr_platform_create_window(width, height, title); if(window == NULL) { log_fatal("%s failed to create window", platform); - return false; + exit(EXIT_FAILURE); } log_info("%s window created successfully", platform); @@ -46,7 +46,7 @@ bool gr_window_create(i32 width, i32 height, const char* title) { if(!gladLoadGLLoader(gr_platform_get_load_proc())) { log_fatal("Glad failed to load"); - return false; + exit(EXIT_FAILURE); } log_info("Glad loaded successfully");