|
@@ -477,7 +477,10 @@ int main(int argc, char *argv[])
|
|
|
canvas_end(&ctx, &canvas);}
|
|
|
|
|
|
/* Draw */
|
|
|
- glfwGetWindowSize(win, &width, &height);
|
|
|
+ /* Framebuffer size is used instead of window size because the window size is in screen coordinates instead of pixels.
|
|
|
+ * See https://www.glfw.org/docs/latest/window_guide.html#window_size for more info
|
|
|
+ */
|
|
|
+ glfwGetFramebufferSize(win, &width, &height);
|
|
|
glViewport(0, 0, width, height);
|
|
|
glClear(GL_COLOR_BUFFER_BIT);
|
|
|
glClearColor(0.2f, 0.2f, 0.2f, 1.0f);
|