diff options
Diffstat (limited to 'src/rendering.c')
| -rw-r--r-- | src/rendering.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/rendering.c b/src/rendering.c index 06c14e8..dff3432 100644 --- a/src/rendering.c +++ b/src/rendering.c @@ -28,7 +28,7 @@ i32 drawcall_len = 0; void render_begin(Window* w) { //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glfwMakeContextCurrent(w->window); - w->context->Clear(GL_COLOR_BUFFER_BIT); + w->context->Clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); } void render_present(Window* w) { @@ -69,6 +69,14 @@ void render_present(Window* w) { void drawcall_reset(void) { drawcall_len = 0; } +void window_size_callback(GLFWwindow* window, int width, int height) { + GLOBAL_PLATFORM->window->context->Viewport(0,0, width, height); + //*GLOBAL_PLATFORM->window->game_w = width; + //*GLOBAL_PLATFORM->window->game_h = height; + GLOBAL_PLATFORM->window->windowsize.x = width; + GLOBAL_PLATFORM->window->windowsize.y = height; +} + void engine_window_resize_pointers(i32* w, i32* h) { GLOBAL_PLATFORM->window->game_w = w; GLOBAL_PLATFORM->window->game_h = h; |
