Fix canvas example not rendering fully on macOS (#288)
This commit is contained in:
parent
ebdb341750
commit
a859103836
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue